From 14cf381609a0a987e8b831cb70f5fe1c8f0dc260 Mon Sep 17 00:00:00 2001 From: James Reategui Date: Wed, 11 Jun 2025 14:53:14 -0400 Subject: [PATCH 1/6] add get manufacturers to identity api wrapper --- .../infrastructure/gateways/identity_api.go | 63 ++++++++----------- .../gateways/mocks/identity_api_mock.go | 16 +++++ 2 files changed, 42 insertions(+), 37 deletions(-) diff --git a/internal/infrastructure/gateways/identity_api.go b/internal/infrastructure/gateways/identity_api.go index cda3d53d..9876c1a3 100644 --- a/internal/infrastructure/gateways/identity_api.go +++ b/internal/infrastructure/gateways/identity_api.go @@ -1,8 +1,6 @@ package gateways import ( - "encoding/json" - "io" "time" "github.com/DIMO-Network/device-definitions-api/internal/config" @@ -23,15 +21,14 @@ type identityAPIService struct { //go:generate mockgen -source identity_api.go -destination mocks/identity_api_mock.go -package mocks type IdentityAPI interface { GetManufacturer(slug string) (*Manufacturer, error) + GetManufacturers() ([]Manufacturer, error) } // NewIdentityAPIService creates a new instance of IdentityAPI, initializing it with the provided logger, settings, and HTTP client. // httpClient is used for testing really func NewIdentityAPIService(logger *zerolog.Logger, settings *config.Settings, httpClient http.ClientWrapper) IdentityAPI { if httpClient == nil { - h := map[string]string{} - h["Content-Type"] = "application/json" - httpClient, _ = http.NewClientWrapper("", "", 10*time.Second, h, false) // ok to ignore err since only used for tor check + httpClient, _ = http.NewClientWrapper("", "", 10*time.Second, nil, true) // ok to ignore err since only used for tor check } return &identityAPIService{ @@ -56,7 +53,7 @@ func (i *identityAPIService) GetManufacturer(slug string) (*Manufacturer, error) Manufacturer Manufacturer `json:"manufacturer"` } `json:"data"` } - err := i.fetchWithQuery(query, &wrapper) + err := i.httpClient.GraphQLQuery("", query, &wrapper) if err != nil { return nil, err } @@ -66,41 +63,33 @@ func (i *identityAPIService) GetManufacturer(slug string) (*Manufacturer, error) return &wrapper.Data.Manufacturer, nil } -func (i *identityAPIService) fetchWithQuery(query string, result interface{}) error { - // GraphQL request - requestPayload := GraphQLRequest{Query: query} - payloadBytes, err := json.Marshal(requestPayload) - if err != nil { - return err - } - - // POST request - res, err := i.httpClient.ExecuteRequest(i.identityAPIURL, "POST", payloadBytes) - if err != nil { - i.logger.Err(err).Str("func", "fetchWithQuery").Msgf("request payload: %s", string(payloadBytes)) - if _, ok := err.(http.ResponseError); !ok { - return errors.Wrapf(err, "error calling identity api from url %s", i.identityAPIURL) - } - } - defer res.Body.Close() // nolint - - if res.StatusCode == 404 { - return ErrNotFound - } - if res.StatusCode == 400 { - return ErrBadRequest +func (i *identityAPIService) GetManufacturers() ([]Manufacturer, error) { + query := `{ + manufacturers { + totalCount + nodes { + id + tokenId + name + tableId + owner + } + } +}` + var wrapper struct { + Data struct { + Vehicles struct { + TotalCount int `json:"totalCount"` + Nodes []Manufacturer `json:"nodes"` + } `json:"manufacturers"` + } `json:"data"` } - bodyBytes, err := io.ReadAll(res.Body) + err := i.httpClient.GraphQLQuery("", query, &wrapper) if err != nil { - return errors.Wrapf(err, "error reading response body from url %s", i.identityAPIURL) - } - - if err := json.Unmarshal(bodyBytes, result); err != nil { - return err + return nil, err } - - return nil + return wrapper.Data.Vehicles.Nodes, nil } type Manufacturer struct { diff --git a/internal/infrastructure/gateways/mocks/identity_api_mock.go b/internal/infrastructure/gateways/mocks/identity_api_mock.go index f3e7a47c..ff05d17b 100644 --- a/internal/infrastructure/gateways/mocks/identity_api_mock.go +++ b/internal/infrastructure/gateways/mocks/identity_api_mock.go @@ -20,6 +20,7 @@ import ( type MockIdentityAPI struct { ctrl *gomock.Controller recorder *MockIdentityAPIMockRecorder + isgomock struct{} } // MockIdentityAPIMockRecorder is the mock recorder for MockIdentityAPI. @@ -53,3 +54,18 @@ func (mr *MockIdentityAPIMockRecorder) GetManufacturer(slug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManufacturer", reflect.TypeOf((*MockIdentityAPI)(nil).GetManufacturer), slug) } + +// GetManufacturers mocks base method. +func (m *MockIdentityAPI) GetManufacturers() ([]gateways.Manufacturer, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetManufacturers") + ret0, _ := ret[0].([]gateways.Manufacturer) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetManufacturers indicates an expected call of GetManufacturers. +func (mr *MockIdentityAPIMockRecorder) GetManufacturers() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManufacturers", reflect.TypeOf((*MockIdentityAPI)(nil).GetManufacturers)) +} From aedaa38143696e402f0db3c8da9f7af80e77559e Mon Sep 17 00:00:00 2001 From: James Reategui Date: Wed, 11 Jun 2025 16:39:37 -0400 Subject: [PATCH 2/6] wip --- .../sync_device_definition_search.go | 9 +- go.mod | 26 +- go.sum | 31 + internal/core/commands/bulk_validate_vin.go | 19 +- internal/core/commands/create_dd.go | 10 +- internal/core/commands/create_dm.go | 44 - internal/core/commands/create_dm_test.go | 67 - internal/core/commands/update_dm.go | 87 - internal/core/common/utils.go | 97 +- .../core/models/device_definition_models.go | 37 +- internal/core/queries/decode_vin_test.go | 26 +- .../queries/get_dd_all_by_make_year_range.go | 82 - internal/core/queries/get_dd_by_ids.go | 85 - .../core/queries/get_dd_by_make_model_year.go | 9 +- internal/core/queries/get_dd_on_chain_all.go | 82 - internal/core/queries/get_dm_all.go | 60 - internal/core/queries/get_dm_by_slug.go | 44 - internal/core/queries/get_dm_by_token_id.go | 72 - .../20250611151326_drop_device_makes.sql | 12 + .../db/models/boil_table_names.go | 2 - .../infrastructure/db/models/device_makes.go | 1065 ------ .../infrastructure/db/models/device_styles.go | 56 + internal/infrastructure/dbtest/test_helper.go | 110 +- .../device_definition_on_chain_service.go | 2 +- .../infrastructure/gateways/identity_api.go | 6 +- pkg/grpc/device_definition.pb.go | 2895 +++++------------ pkg/grpc/device_definition.proto | 97 +- pkg/grpc/device_definition_grpc.pb.go | 296 -- 28 files changed, 1038 insertions(+), 4390 deletions(-) delete mode 100644 internal/core/commands/create_dm.go delete mode 100644 internal/core/commands/create_dm_test.go delete mode 100644 internal/core/commands/update_dm.go delete mode 100644 internal/core/queries/get_dd_all_by_make_year_range.go delete mode 100644 internal/core/queries/get_dd_by_ids.go delete mode 100644 internal/core/queries/get_dd_on_chain_all.go delete mode 100644 internal/core/queries/get_dm_all.go delete mode 100644 internal/core/queries/get_dm_by_slug.go delete mode 100644 internal/core/queries/get_dm_by_token_id.go create mode 100644 internal/infrastructure/db/migrations/20250611151326_drop_device_makes.sql delete mode 100644 internal/infrastructure/db/models/device_makes.go diff --git a/cmd/device-definitions-api/sync_device_definition_search.go b/cmd/device-definitions-api/sync_device_definition_search.go index 9faa6ac5..56653fad 100644 --- a/cmd/device-definitions-api/sync_device_definition_search.go +++ b/cmd/device-definitions-api/sync_device_definition_search.go @@ -15,7 +15,6 @@ import ( "github.com/DIMO-Network/device-definitions-api/internal/config" "github.com/DIMO-Network/device-definitions-api/internal/core/common" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" "github.com/DIMO-Network/shared/pkg/db" "github.com/google/subcommands" "github.com/rs/zerolog" @@ -72,6 +71,8 @@ func (p *syncDeviceDefinitionSearchCmd) Execute(ctx context.Context, _ *flag.Fla collectionName := p.settings.SearchServiceIndexName + identity := gateways.NewIdentityAPIService(&p.logger, &p.settings) + if p.createIndex { _, err := client.Collection(collectionName).Delete(context.Background()) @@ -152,7 +153,7 @@ func (p *syncDeviceDefinitionSearchCmd) Execute(ctx context.Context, _ *flag.Fla fmt.Printf("Starting processing definitions\n") - makes, err := models.DeviceMakes().All(ctx, pdb.DBS().Reader) + makes, err := identity.GetManufacturers() if err != nil { p.logger.Fatal().Err(err).Send() } @@ -162,7 +163,7 @@ func (p *syncDeviceDefinitionSearchCmd) Execute(ctx context.Context, _ *flag.Fla var documents []SearchEntryItem // iterate over all makes, then query tableland for _, dm := range makes { - manufacturer, err := onChainSvc.GetManufacturer(dm.NameSlug) + manufacturer, err := onChainSvc.GetManufacturer(stringutils.SlugString(dm.Name)) if err != nil { p.logger.Fatal().Err(err).Send() } @@ -186,7 +187,7 @@ func (p *syncDeviceDefinitionSearchCmd) Execute(ctx context.Context, _ *flag.Fla } makeName := dm.Name - makeSlug := dm.NameSlug + makeSlug := stringutils.SlugString(dm.Name) manufacturerTokenID := manufacturer.TokenID newDocument := SearchEntryItem{ diff --git a/go.mod b/go.mod index c4c9248e..b95751c8 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/tidwall/sjson v1.2.5 github.com/typesense/typesense-go v1.1.0 github.com/volatiletech/null/v8 v8.1.2 - github.com/volatiletech/sqlboiler/v4 v4.16.2 + github.com/volatiletech/sqlboiler/v4 v4.19.1 github.com/volatiletech/strmangle v0.0.6 go.uber.org/mock v0.4.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 @@ -47,6 +47,9 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/DIMO-Network/yaml v0.1.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/Masterminds/sprig/v3 v3.2.2 // indirect github.com/MicahParks/keyfunc/v2 v2.1.0 // indirect github.com/Microsoft/hcsshim v0.12.5 // indirect github.com/antchfx/xpath v1.3.1 // indirect @@ -86,13 +89,19 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/uint256 v1.3.2 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/lufia/plan9stats v0.0.0-20240513124658-fba389f38bae // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mfridman/interpolate v0.0.2 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect @@ -101,6 +110,8 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oapi-codegen/runtime v1.1.1 // indirect github.com/onsi/gomega v1.19.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_model v0.6.1 // indirect @@ -111,7 +122,14 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/sony/gobreaker v1.0.0 // indirect + github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.6 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/subosito/gotenv v1.4.1 // indirect github.com/supranational/blst v0.3.14 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/tidwall/match v1.1.1 // indirect @@ -126,11 +144,13 @@ require ( go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.37.0 // indirect + golang.org/x/crypto v0.38.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.14.0 // indirect golang.org/x/time v0.9.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) @@ -180,7 +200,7 @@ require ( github.com/volatiletech/randomize v0.0.1 // indirect golang.org/x/net v0.36.0 // indirect golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.24.0 // indirect + golang.org/x/text v0.25.0 // indirect golang.org/x/tools v0.29.0 // indirect golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 15eb3ed1..86c48b08 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,11 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/MicahParks/keyfunc/v2 v2.1.0 h1:6ZXKb9Rp6qp1bDbJefnG7cTH8yMN1IC/4nf+GVjO99k= github.com/MicahParks/keyfunc/v2 v2.1.0/go.mod h1:rW42fi+xgLJ2FRRXAfNx9ZA8WpD4OeE/yHVMteCkw9k= @@ -215,6 +218,7 @@ github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoY github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= @@ -499,6 +503,7 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= @@ -513,15 +518,19 @@ github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= @@ -618,6 +627,7 @@ github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -629,6 +639,7 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= @@ -692,9 +703,12 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -787,6 +801,7 @@ github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -800,14 +815,21 @@ github.com/sony/gobreaker v1.0.0 h1:feX5fGGXSl3dYd4aHZItw+FpHLvvoaqkawKjVNiFMNQ= github.com/sony/gobreaker v1.0.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -825,9 +847,11 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= @@ -879,6 +903,8 @@ github.com/volatiletech/randomize v0.0.1 h1:eE5yajattWqTB2/eN8df4dw+8jwAzBtbdo5s github.com/volatiletech/randomize v0.0.1/go.mod h1:GN3U0QYqfZ9FOJ67bzax1cqZ5q2xuj2mXrXBjWaRTlY= github.com/volatiletech/sqlboiler/v4 v4.16.2 h1:PcV2bxjE+S+GwPKCyX7/AjlY3aiTKsOEjciLhpWQImc= github.com/volatiletech/sqlboiler/v4 v4.16.2/go.mod h1:B14BPBGTrJ2X6l7lwnvV/iXgYR48+ozGSlzHI3frl6U= +github.com/volatiletech/sqlboiler/v4 v4.19.1 h1:MA1cUQBAUNJ6dezS11GFlbQ9LvtlwuEAsIaUx9WyfNA= +github.com/volatiletech/sqlboiler/v4 v4.19.1/go.mod h1:q10x7FF/cR86pf8VT/0L0FTnLchi8EDhWu/SO55tl9A= github.com/volatiletech/strmangle v0.0.1/go.mod h1:F6RA6IkB5vq0yTG4GQ0UsbbRcl3ni9P76i+JrTBKFFg= github.com/volatiletech/strmangle v0.0.6 h1:AdOYE3B2ygRDq4rXDij/MMwq6KVK/pWAYxpC7CLrkKQ= github.com/volatiletech/strmangle v0.0.6/go.mod h1:ycDvbDkjDvhC0NUU8w3fWwl5JEMTV56vTKXzR3GeR+0= @@ -949,6 +975,8 @@ golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1207,6 +1235,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1477,6 +1507,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= diff --git a/internal/core/commands/bulk_validate_vin.go b/internal/core/commands/bulk_validate_vin.go index b356bb98..d9f230d3 100644 --- a/internal/core/commands/bulk_validate_vin.go +++ b/internal/core/commands/bulk_validate_vin.go @@ -4,6 +4,7 @@ package commands import ( "context" "fmt" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" "github.com/DIMO-Network/device-definitions-api/internal/core/models" @@ -23,11 +24,11 @@ type BulkValidateVinCommandResult struct { } type DecodedVIN struct { - VIN string `json:"vin"` - DefinitionID string `json:"definition_id"` - DeviceMake models.DeviceMake `json:"device_make"` - DeviceYear int32 `json:"device_year"` - DeviceModel string `json:"device_model"` + VIN string `json:"vin"` + DefinitionID string `json:"definition_id"` + DeviceMake gateways.Manufacturer `json:"device_make"` + DeviceYear int32 `json:"device_year"` + DeviceModel string `json:"device_model"` } func (*BulkValidateVinCommand) Key() string { return "BulkValidateVinCommand" } @@ -66,11 +67,17 @@ func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediat devideDefinition, err := dc.DeviceDefinitionDataHandler.Handle(ctx, &queries.GetDeviceDefinitionByIDQuery{DeviceDefinitionID: decodedVIN.(*p_grpc.DecodeVinResponse).DefinitionId}) //nolint if err == nil { + dd := devideDefinition.(*models.GetDeviceDefinitionQueryResult) + dm := gateways.Manufacturer{ + TokenID: dd.MakeTokenID, + Name: dd.MakeName, + } + decodedVINs = append(decodedVINs, DecodedVIN{ VIN: vin, DefinitionID: decodedVIN.(*p_grpc.DecodeVinResponse).DefinitionId, DeviceYear: decodedVIN.(*p_grpc.DecodeVinResponse).Year, - DeviceMake: devideDefinition.(*models.GetDeviceDefinitionQueryResult).DeviceMake, + DeviceMake: dm, DeviceModel: devideDefinition.(*models.GetDeviceDefinitionQueryResult).DeviceStyles[0].SubModel, }) } diff --git a/internal/core/commands/create_dd.go b/internal/core/commands/create_dd.go index fe16a9d7..1554f4db 100644 --- a/internal/core/commands/create_dd.go +++ b/internal/core/commands/create_dd.go @@ -53,13 +53,15 @@ type CreateDeviceDefinitionCommandHandler struct { powerTrainTypeService services.PowerTrainTypeService fuelAPI gateways.FuelAPIService logger *zerolog.Logger + identity gateways.IdentityAPI } func NewCreateDeviceDefinitionCommandHandler(onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter, - powerTrainTypeService services.PowerTrainTypeService, fuelAPI gateways.FuelAPIService, logger *zerolog.Logger) CreateDeviceDefinitionCommandHandler { + powerTrainTypeService services.PowerTrainTypeService, fuelAPI gateways.FuelAPIService, logger *zerolog.Logger, identity gateways.IdentityAPI) CreateDeviceDefinitionCommandHandler { return CreateDeviceDefinitionCommandHandler{onChainSvc: onChainSvc, dbs: dbs, powerTrainTypeService: powerTrainTypeService, - fuelAPI: fuelAPI, logger: logger} + fuelAPI: fuelAPI, logger: logger, + identity: identity} } func (ch CreateDeviceDefinitionCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { @@ -82,7 +84,7 @@ func (ch CreateDeviceDefinitionCommandHandler) Handle(ctx context.Context, query } } - dm, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(stringutils.SlugString(command.Make))).One(ctx, ch.dbs().Reader) + dm, err := ch.identity.GetManufacturer(stringutils.SlugString(command.Make)) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, &exceptions.ValidationError{ @@ -127,7 +129,7 @@ func (ch CreateDeviceDefinitionCommandHandler) Handle(ctx context.Context, query } ddTbl := coremodels.DeviceDefinitionTablelandModel{ - ID: common.DeviceDefinitionSlug(dm.NameSlug, stringutils.SlugString(command.Model), int16(command.Year)), + ID: common.DeviceDefinitionSlug(stringutils.SlugString(dm.Name), stringutils.SlugString(command.Model), int16(command.Year)), KSUID: ksuid.New().String(), Model: command.Model, Year: command.Year, diff --git a/internal/core/commands/create_dm.go b/internal/core/commands/create_dm.go deleted file mode 100644 index 89a80544..00000000 --- a/internal/core/commands/create_dm.go +++ /dev/null @@ -1,44 +0,0 @@ -//nolint:tagliatelle -package commands - -import ( - "context" - - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/repositories" -) - -type CreateDeviceMakeCommand struct { - Name string `json:"name"` - LogoURL string `json:"logo_url"` - ExternalIDs string `json:"external_ids,omitempty"` - Metadata string `json:"metadata,omitempty"` - HardwareTemplateID string `json:"hardware_template_id,omitempty"` -} - -type CreateDeviceMakeCommandResult struct { - ID string `json:"id"` -} - -func (*CreateDeviceMakeCommand) Key() string { return "CreateDeviceMakeCommand" } - -type CreateDeviceMakeCommandHandler struct { - Repository repositories.DeviceMakeRepository -} - -func NewCreateDeviceMakeCommandHandler(repository repositories.DeviceMakeRepository) CreateDeviceMakeCommandHandler { - return CreateDeviceMakeCommandHandler{Repository: repository} -} - -func (ch CreateDeviceMakeCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - - command := query.(*CreateDeviceMakeCommand) - - dm, err := ch.Repository.GetOrCreate(ctx, command.Name, command.LogoURL, command.ExternalIDs, command.Metadata, command.HardwareTemplateID) - - if err != nil { - return nil, err - } - - return CreateDeviceMakeCommandResult{ID: dm.ID}, nil -} diff --git a/internal/core/commands/create_dm_test.go b/internal/core/commands/create_dm_test.go deleted file mode 100644 index 3355bdf6..00000000 --- a/internal/core/commands/create_dm_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package commands - -import ( - "context" - _ "embed" - "testing" - - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - repositoryMock "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/repositories/mocks" - "github.com/segmentio/ksuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - "go.uber.org/mock/gomock" -) - -type CreateDeviceMakeCommandHandlerSuite struct { - suite.Suite - *require.Assertions - - ctrl *gomock.Controller - mockRepository *repositoryMock.MockDeviceMakeRepository - ctx context.Context - - queryHandler CreateDeviceMakeCommandHandler -} - -func TestCreateDeviceMakeCommandHandler(t *testing.T) { - suite.Run(t, new(CreateDeviceMakeCommandHandlerSuite)) -} - -func (s *CreateDeviceMakeCommandHandlerSuite) SetupTest() { - - s.ctx = context.Background() - s.Assertions = require.New(s.T()) - s.ctrl = gomock.NewController(s.T()) - s.mockRepository = repositoryMock.NewMockDeviceMakeRepository(s.ctrl) - - s.queryHandler = NewCreateDeviceMakeCommandHandler(s.mockRepository) -} - -func (s *CreateDeviceMakeCommandHandlerSuite) TearDownTest() { - s.ctrl.Finish() -} - -func (s *CreateDeviceMakeCommandHandlerSuite) TestCreateDeviceMakeCommand_Success() { - ctx := context.Background() - - name := "Ford" - templateID := "01" - - dm := &models.DeviceMake{ - ID: ksuid.New().String(), - Name: name, - } - - s.mockRepository.EXPECT().GetOrCreate(gomock.Any(), name, gomock.Any(), gomock.Any(), gomock.Any(), templateID).Return(dm, nil).Times(1) - - commandResult, err := s.queryHandler.Handle(ctx, &CreateDeviceMakeCommand{ - Name: name, - HardwareTemplateID: templateID, - }) - result := commandResult.(CreateDeviceMakeCommandResult) - - s.NoError(err) - assert.Equal(s.T(), result.ID, dm.ID) -} diff --git a/internal/core/commands/update_dm.go b/internal/core/commands/update_dm.go deleted file mode 100644 index d3851041..00000000 --- a/internal/core/commands/update_dm.go +++ /dev/null @@ -1,87 +0,0 @@ -//nolint:tagliatelle -package commands - -import ( - "context" - "database/sql" - "encoding/json" - "math/big" - - stringutils "github.com/DIMO-Network/shared/pkg/strings" - - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - "github.com/DIMO-Network/shared/pkg/db" - "github.com/pkg/errors" - "github.com/volatiletech/null/v8" - "github.com/volatiletech/sqlboiler/v4/boil" -) - -type UpdateDeviceMakeCommand struct { - ID string `json:"id"` - Name string `json:"name"` - LogoURL null.String `json:"logo_url"` - OemPlatformName null.String `json:"oem_platform_name"` - TokenID *big.Int `json:"tokenId,omitempty"` - ExternalIDs json.RawMessage `json:"external_ids"` - Metadata json.RawMessage `json:"metadata"` - HardwareTemplateID string `json:"hardware_template_id,omitempty"` -} - -type UpdateDeviceMakeCommandResult struct { - ID string `json:"id"` -} - -func (*UpdateDeviceMakeCommand) Key() string { return "UpdateDeviceMakeCommand" } - -type UpdateDeviceMakeCommandHandler struct { - DBS func() *db.ReaderWriter -} - -func NewUpdateDeviceMakeCommandHandler(dbs func() *db.ReaderWriter) UpdateDeviceMakeCommandHandler { - return UpdateDeviceMakeCommandHandler{DBS: dbs} -} - -func (ch UpdateDeviceMakeCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - - command := query.(*UpdateDeviceMakeCommand) - - dm, err := models.DeviceMakes(models.DeviceMakeWhere.ID.EQ(command.ID)).One(ctx, ch.DBS().Reader) - - if err != nil { - if !errors.Is(err, sql.ErrNoRows) { - return nil, &exceptions.InternalError{ - Err: err, - } - } - } - - if dm == nil { - dm = &models.DeviceMake{ - ID: command.ID, - Name: command.Name, - NameSlug: stringutils.SlugString(command.Name), - } - } - - if command.LogoURL.Valid { - dm.LogoURL = command.LogoURL - } - - if command.OemPlatformName.Valid { - dm.OemPlatformName = command.OemPlatformName - } - - dm.ExternalIds = null.JSONFrom(command.ExternalIDs) - dm.Metadata = null.JSONFrom(command.Metadata) - dm.HardwareTemplateID = null.StringFrom(command.HardwareTemplateID) - - if err := dm.Upsert(ctx, ch.DBS().Writer.DB, true, []string{models.DeviceMakeColumns.ID}, boil.Infer(), boil.Infer()); err != nil { - return nil, &exceptions.InternalError{ - Err: err, - } - } - - return UpdateDeviceMakeCommandResult{ID: dm.ID}, nil -} diff --git a/internal/core/common/utils.go b/internal/core/common/utils.go index ebdc5aef..d4f1b634 100644 --- a/internal/core/common/utils.go +++ b/internal/core/common/utils.go @@ -3,8 +3,8 @@ package common import ( "encoding/json" "fmt" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "net/http" - "sort" "strings" "github.com/DIMO-Network/device-definitions-api/internal/core/models" @@ -32,25 +32,6 @@ func Contains(s []string, str string) bool { return false } -// SubModelsFromStylesDB gets the unique style.SubModel from the styles slice, deduping sub_model -func SubModelsFromStylesDB(styles repoModel.DeviceStyleSlice) []string { - items := map[string]string{} - for _, style := range styles { - if _, ok := items[style.SubModel]; !ok { - items[style.SubModel] = style.Name - } - } - - sm := make([]string, len(items)) - i := 0 - for key := range items { - sm[i] = key - i++ - } - sort.Strings(sm) - return sm -} - func BuildExternalIDs(externalIDsJSON null.JSON) []*models.ExternalID { var externalIDs []*models.ExternalID var ei map[string]string @@ -65,18 +46,6 @@ func BuildExternalIDs(externalIDsJSON null.JSON) []*models.ExternalID { return externalIDs } -func BuildDeviceMakeMetadata(metadataJSON null.JSON) *models.DeviceMakeMetadata { - var dmMetadata *models.DeviceMakeMetadata - var m map[string]string - if err := metadataJSON.Unmarshal(&m); err == nil { - dmMetadata = &models.DeviceMakeMetadata{ - RideGuideLink: m["RideGuideLink"], - } - } - - return dmMetadata -} - func ExternalIDsToGRPC(externalIDs []*models.ExternalID) []*grpc.ExternalID { externalIDsGRPC := make([]*grpc.ExternalID, len(externalIDs)) for i, ei := range externalIDs { @@ -88,14 +57,6 @@ func ExternalIDsToGRPC(externalIDs []*models.ExternalID) []*grpc.ExternalID { return externalIDsGRPC } -func DeviceMakeMetadataToGRPC(dm *models.DeviceMakeMetadata) *grpc.Metadata { - dmMetadata := &grpc.Metadata{ - RideGuideLink: dm.RideGuideLink, - } - - return dmMetadata -} - // GetDefaultImageURL if the images relation is not empty, looks for the best image to use based on some logic func GetDefaultImageURL(images []*repoModel.Image) string { img := "" @@ -231,7 +192,7 @@ func GetDeviceAttributesTyped(metadata null.JSON, key string) []models.DeviceTyp return respAttrs } -func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTablelandModel, dm *models.DeviceMake, dss []*repoModel.DeviceStyle, trx []*repoModel.DefinitionTransaction) (*models.GetDeviceDefinitionQueryResult, error) { +func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTablelandModel, dm *gateways.Manufacturer, dss []*repoModel.DeviceStyle, trx []*repoModel.DefinitionTransaction) (*models.GetDeviceDefinitionQueryResult, error) { mdBytes := []byte("{}") if dd.Metadata != nil { mdBytes, _ = json.Marshal(dd.Metadata) @@ -241,7 +202,8 @@ func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTableland NameSlug: dd.ID, Name: BuildDeviceDefinitionName(int16(dd.Year), dm.Name, dd.Model), HardwareTemplateID: DefautlAutoPiTemplate, // used for the autopi template id, which should now always be 130 - DeviceMake: *dm, + MakeName: dm.Name, + MakeTokenID: dm.TokenID, Metadata: mdBytes, Verified: true, ImageURL: dd.ImageURI, @@ -282,57 +244,6 @@ func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTableland return rp, nil } -func BuildFromQueryResultToGRPC(dd *models.GetDeviceDefinitionQueryResult) *grpc.GetDeviceDefinitionItemResponse { - rp := &grpc.GetDeviceDefinitionItemResponse{ - DeviceDefinitionId: dd.DeviceDefinitionID, - NameSlug: dd.NameSlug, - Name: dd.Name, - ImageUrl: dd.ImageURL, - - HardwareTemplateId: DefautlAutoPiTemplate, //used for the autopi template id, which should always be 130 now - Make: &grpc.DeviceMake{ - Id: dd.DeviceMake.ID, - Name: dd.DeviceMake.Name, - LogoUrl: dd.DeviceMake.LogoURL.String, - OemPlatformName: dd.DeviceMake.OemPlatformName.String, - NameSlug: dd.DeviceMake.NameSlug, - }, - Verified: dd.Verified, - Transactions: dd.Transactions, - } - if dd.DeviceMake.TokenID != nil { - rp.Make.TokenId = dd.DeviceMake.TokenID.Uint64() - } - - rp.DeviceStyles = []*grpc.DeviceStyle{} - for _, ds := range dd.DeviceStyles { - rp.DeviceStyles = append(rp.DeviceStyles, &grpc.DeviceStyle{ - DeviceDefinitionId: dd.DeviceDefinitionID, - ExternalStyleId: ds.ExternalStyleID, - Id: ds.ID, - Name: ds.Name, - Source: ds.Source, - SubModel: ds.SubModel, - HardwareTemplateId: ds.HardwareTemplateID, - }) - } - - rp.DeviceAttributes = []*grpc.DeviceTypeAttribute{} - for _, da := range dd.DeviceAttributes { - rp.DeviceAttributes = append(rp.DeviceAttributes, &grpc.DeviceTypeAttribute{ - Name: da.Name, - Label: da.Label, - Description: da.Description, - Value: da.Value, - Required: da.Required, - Type: da.Type, - Options: da.Option, - }) - } - - return rp -} - func BuildDeviceTypeAttributes(attributes []*models.UpdateDeviceTypeAttribute, dt *repoModel.DeviceType) (null.JSON, error) { // attribute info if attributes == nil { diff --git a/internal/core/models/device_definition_models.go b/internal/core/models/device_definition_models.go index c6c4706f..5f6946c9 100644 --- a/internal/core/models/device_definition_models.go +++ b/internal/core/models/device_definition_models.go @@ -3,12 +3,6 @@ package models import ( "encoding/json" - "math/big" - "time" - - repoModel "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - - "github.com/volatiletech/null/v8" ) type GetDeviceDefinitionQueryResult struct { @@ -17,12 +11,13 @@ type GetDeviceDefinitionQueryResult struct { Name string `json:"name"` ImageURL string `json:"imageUrl"` HardwareTemplateID string `json:"hardware_template_id"` - DeviceMake DeviceMake `json:"make"` Metadata []byte `json:"metadata"` Verified bool `json:"verified"` DeviceStyles []DeviceStyle `json:"deviceStyles"` DeviceAttributes []DeviceTypeAttributeEditor `json:"deviceAttributes"` Transactions []string `json:"transactions"` + MakeName string `json:"makeSlug"` + MakeTokenID int `json:"makeTokenId"` } type DeviceTypeAttributeEditor struct { @@ -88,19 +83,6 @@ type DeviceStyle struct { Metadata []DeviceTypeAttributeEditor `json:"metadata"` } -type DeviceMake struct { - ID string `json:"id"` - Name string `json:"name"` - LogoURL null.String `json:"logo_url"` - OemPlatformName null.String `json:"oem_platform_name"` - TokenID *big.Int `json:"tokenId,omitempty"` - NameSlug string `json:"nameSlug"` - Metadata json.RawMessage `json:"metadata"` - MetadataTyped *DeviceMakeMetadata `json:"metadataTyped"` - CreatedAt time.Time `json:"created_at,omitempty"` - UpdatedAt time.Time `json:"updated_at,omitempty"` -} - type ExternalID struct { Vendor string `json:"vendor"` ID string `json:"id"` @@ -114,21 +96,6 @@ type GetDeviceDefinitionHardwareTemplateQueryResult struct { TemplateID string `json:"template_id"` } -func ConvertDeviceMakeFromDB(dmDb *repoModel.DeviceMake) *DeviceMake { - if dmDb == nil { - return nil - } - return &DeviceMake{ - ID: dmDb.ID, - Name: dmDb.Name, - LogoURL: dmDb.LogoURL, - OemPlatformName: dmDb.OemPlatformName, - NameSlug: dmDb.NameSlug, - CreatedAt: dmDb.CreatedAt, - UpdatedAt: dmDb.UpdatedAt, - } -} - // DeviceDefinitionTablelandModel model returned by on-chain sql lite from tableland type DeviceDefinitionTablelandModel struct { ID string `json:"id"` diff --git a/internal/core/queries/decode_vin_test.go b/internal/core/queries/decode_vin_test.go index 631cb26a..e22f7129 100644 --- a/internal/core/queries/decode_vin_test.go +++ b/internal/core/queries/decode_vin_test.go @@ -90,7 +90,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingDD_UpdatesAt ctx := context.Background() const vin = "1FMCU0G61MUA52727" // ford escape 2021 - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm, "Escape", 2021, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles @@ -196,8 +196,8 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD_WithMismatchWM const vin = "1FMCU0G61MUA52727" // Lincoln escape 2021 const wmi = "1FM" - dmFord := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) - dmLincoln := dbtesthelper.SetupCreateMake(s.T(), "Lincoln", s.pdb) + dmFord := dbtesthelper.SetupCreateMake("Ford") + dmLincoln := dbtesthelper.SetupCreateMake("Lincoln") _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dmFord.ID, s.pdb) @@ -310,7 +310,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD_WithMismatchWM func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_JapanChassisNumber_existingVIN() { const vin = "ZWR90-8000186" // toyota something or other - dm := dbtesthelper.SetupCreateMake(s.T(), "Toyota", s.pdb) + dm := dbtesthelper.SetupCreateMake("Toyota") dd := dbtesthelper.SetupCreateDeviceDefinitionWithVehicleInfo(s.T(), dm, "Yaris", 2024, s.pdb) vinNumb := models.VinNumber{ @@ -351,7 +351,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD() { const vin = "1FMCU0G61MUA52727" // ford escape 2021 const wmi = "1FM" - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dm.ID, s.pdb) @@ -477,7 +477,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingDD_AndStyleA ctx := context.Background() const vin = "1FMCU0G61MUA52727" // ford escape 2021 - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") dd := dbtesthelper.SetupCreateDeviceDefinitionWithVehicleInfo(s.T(), dm, "Escape", 2021, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles @@ -565,7 +565,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingWMI() { const vin = "1FMCU0G61MUA52727" // ford escape 2021 _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") dd := dbtesthelper.SetupCreateDeviceDefinitionWithVehicleInfo(s.T(), dm, "Escape", 2021, s.pdb) wmi := models.Wmi{ Wmi: "1FM", @@ -654,7 +654,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_TeslaDecode() { const vin = "5YJ3E1EA2PF696023" // tesla model 3 2023 _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Tesla", s.pdb) + dm := dbtesthelper.SetupCreateMake("Tesla") dd := dbtesthelper.SetupCreateDeviceDefinitionWithVehicleInfo(s.T(), dm, "Model 3", 2023, s.pdb) wmi := models.Wmi{ Wmi: "5YJ", @@ -706,7 +706,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingVINNumber() const vin = "1FMCU0G61MUA52727" // ford escape 2021 _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") dd := dbtesthelper.SetupCreateDeviceDefinitionWithVehicleInfo(s.T(), dm, "Escape", 2021, s.pdb) wmi := models.Wmi{ Wmi: "1FM", @@ -761,7 +761,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_InvalidVINYear_AutoIso() ctx := context.Background() const vin = "1FMCU0G61MUA52727" // invalid year digit 10 - Q _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") vinDecodingInfoData := &coremodels.VINDecodingInfoData{ Source: "vincario", @@ -802,7 +802,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_InvalidStyleName_AutoIso ctx := context.Background() const vin = "1FMCU0G61MUA52727" // invalid year digit 10 - Q _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") vinDecodingInfoData := &coremodels.VINDecodingInfoData{ Source: "vincario", @@ -850,7 +850,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Fail_DecodeErr() { const vin = "1FMCU0G61MUA52727" // invalid year digit 10 - Q _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - _ = dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + _ = dbtesthelper.SetupCreateMake("Ford") s.mockVINService.EXPECT().GetVIN(ctx, vin, gomock.Any(), coremodels.AllProviders, "USA").Times(1).Return(nil, fmt.Errorf("unable to decode")) @@ -864,7 +864,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_DecodeKnownFallback() { const vin = "1FMCU0G61MUA52727" // invalid year digit 10 - Q _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") _ = dbtesthelper.SetupCreateWMI(s.T(), "1FM", dm.Name, s.pdb) definitionID := "ford_bronco_2022" diff --git a/internal/core/queries/get_dd_all_by_make_year_range.go b/internal/core/queries/get_dd_all_by_make_year_range.go deleted file mode 100644 index 9f448540..00000000 --- a/internal/core/queries/get_dd_all_by_make_year_range.go +++ /dev/null @@ -1,82 +0,0 @@ -package queries - -import ( - "context" - "strings" - - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" - "github.com/DIMO-Network/shared/pkg/db" - stringutils "github.com/DIMO-Network/shared/pkg/strings" - - "github.com/DIMO-Network/device-definitions-api/internal/core/common" - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/pkg/grpc" -) - -type GetAllDeviceDefinitionByMakeYearRangeQuery struct { - Make string - StartYear int32 - EndYear int32 -} - -func (*GetAllDeviceDefinitionByMakeYearRangeQuery) Key() string { - return "GetAllDeviceDefinitionByMakeYearRangeQuery" -} - -type GetAllDeviceDefinitionByMakeYearRangeQueryHandler struct { - dbs func() *db.ReaderWriter - onChainSvc gateways.DeviceDefinitionOnChainService -} - -func NewGetAllDeviceDefinitionByMakeYearRangeQueryHandler(onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter) GetAllDeviceDefinitionByMakeYearRangeQueryHandler { - return GetAllDeviceDefinitionByMakeYearRangeQueryHandler{ - dbs: dbs, - onChainSvc: onChainSvc, - } -} - -func (ch GetAllDeviceDefinitionByMakeYearRangeQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - qry := query.(*GetAllDeviceDefinitionByMakeYearRangeQuery) - makeSlug := stringutils.SlugString(qry.Make) - manufacturer, err := ch.onChainSvc.GetManufacturer(makeSlug) - if err != nil { - return nil, err - } - - var conditions []string - if qry.StartYear > 0 { - conditions = append(conditions, "year >= "+string(qry.StartYear)) - } - if qry.EndYear > qry.StartYear { - conditions = append(conditions, "year <= "+string(qry.EndYear)) - } - whereClause := strings.Join(conditions, " AND ") - if whereClause != "" { - whereClause = "WHERE " + whereClause - } - - all, err := ch.onChainSvc.QueryDefinitionsCustom(ctx, manufacturer.TokenID, whereClause, 0) - if err != nil { - return nil, err - } - dmDb, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(makeSlug)).One(ctx, ch.dbs().Reader) - if err != nil { - return nil, err - } - dm := coremodels.ConvertDeviceMakeFromDB(dmDb) - - response := &grpc.GetDeviceDefinitionResponse{} - for _, v := range all { - dd, err := common.BuildFromDeviceDefinitionToQueryResult(&v, dm, nil, nil) - if err != nil { - return nil, err - } - rp := common.BuildFromQueryResultToGRPC(dd) - - response.DeviceDefinitions = append(response.DeviceDefinitions, rp) - } - - return response, nil -} diff --git a/internal/core/queries/get_dd_by_ids.go b/internal/core/queries/get_dd_by_ids.go deleted file mode 100644 index 3705c35c..00000000 --- a/internal/core/queries/get_dd_by_ids.go +++ /dev/null @@ -1,85 +0,0 @@ -package queries - -import ( - "context" - "fmt" - - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" - "github.com/DIMO-Network/shared/pkg/db" - - p_grpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" - - "github.com/DIMO-Network/device-definitions-api/internal/core/common" - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - "github.com/pkg/errors" - "github.com/rs/zerolog" -) - -type GetDeviceDefinitionByIDsQuery struct { - DeviceDefinitionID []string `json:"deviceDefinitionId" validate:"required"` -} - -func (*GetDeviceDefinitionByIDsQuery) Key() string { return "GetDeviceDefinitionByIDsQuery" } - -type GetDeviceDefinitionByIDsQueryHandler struct { - dbs func() *db.ReaderWriter - log *zerolog.Logger - onChainSvc gateways.DeviceDefinitionOnChainService -} - -func NewGetDeviceDefinitionByIDsQueryHandler(log *zerolog.Logger, onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter) GetDeviceDefinitionByIDsQueryHandler { - return GetDeviceDefinitionByIDsQueryHandler{ - onChainSvc: onChainSvc, - log: log, - dbs: dbs, - } -} - -// Handle gets device definition based on legacy KSUID id -func (ch GetDeviceDefinitionByIDsQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - // desired response type GetDeviceDefinitionResponse - qry := query.(*GetDeviceDefinitionByIDsQuery) - - if len(qry.DeviceDefinitionID) == 0 { - return nil, &exceptions.ValidationError{ - Err: errors.New("Device Definition Ids is required"), - } - } - response := &p_grpc.GetDeviceDefinitionResponse{ - DeviceDefinitions: make([]*p_grpc.GetDeviceDefinitionItemResponse, 0), - } - - for _, ddid := range qry.DeviceDefinitionID { - dd, manufID, err := ch.onChainSvc.GetDefinitionByID(ctx, ddid) - if err != nil { - return nil, err - } - if dd == nil { - return nil, &exceptions.NotFoundError{ - Err: fmt.Errorf("could not find device definition id: %s", ddid), - } - } - // todo refactor this out, same pattern in a couple places - makeName, err := ch.onChainSvc.GetManufacturerNameByID(ctx, manufID) - if err != nil { - return nil, err - } - dm, err := models.DeviceMakes(models.DeviceMakeWhere.Name.EQ(makeName)).One(ctx, ch.dbs().Reader) - if err != nil { - return nil, err - } - dss, _ := models.DeviceStyles(models.DeviceStyleWhere.DefinitionID.EQ(ddid)).All(ctx, ch.dbs().Reader) - trx, _ := models.DefinitionTransactions(models.DefinitionTransactionWhere.DefinitionID.EQ(ddid)).All(ctx, ch.dbs().Reader) - rp, err := common.BuildFromDeviceDefinitionToQueryResult(dd, coremodels.ConvertDeviceMakeFromDB(dm), dss, trx) - if err != nil { - return nil, err - } - gg := common.BuildFromQueryResultToGRPC(rp) - response.DeviceDefinitions = append(response.DeviceDefinitions, gg) - } - - return response, nil -} diff --git a/internal/core/queries/get_dd_by_make_model_year.go b/internal/core/queries/get_dd_by_make_model_year.go index 9391e00f..b9bddd22 100644 --- a/internal/core/queries/get_dd_by_make_model_year.go +++ b/internal/core/queries/get_dd_by_make_model_year.go @@ -6,7 +6,6 @@ import ( "github.com/DIMO-Network/device-definitions-api/internal/core/common" "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" @@ -29,12 +28,14 @@ func (*GetDeviceDefinitionByMakeModelYearQuery) Key() string { type GetDeviceDefinitionByMakeModelYearQueryHandler struct { dbs func() *db.ReaderWriter onChainSvc gateways.DeviceDefinitionOnChainService + identity gateways.IdentityAPI } -func NewGetDeviceDefinitionByMakeModelYearQueryHandler(onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter) GetDeviceDefinitionByMakeModelYearQueryHandler { +func NewGetDeviceDefinitionByMakeModelYearQueryHandler(onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter, identity gateways.IdentityAPI) GetDeviceDefinitionByMakeModelYearQueryHandler { return GetDeviceDefinitionByMakeModelYearQueryHandler{ onChainSvc: onChainSvc, dbs: dbs, + identity: identity, } } @@ -58,14 +59,14 @@ func (ch GetDeviceDefinitionByMakeModelYearQueryHandler) Handle(ctx context.Cont Err: fmt.Errorf("could not find device definition with MMY: %s %s %d", qry.Make, qry.Model, qry.Year), } } - dm, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(makeSlug)).One(ctx, ch.dbs().Reader) + dm, err := ch.identity.GetManufacturer(makeSlug) if err != nil { return nil, err } dss, _ := models.DeviceStyles(models.DeviceStyleWhere.DefinitionID.EQ(definitions[0].ID)).All(ctx, ch.dbs().Reader) trx, _ := models.DefinitionTransactions(models.DefinitionTransactionWhere.DefinitionID.EQ(definitions[0].ID)).All(ctx, ch.dbs().Reader) - queryResult, err := common.BuildFromDeviceDefinitionToQueryResult(&definitions[0], coremodels.ConvertDeviceMakeFromDB(dm), dss, trx) + queryResult, err := common.BuildFromDeviceDefinitionToQueryResult(&definitions[0], dm, dss, trx) if err != nil { return nil, err } diff --git a/internal/core/queries/get_dd_on_chain_all.go b/internal/core/queries/get_dd_on_chain_all.go deleted file mode 100644 index 8b1c448b..00000000 --- a/internal/core/queries/get_dd_on_chain_all.go +++ /dev/null @@ -1,82 +0,0 @@ -package queries - -import ( - "context" - - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" - "github.com/DIMO-Network/shared/pkg/db" - "github.com/ericlagergren/decimal" - "github.com/volatiletech/sqlboiler/v4/types" - - "github.com/DIMO-Network/device-definitions-api/internal/core/common" - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/pkg/grpc" -) - -type GetAllDeviceDefinitionOnChainQuery struct { - MakeSlug string `json:"makeSlug"` - DeviceDefinitionID string `json:"deviceDefinitionId"` - Year int `json:"year"` - Model string `json:"model"` - PageIndex int32 `json:"pageIndex"` - PageSize int32 `json:"pageSize"` -} - -func (*GetAllDeviceDefinitionOnChainQuery) Key() string { return "GetAllDeviceDefinitionOnChainQuery" } - -type GetAllDeviceDefinitionOnChainQueryHandler struct { - DBS func() *db.ReaderWriter - DeviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService -} - -func NewGetAllDeviceDefinitionOnChainQueryHandler(dbs func() *db.ReaderWriter, deviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService) GetAllDeviceDefinitionOnChainQueryHandler { - return GetAllDeviceDefinitionOnChainQueryHandler{ - DBS: dbs, - DeviceDefinitionOnChainService: deviceDefinitionOnChainService, - } -} - -func (ch GetAllDeviceDefinitionOnChainQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - qry := query.(*GetAllDeviceDefinitionOnChainQuery) - dm, err := ch.DeviceDefinitionOnChainService.GetManufacturer(qry.MakeSlug) - if err != nil { - return nil, err - } - dmDb, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(qry.MakeSlug)).One(ctx, ch.DBS().Reader) - if err != nil { - return nil, err - } - - all, err := ch.DeviceDefinitionOnChainService.GetDeviceDefinitions(ctx, types.NewNullDecimal(decimal.New(int64(dm.TokenID), 0)), qry.DeviceDefinitionID, qry.Model, qry.Year, qry.PageIndex, qry.PageSize) - if err != nil { - return nil, err - } - - response := &grpc.GetDeviceDefinitionResponse{} - for _, v := range all { - dd, err := common.BuildFromDeviceDefinitionToQueryResult(&v, &coremodels.DeviceMake{ - ID: dmDb.ID, - Name: dm.Name, - LogoURL: dmDb.LogoURL, - OemPlatformName: dmDb.OemPlatformName, - NameSlug: dmDb.NameSlug, - CreatedAt: dmDb.CreatedAt, - UpdatedAt: dmDb.UpdatedAt, - }, nil, nil) - if err != nil { - return nil, err - } - - rp := common.BuildFromQueryResultToGRPC(dd) - - response.DeviceDefinitions = append(response.DeviceDefinitions, rp) - } - - return response, nil -} - -/* - - */ diff --git a/internal/core/queries/get_dm_all.go b/internal/core/queries/get_dm_all.go deleted file mode 100644 index 5e88a52a..00000000 --- a/internal/core/queries/get_dm_all.go +++ /dev/null @@ -1,60 +0,0 @@ -package queries - -import ( - "context" - "fmt" - - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/DIMO-Network/device-definitions-api/internal/core/common" - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - p_grpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" - "github.com/DIMO-Network/shared/pkg/db" -) - -type GetAllDeviceMakeQuery struct { -} - -func (*GetAllDeviceMakeQuery) Key() string { return "GetAllDeviceMakeQuery" } - -type GetAllDeviceMakeQueryHandler struct { - DBS func() *db.ReaderWriter -} - -func NewGetAllDeviceMakeQueryHandler(dbs func() *db.ReaderWriter) GetAllDeviceMakeQueryHandler { - return GetAllDeviceMakeQueryHandler{DBS: dbs} -} - -func (ch GetAllDeviceMakeQueryHandler) Handle(ctx context.Context, _ mediator.Message) (interface{}, error) { - - all, err := models.DeviceMakes().All(ctx, ch.DBS().Reader) - if err != nil { - return nil, &exceptions.InternalError{ - Err: fmt.Errorf("failed to get device makes"), - } - } - result := &p_grpc.GetDeviceMakeResponse{ - DeviceMakes: make([]*p_grpc.DeviceMake, len(all)), - } - - for i, v := range all { - md := &coremodels.DeviceMakeMetadata{} - _ = v.Metadata.Unmarshal(md) - - result.DeviceMakes[i] = &p_grpc.DeviceMake{ - Id: v.ID, - Name: v.Name, - LogoUrl: v.LogoURL.String, - OemPlatformName: v.OemPlatformName.String, - NameSlug: v.NameSlug, - Metadata: common.DeviceMakeMetadataToGRPC(md), - CreatedAt: timestamppb.New(v.CreatedAt), - UpdatedAt: timestamppb.New(v.UpdatedAt), - } - } - - return result, nil -} diff --git a/internal/core/queries/get_dm_by_slug.go b/internal/core/queries/get_dm_by_slug.go deleted file mode 100644 index 655f76fc..00000000 --- a/internal/core/queries/get_dm_by_slug.go +++ /dev/null @@ -1,44 +0,0 @@ -package queries - -import ( - "context" - - coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/shared/pkg/db" -) - -type GetDeviceMakeBySlugQuery struct { - Slug string `json:"slug"` -} - -func (*GetDeviceMakeBySlugQuery) Key() string { return "GetDeviceMakeBySlugQuery" } - -type GetDeviceMakeBySlugQueryHandler struct { - DBS func() *db.ReaderWriter -} - -func NewGetDeviceMakeBySlugQueryHandler(dbs func() *db.ReaderWriter) GetDeviceMakeBySlugQueryHandler { - return GetDeviceMakeBySlugQueryHandler{DBS: dbs} -} - -func (ch GetDeviceMakeBySlugQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - qry := query.(*GetDeviceMakeBySlugQuery) - - dm, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(qry.Slug)).One(ctx, ch.DBS().Reader) - if err != nil { - return nil, &exceptions.InternalError{Err: err} - } - cdm := &coremodels.DeviceMake{ - ID: dm.ID, - Name: dm.Name, - NameSlug: dm.NameSlug, - LogoURL: dm.LogoURL, - OemPlatformName: dm.OemPlatformName, - } - - return cdm, nil -} diff --git a/internal/core/queries/get_dm_by_token_id.go b/internal/core/queries/get_dm_by_token_id.go deleted file mode 100644 index 9c87c231..00000000 --- a/internal/core/queries/get_dm_by_token_id.go +++ /dev/null @@ -1,72 +0,0 @@ -package queries - -import ( - "context" - "fmt" - "math/big" - "strings" - - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - - "github.com/DIMO-Network/device-definitions-api/internal/contracts" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - p_grpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" - "github.com/DIMO-Network/shared/pkg/db" -) - -type GetDeviceMakeByTokenIDQuery struct { - TokenID string `json:"tokenId"` -} - -func (*GetDeviceMakeByTokenIDQuery) Key() string { return "GetDeviceMakeByTokenIDQuery" } - -type GetDeviceMakeByTokenIDQueryHandler struct { - DBS func() *db.ReaderWriter - queryInstance *contracts.Registry -} - -func NewGetDeviceMakeByTokenIDQueryHandler(dbs func() *db.ReaderWriter, registryInstance *contracts.Registry) GetDeviceMakeByTokenIDQueryHandler { - return GetDeviceMakeByTokenIDQueryHandler{DBS: dbs, queryInstance: registryInstance} -} - -func (ch GetDeviceMakeByTokenIDQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) { - - qry := query.(*GetDeviceMakeByTokenIDQuery) - qry.TokenID = strings.TrimSpace(qry.TokenID) - - ti, ok := new(big.Int).SetString(qry.TokenID, 10) - if !ok { - return nil, &exceptions.ValidationError{ - Err: fmt.Errorf("couldn't parse token id"), - } - } - - manufName, err := ch.queryInstance.GetManufacturerNameById(&bind.CallOpts{Context: ctx, Pending: true}, ti) - if err != nil { - return nil, &exceptions.InternalError{ - Err: fmt.Errorf("failed to get manufacturer name by token id: %s", qry.TokenID), - } - } - - dm, err := models.DeviceMakes(models.DeviceMakeWhere.Name.EQ(manufName)).One(ctx, ch.DBS().Reader) - if err != nil { - return nil, &exceptions.InternalError{Err: err} - } - - result := &p_grpc.DeviceMake{ - Id: dm.ID, - Name: dm.Name, - LogoUrl: dm.LogoURL.String, - OemPlatformName: dm.OemPlatformName.String, - NameSlug: dm.NameSlug, - TokenId: ti.Uint64(), - CreatedAt: timestamppb.New(dm.CreatedAt), - UpdatedAt: timestamppb.New(dm.UpdatedAt), - } - - return result, nil -} diff --git a/internal/infrastructure/db/migrations/20250611151326_drop_device_makes.sql b/internal/infrastructure/db/migrations/20250611151326_drop_device_makes.sql new file mode 100644 index 00000000..4b3c95c2 --- /dev/null +++ b/internal/infrastructure/db/migrations/20250611151326_drop_device_makes.sql @@ -0,0 +1,12 @@ +-- +goose Up +-- +goose StatementBegin +SELECT 'up SQL query'; +drop table device_definitions_api.device_makes; + +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +SELECT 'down SQL query'; +-- no going back +-- +goose StatementEnd diff --git a/internal/infrastructure/db/models/boil_table_names.go b/internal/infrastructure/db/models/boil_table_names.go index 784bcb21..359ee952 100644 --- a/internal/infrastructure/db/models/boil_table_names.go +++ b/internal/infrastructure/db/models/boil_table_names.go @@ -6,7 +6,6 @@ package models var TableNames = struct { DefinitionTransactions string DeviceIntegrations string - DeviceMakes string DeviceStyles string DeviceTypes string Images string @@ -17,7 +16,6 @@ var TableNames = struct { }{ DefinitionTransactions: "definition_transactions", DeviceIntegrations: "device_integrations", - DeviceMakes: "device_makes", DeviceStyles: "device_styles", DeviceTypes: "device_types", Images: "images", diff --git a/internal/infrastructure/db/models/device_makes.go b/internal/infrastructure/db/models/device_makes.go deleted file mode 100644 index 3102e048..00000000 --- a/internal/infrastructure/db/models/device_makes.go +++ /dev/null @@ -1,1065 +0,0 @@ -// Code generated by SQLBoiler 4.18.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT. -// This file is meant to be re-generated in place and/or deleted at any time. - -package models - -import ( - "context" - "database/sql" - "fmt" - "reflect" - "strconv" - "strings" - "sync" - "time" - - "github.com/friendsofgo/errors" - "github.com/volatiletech/null/v8" - "github.com/volatiletech/sqlboiler/v4/boil" - "github.com/volatiletech/sqlboiler/v4/queries" - "github.com/volatiletech/sqlboiler/v4/queries/qm" - "github.com/volatiletech/sqlboiler/v4/queries/qmhelper" - "github.com/volatiletech/strmangle" -) - -// DeviceMake is an object representing the database table. -type DeviceMake struct { - ID string `boil:"id" json:"id" toml:"id" yaml:"id"` - Name string `boil:"name" json:"name" toml:"name" yaml:"name"` - ExternalIds null.JSON `boil:"external_ids" json:"external_ids,omitempty" toml:"external_ids" yaml:"external_ids,omitempty"` - CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` - UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` - LogoURL null.String `boil:"logo_url" json:"logo_url,omitempty" toml:"logo_url" yaml:"logo_url,omitempty"` - OemPlatformName null.String `boil:"oem_platform_name" json:"oem_platform_name,omitempty" toml:"oem_platform_name" yaml:"oem_platform_name,omitempty"` - NameSlug string `boil:"name_slug" json:"name_slug" toml:"name_slug" yaml:"name_slug"` - Metadata null.JSON `boil:"metadata" json:"metadata,omitempty" toml:"metadata" yaml:"metadata,omitempty"` - HardwareTemplateID null.String `boil:"hardware_template_id" json:"hardware_template_id,omitempty" toml:"hardware_template_id" yaml:"hardware_template_id,omitempty"` - - R *deviceMakeR `boil:"-" json:"-" toml:"-" yaml:"-"` - L deviceMakeL `boil:"-" json:"-" toml:"-" yaml:"-"` -} - -var DeviceMakeColumns = struct { - ID string - Name string - ExternalIds string - CreatedAt string - UpdatedAt string - LogoURL string - OemPlatformName string - NameSlug string - Metadata string - HardwareTemplateID string -}{ - ID: "id", - Name: "name", - ExternalIds: "external_ids", - CreatedAt: "created_at", - UpdatedAt: "updated_at", - LogoURL: "logo_url", - OemPlatformName: "oem_platform_name", - NameSlug: "name_slug", - Metadata: "metadata", - HardwareTemplateID: "hardware_template_id", -} - -var DeviceMakeTableColumns = struct { - ID string - Name string - ExternalIds string - CreatedAt string - UpdatedAt string - LogoURL string - OemPlatformName string - NameSlug string - Metadata string - HardwareTemplateID string -}{ - ID: "device_makes.id", - Name: "device_makes.name", - ExternalIds: "device_makes.external_ids", - CreatedAt: "device_makes.created_at", - UpdatedAt: "device_makes.updated_at", - LogoURL: "device_makes.logo_url", - OemPlatformName: "device_makes.oem_platform_name", - NameSlug: "device_makes.name_slug", - Metadata: "device_makes.metadata", - HardwareTemplateID: "device_makes.hardware_template_id", -} - -// Generated where - -type whereHelpernull_String struct{ field string } - -func (w whereHelpernull_String) EQ(x null.String) qm.QueryMod { - return qmhelper.WhereNullEQ(w.field, false, x) -} -func (w whereHelpernull_String) NEQ(x null.String) qm.QueryMod { - return qmhelper.WhereNullEQ(w.field, true, x) -} -func (w whereHelpernull_String) LT(x null.String) qm.QueryMod { - return qmhelper.Where(w.field, qmhelper.LT, x) -} -func (w whereHelpernull_String) LTE(x null.String) qm.QueryMod { - return qmhelper.Where(w.field, qmhelper.LTE, x) -} -func (w whereHelpernull_String) GT(x null.String) qm.QueryMod { - return qmhelper.Where(w.field, qmhelper.GT, x) -} -func (w whereHelpernull_String) GTE(x null.String) qm.QueryMod { - return qmhelper.Where(w.field, qmhelper.GTE, x) -} -func (w whereHelpernull_String) LIKE(x null.String) qm.QueryMod { - return qm.Where(w.field+" LIKE ?", x) -} -func (w whereHelpernull_String) NLIKE(x null.String) qm.QueryMod { - return qm.Where(w.field+" NOT LIKE ?", x) -} -func (w whereHelpernull_String) ILIKE(x null.String) qm.QueryMod { - return qm.Where(w.field+" ILIKE ?", x) -} -func (w whereHelpernull_String) NILIKE(x null.String) qm.QueryMod { - return qm.Where(w.field+" NOT ILIKE ?", x) -} -func (w whereHelpernull_String) SIMILAR(x null.String) qm.QueryMod { - return qm.Where(w.field+" SIMILAR TO ?", x) -} -func (w whereHelpernull_String) NSIMILAR(x null.String) qm.QueryMod { - return qm.Where(w.field+" NOT SIMILAR TO ?", x) -} -func (w whereHelpernull_String) IN(slice []string) qm.QueryMod { - values := make([]interface{}, 0, len(slice)) - for _, value := range slice { - values = append(values, value) - } - return qm.WhereIn(fmt.Sprintf("%s IN ?", w.field), values...) -} -func (w whereHelpernull_String) NIN(slice []string) qm.QueryMod { - values := make([]interface{}, 0, len(slice)) - for _, value := range slice { - values = append(values, value) - } - return qm.WhereNotIn(fmt.Sprintf("%s NOT IN ?", w.field), values...) -} - -func (w whereHelpernull_String) IsNull() qm.QueryMod { return qmhelper.WhereIsNull(w.field) } -func (w whereHelpernull_String) IsNotNull() qm.QueryMod { return qmhelper.WhereIsNotNull(w.field) } - -var DeviceMakeWhere = struct { - ID whereHelperstring - Name whereHelperstring - ExternalIds whereHelpernull_JSON - CreatedAt whereHelpertime_Time - UpdatedAt whereHelpertime_Time - LogoURL whereHelpernull_String - OemPlatformName whereHelpernull_String - NameSlug whereHelperstring - Metadata whereHelpernull_JSON - HardwareTemplateID whereHelpernull_String -}{ - ID: whereHelperstring{field: "\"device_definitions_api\".\"device_makes\".\"id\""}, - Name: whereHelperstring{field: "\"device_definitions_api\".\"device_makes\".\"name\""}, - ExternalIds: whereHelpernull_JSON{field: "\"device_definitions_api\".\"device_makes\".\"external_ids\""}, - CreatedAt: whereHelpertime_Time{field: "\"device_definitions_api\".\"device_makes\".\"created_at\""}, - UpdatedAt: whereHelpertime_Time{field: "\"device_definitions_api\".\"device_makes\".\"updated_at\""}, - LogoURL: whereHelpernull_String{field: "\"device_definitions_api\".\"device_makes\".\"logo_url\""}, - OemPlatformName: whereHelpernull_String{field: "\"device_definitions_api\".\"device_makes\".\"oem_platform_name\""}, - NameSlug: whereHelperstring{field: "\"device_definitions_api\".\"device_makes\".\"name_slug\""}, - Metadata: whereHelpernull_JSON{field: "\"device_definitions_api\".\"device_makes\".\"metadata\""}, - HardwareTemplateID: whereHelpernull_String{field: "\"device_definitions_api\".\"device_makes\".\"hardware_template_id\""}, -} - -// DeviceMakeRels is where relationship names are stored. -var DeviceMakeRels = struct { -}{} - -// deviceMakeR is where relationships are stored. -type deviceMakeR struct { -} - -// NewStruct creates a new relationship struct -func (*deviceMakeR) NewStruct() *deviceMakeR { - return &deviceMakeR{} -} - -// deviceMakeL is where Load methods for each relationship are stored. -type deviceMakeL struct{} - -var ( - deviceMakeAllColumns = []string{"id", "name", "external_ids", "created_at", "updated_at", "logo_url", "oem_platform_name", "name_slug", "metadata", "hardware_template_id"} - deviceMakeColumnsWithoutDefault = []string{"id", "name", "name_slug"} - deviceMakeColumnsWithDefault = []string{"external_ids", "created_at", "updated_at", "logo_url", "oem_platform_name", "metadata", "hardware_template_id"} - deviceMakePrimaryKeyColumns = []string{"id"} - deviceMakeGeneratedColumns = []string{} -) - -type ( - // DeviceMakeSlice is an alias for a slice of pointers to DeviceMake. - // This should almost always be used instead of []DeviceMake. - DeviceMakeSlice []*DeviceMake - // DeviceMakeHook is the signature for custom DeviceMake hook methods - DeviceMakeHook func(context.Context, boil.ContextExecutor, *DeviceMake) error - - deviceMakeQuery struct { - *queries.Query - } -) - -// Cache for insert, update and upsert -var ( - deviceMakeType = reflect.TypeOf(&DeviceMake{}) - deviceMakeMapping = queries.MakeStructMapping(deviceMakeType) - deviceMakePrimaryKeyMapping, _ = queries.BindMapping(deviceMakeType, deviceMakeMapping, deviceMakePrimaryKeyColumns) - deviceMakeInsertCacheMut sync.RWMutex - deviceMakeInsertCache = make(map[string]insertCache) - deviceMakeUpdateCacheMut sync.RWMutex - deviceMakeUpdateCache = make(map[string]updateCache) - deviceMakeUpsertCacheMut sync.RWMutex - deviceMakeUpsertCache = make(map[string]insertCache) -) - -var ( - // Force time package dependency for automated UpdatedAt/CreatedAt. - _ = time.Second - // Force qmhelper dependency for where clause generation (which doesn't - // always happen) - _ = qmhelper.Where -) - -var deviceMakeAfterSelectMu sync.Mutex -var deviceMakeAfterSelectHooks []DeviceMakeHook - -var deviceMakeBeforeInsertMu sync.Mutex -var deviceMakeBeforeInsertHooks []DeviceMakeHook -var deviceMakeAfterInsertMu sync.Mutex -var deviceMakeAfterInsertHooks []DeviceMakeHook - -var deviceMakeBeforeUpdateMu sync.Mutex -var deviceMakeBeforeUpdateHooks []DeviceMakeHook -var deviceMakeAfterUpdateMu sync.Mutex -var deviceMakeAfterUpdateHooks []DeviceMakeHook - -var deviceMakeBeforeDeleteMu sync.Mutex -var deviceMakeBeforeDeleteHooks []DeviceMakeHook -var deviceMakeAfterDeleteMu sync.Mutex -var deviceMakeAfterDeleteHooks []DeviceMakeHook - -var deviceMakeBeforeUpsertMu sync.Mutex -var deviceMakeBeforeUpsertHooks []DeviceMakeHook -var deviceMakeAfterUpsertMu sync.Mutex -var deviceMakeAfterUpsertHooks []DeviceMakeHook - -// doAfterSelectHooks executes all "after Select" hooks. -func (o *DeviceMake) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeAfterSelectHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doBeforeInsertHooks executes all "before insert" hooks. -func (o *DeviceMake) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeBeforeInsertHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doAfterInsertHooks executes all "after Insert" hooks. -func (o *DeviceMake) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeAfterInsertHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doBeforeUpdateHooks executes all "before Update" hooks. -func (o *DeviceMake) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeBeforeUpdateHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doAfterUpdateHooks executes all "after Update" hooks. -func (o *DeviceMake) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeAfterUpdateHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doBeforeDeleteHooks executes all "before Delete" hooks. -func (o *DeviceMake) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeBeforeDeleteHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doAfterDeleteHooks executes all "after Delete" hooks. -func (o *DeviceMake) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeAfterDeleteHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doBeforeUpsertHooks executes all "before Upsert" hooks. -func (o *DeviceMake) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeBeforeUpsertHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// doAfterUpsertHooks executes all "after Upsert" hooks. -func (o *DeviceMake) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) { - if boil.HooksAreSkipped(ctx) { - return nil - } - - for _, hook := range deviceMakeAfterUpsertHooks { - if err := hook(ctx, exec, o); err != nil { - return err - } - } - - return nil -} - -// AddDeviceMakeHook registers your hook function for all future operations. -func AddDeviceMakeHook(hookPoint boil.HookPoint, deviceMakeHook DeviceMakeHook) { - switch hookPoint { - case boil.AfterSelectHook: - deviceMakeAfterSelectMu.Lock() - deviceMakeAfterSelectHooks = append(deviceMakeAfterSelectHooks, deviceMakeHook) - deviceMakeAfterSelectMu.Unlock() - case boil.BeforeInsertHook: - deviceMakeBeforeInsertMu.Lock() - deviceMakeBeforeInsertHooks = append(deviceMakeBeforeInsertHooks, deviceMakeHook) - deviceMakeBeforeInsertMu.Unlock() - case boil.AfterInsertHook: - deviceMakeAfterInsertMu.Lock() - deviceMakeAfterInsertHooks = append(deviceMakeAfterInsertHooks, deviceMakeHook) - deviceMakeAfterInsertMu.Unlock() - case boil.BeforeUpdateHook: - deviceMakeBeforeUpdateMu.Lock() - deviceMakeBeforeUpdateHooks = append(deviceMakeBeforeUpdateHooks, deviceMakeHook) - deviceMakeBeforeUpdateMu.Unlock() - case boil.AfterUpdateHook: - deviceMakeAfterUpdateMu.Lock() - deviceMakeAfterUpdateHooks = append(deviceMakeAfterUpdateHooks, deviceMakeHook) - deviceMakeAfterUpdateMu.Unlock() - case boil.BeforeDeleteHook: - deviceMakeBeforeDeleteMu.Lock() - deviceMakeBeforeDeleteHooks = append(deviceMakeBeforeDeleteHooks, deviceMakeHook) - deviceMakeBeforeDeleteMu.Unlock() - case boil.AfterDeleteHook: - deviceMakeAfterDeleteMu.Lock() - deviceMakeAfterDeleteHooks = append(deviceMakeAfterDeleteHooks, deviceMakeHook) - deviceMakeAfterDeleteMu.Unlock() - case boil.BeforeUpsertHook: - deviceMakeBeforeUpsertMu.Lock() - deviceMakeBeforeUpsertHooks = append(deviceMakeBeforeUpsertHooks, deviceMakeHook) - deviceMakeBeforeUpsertMu.Unlock() - case boil.AfterUpsertHook: - deviceMakeAfterUpsertMu.Lock() - deviceMakeAfterUpsertHooks = append(deviceMakeAfterUpsertHooks, deviceMakeHook) - deviceMakeAfterUpsertMu.Unlock() - } -} - -// One returns a single deviceMake record from the query. -func (q deviceMakeQuery) One(ctx context.Context, exec boil.ContextExecutor) (*DeviceMake, error) { - o := &DeviceMake{} - - queries.SetLimit(q.Query, 1) - - err := q.Bind(ctx, exec, o) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil, sql.ErrNoRows - } - return nil, errors.Wrap(err, "models: failed to execute a one query for device_makes") - } - - if err := o.doAfterSelectHooks(ctx, exec); err != nil { - return o, err - } - - return o, nil -} - -// All returns all DeviceMake records from the query. -func (q deviceMakeQuery) All(ctx context.Context, exec boil.ContextExecutor) (DeviceMakeSlice, error) { - var o []*DeviceMake - - err := q.Bind(ctx, exec, &o) - if err != nil { - return nil, errors.Wrap(err, "models: failed to assign all query results to DeviceMake slice") - } - - if len(deviceMakeAfterSelectHooks) != 0 { - for _, obj := range o { - if err := obj.doAfterSelectHooks(ctx, exec); err != nil { - return o, err - } - } - } - - return o, nil -} - -// Count returns the count of all DeviceMake records in the query. -func (q deviceMakeQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) { - var count int64 - - queries.SetSelect(q.Query, nil) - queries.SetCount(q.Query) - - err := q.Query.QueryRowContext(ctx, exec).Scan(&count) - if err != nil { - return 0, errors.Wrap(err, "models: failed to count device_makes rows") - } - - return count, nil -} - -// Exists checks if the row exists in the table. -func (q deviceMakeQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) { - var count int64 - - queries.SetSelect(q.Query, nil) - queries.SetCount(q.Query) - queries.SetLimit(q.Query, 1) - - err := q.Query.QueryRowContext(ctx, exec).Scan(&count) - if err != nil { - return false, errors.Wrap(err, "models: failed to check if device_makes exists") - } - - return count > 0, nil -} - -// DeviceMakes retrieves all the records using an executor. -func DeviceMakes(mods ...qm.QueryMod) deviceMakeQuery { - mods = append(mods, qm.From("\"device_definitions_api\".\"device_makes\"")) - q := NewQuery(mods...) - if len(queries.GetSelect(q)) == 0 { - queries.SetSelect(q, []string{"\"device_definitions_api\".\"device_makes\".*"}) - } - - return deviceMakeQuery{q} -} - -// FindDeviceMake retrieves a single record by ID with an executor. -// If selectCols is empty Find will return all columns. -func FindDeviceMake(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*DeviceMake, error) { - deviceMakeObj := &DeviceMake{} - - sel := "*" - if len(selectCols) > 0 { - sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",") - } - query := fmt.Sprintf( - "select %s from \"device_definitions_api\".\"device_makes\" where \"id\"=$1", sel, - ) - - q := queries.Raw(query, iD) - - err := q.Bind(ctx, exec, deviceMakeObj) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil, sql.ErrNoRows - } - return nil, errors.Wrap(err, "models: unable to select from device_makes") - } - - if err = deviceMakeObj.doAfterSelectHooks(ctx, exec); err != nil { - return deviceMakeObj, err - } - - return deviceMakeObj, nil -} - -// Insert a single record using an executor. -// See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts. -func (o *DeviceMake) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error { - if o == nil { - return errors.New("models: no device_makes provided for insertion") - } - - var err error - if !boil.TimestampsAreSkipped(ctx) { - currTime := time.Now().In(boil.GetLocation()) - - if o.CreatedAt.IsZero() { - o.CreatedAt = currTime - } - if o.UpdatedAt.IsZero() { - o.UpdatedAt = currTime - } - } - - if err := o.doBeforeInsertHooks(ctx, exec); err != nil { - return err - } - - nzDefaults := queries.NonZeroDefaultSet(deviceMakeColumnsWithDefault, o) - - key := makeCacheKey(columns, nzDefaults) - deviceMakeInsertCacheMut.RLock() - cache, cached := deviceMakeInsertCache[key] - deviceMakeInsertCacheMut.RUnlock() - - if !cached { - wl, returnColumns := columns.InsertColumnSet( - deviceMakeAllColumns, - deviceMakeColumnsWithDefault, - deviceMakeColumnsWithoutDefault, - nzDefaults, - ) - - cache.valueMapping, err = queries.BindMapping(deviceMakeType, deviceMakeMapping, wl) - if err != nil { - return err - } - cache.retMapping, err = queries.BindMapping(deviceMakeType, deviceMakeMapping, returnColumns) - if err != nil { - return err - } - if len(wl) != 0 { - cache.query = fmt.Sprintf("INSERT INTO \"device_definitions_api\".\"device_makes\" (\"%s\") %%sVALUES (%s)%%s", strings.Join(wl, "\",\""), strmangle.Placeholders(dialect.UseIndexPlaceholders, len(wl), 1, 1)) - } else { - cache.query = "INSERT INTO \"device_definitions_api\".\"device_makes\" %sDEFAULT VALUES%s" - } - - var queryOutput, queryReturning string - - if len(cache.retMapping) != 0 { - queryReturning = fmt.Sprintf(" RETURNING \"%s\"", strings.Join(returnColumns, "\",\"")) - } - - cache.query = fmt.Sprintf(cache.query, queryOutput, queryReturning) - } - - value := reflect.Indirect(reflect.ValueOf(o)) - vals := queries.ValuesFromMapping(value, cache.valueMapping) - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, cache.query) - fmt.Fprintln(writer, vals) - } - - if len(cache.retMapping) != 0 { - err = exec.QueryRowContext(ctx, cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...) - } else { - _, err = exec.ExecContext(ctx, cache.query, vals...) - } - - if err != nil { - return errors.Wrap(err, "models: unable to insert into device_makes") - } - - if !cached { - deviceMakeInsertCacheMut.Lock() - deviceMakeInsertCache[key] = cache - deviceMakeInsertCacheMut.Unlock() - } - - return o.doAfterInsertHooks(ctx, exec) -} - -// Update uses an executor to update the DeviceMake. -// See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. -// Update does not automatically update the record in case of default values. Use .Reload() to refresh the records. -func (o *DeviceMake) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error) { - if !boil.TimestampsAreSkipped(ctx) { - currTime := time.Now().In(boil.GetLocation()) - - o.UpdatedAt = currTime - } - - var err error - if err = o.doBeforeUpdateHooks(ctx, exec); err != nil { - return 0, err - } - key := makeCacheKey(columns, nil) - deviceMakeUpdateCacheMut.RLock() - cache, cached := deviceMakeUpdateCache[key] - deviceMakeUpdateCacheMut.RUnlock() - - if !cached { - wl := columns.UpdateColumnSet( - deviceMakeAllColumns, - deviceMakePrimaryKeyColumns, - ) - - if !columns.IsWhitelist() { - wl = strmangle.SetComplement(wl, []string{"created_at"}) - } - if len(wl) == 0 { - return 0, errors.New("models: unable to update device_makes, could not build whitelist") - } - - cache.query = fmt.Sprintf("UPDATE \"device_definitions_api\".\"device_makes\" SET %s WHERE %s", - strmangle.SetParamNames("\"", "\"", 1, wl), - strmangle.WhereClause("\"", "\"", len(wl)+1, deviceMakePrimaryKeyColumns), - ) - cache.valueMapping, err = queries.BindMapping(deviceMakeType, deviceMakeMapping, append(wl, deviceMakePrimaryKeyColumns...)) - if err != nil { - return 0, err - } - } - - values := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping) - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, cache.query) - fmt.Fprintln(writer, values) - } - var result sql.Result - result, err = exec.ExecContext(ctx, cache.query, values...) - if err != nil { - return 0, errors.Wrap(err, "models: unable to update device_makes row") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: failed to get rows affected by update for device_makes") - } - - if !cached { - deviceMakeUpdateCacheMut.Lock() - deviceMakeUpdateCache[key] = cache - deviceMakeUpdateCacheMut.Unlock() - } - - return rowsAff, o.doAfterUpdateHooks(ctx, exec) -} - -// UpdateAll updates all rows with the specified column values. -func (q deviceMakeQuery) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error) { - queries.SetUpdate(q.Query, cols) - - result, err := q.Query.ExecContext(ctx, exec) - if err != nil { - return 0, errors.Wrap(err, "models: unable to update all for device_makes") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: unable to retrieve rows affected for device_makes") - } - - return rowsAff, nil -} - -// UpdateAll updates all rows with the specified column values, using an executor. -func (o DeviceMakeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error) { - ln := int64(len(o)) - if ln == 0 { - return 0, nil - } - - if len(cols) == 0 { - return 0, errors.New("models: update all requires at least one column argument") - } - - colNames := make([]string, len(cols)) - args := make([]interface{}, len(cols)) - - i := 0 - for name, value := range cols { - colNames[i] = name - args[i] = value - i++ - } - - // Append all of the primary key values for each column - for _, obj := range o { - pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), deviceMakePrimaryKeyMapping) - args = append(args, pkeyArgs...) - } - - sql := fmt.Sprintf("UPDATE \"device_definitions_api\".\"device_makes\" SET %s WHERE %s", - strmangle.SetParamNames("\"", "\"", 1, colNames), - strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), len(colNames)+1, deviceMakePrimaryKeyColumns, len(o))) - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, sql) - fmt.Fprintln(writer, args...) - } - result, err := exec.ExecContext(ctx, sql, args...) - if err != nil { - return 0, errors.Wrap(err, "models: unable to update all in deviceMake slice") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: unable to retrieve rows affected all in update all deviceMake") - } - return rowsAff, nil -} - -// Upsert attempts an insert using an executor, and does an update or ignore on conflict. -// See boil.Columns documentation for how to properly use updateColumns and insertColumns. -func (o *DeviceMake) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error { - if o == nil { - return errors.New("models: no device_makes provided for upsert") - } - if !boil.TimestampsAreSkipped(ctx) { - currTime := time.Now().In(boil.GetLocation()) - - if o.CreatedAt.IsZero() { - o.CreatedAt = currTime - } - o.UpdatedAt = currTime - } - - if err := o.doBeforeUpsertHooks(ctx, exec); err != nil { - return err - } - - nzDefaults := queries.NonZeroDefaultSet(deviceMakeColumnsWithDefault, o) - - // Build cache key in-line uglily - mysql vs psql problems - buf := strmangle.GetBuffer() - if updateOnConflict { - buf.WriteByte('t') - } else { - buf.WriteByte('f') - } - buf.WriteByte('.') - for _, c := range conflictColumns { - buf.WriteString(c) - } - buf.WriteByte('.') - buf.WriteString(strconv.Itoa(updateColumns.Kind)) - for _, c := range updateColumns.Cols { - buf.WriteString(c) - } - buf.WriteByte('.') - buf.WriteString(strconv.Itoa(insertColumns.Kind)) - for _, c := range insertColumns.Cols { - buf.WriteString(c) - } - buf.WriteByte('.') - for _, c := range nzDefaults { - buf.WriteString(c) - } - key := buf.String() - strmangle.PutBuffer(buf) - - deviceMakeUpsertCacheMut.RLock() - cache, cached := deviceMakeUpsertCache[key] - deviceMakeUpsertCacheMut.RUnlock() - - var err error - - if !cached { - insert, _ := insertColumns.InsertColumnSet( - deviceMakeAllColumns, - deviceMakeColumnsWithDefault, - deviceMakeColumnsWithoutDefault, - nzDefaults, - ) - - update := updateColumns.UpdateColumnSet( - deviceMakeAllColumns, - deviceMakePrimaryKeyColumns, - ) - - if updateOnConflict && len(update) == 0 { - return errors.New("models: unable to upsert device_makes, could not build update column list") - } - - ret := strmangle.SetComplement(deviceMakeAllColumns, strmangle.SetIntersect(insert, update)) - - conflict := conflictColumns - if len(conflict) == 0 && updateOnConflict && len(update) != 0 { - if len(deviceMakePrimaryKeyColumns) == 0 { - return errors.New("models: unable to upsert device_makes, could not build conflict column list") - } - - conflict = make([]string, len(deviceMakePrimaryKeyColumns)) - copy(conflict, deviceMakePrimaryKeyColumns) - } - cache.query = buildUpsertQueryPostgres(dialect, "\"device_definitions_api\".\"device_makes\"", updateOnConflict, ret, update, conflict, insert, opts...) - - cache.valueMapping, err = queries.BindMapping(deviceMakeType, deviceMakeMapping, insert) - if err != nil { - return err - } - if len(ret) != 0 { - cache.retMapping, err = queries.BindMapping(deviceMakeType, deviceMakeMapping, ret) - if err != nil { - return err - } - } - } - - value := reflect.Indirect(reflect.ValueOf(o)) - vals := queries.ValuesFromMapping(value, cache.valueMapping) - var returns []interface{} - if len(cache.retMapping) != 0 { - returns = queries.PtrsFromMapping(value, cache.retMapping) - } - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, cache.query) - fmt.Fprintln(writer, vals) - } - if len(cache.retMapping) != 0 { - err = exec.QueryRowContext(ctx, cache.query, vals...).Scan(returns...) - if errors.Is(err, sql.ErrNoRows) { - err = nil // Postgres doesn't return anything when there's no update - } - } else { - _, err = exec.ExecContext(ctx, cache.query, vals...) - } - if err != nil { - return errors.Wrap(err, "models: unable to upsert device_makes") - } - - if !cached { - deviceMakeUpsertCacheMut.Lock() - deviceMakeUpsertCache[key] = cache - deviceMakeUpsertCacheMut.Unlock() - } - - return o.doAfterUpsertHooks(ctx, exec) -} - -// Delete deletes a single DeviceMake record with an executor. -// Delete will match against the primary key column to find the record to delete. -func (o *DeviceMake) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error) { - if o == nil { - return 0, errors.New("models: no DeviceMake provided for delete") - } - - if err := o.doBeforeDeleteHooks(ctx, exec); err != nil { - return 0, err - } - - args := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), deviceMakePrimaryKeyMapping) - sql := "DELETE FROM \"device_definitions_api\".\"device_makes\" WHERE \"id\"=$1" - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, sql) - fmt.Fprintln(writer, args...) - } - result, err := exec.ExecContext(ctx, sql, args...) - if err != nil { - return 0, errors.Wrap(err, "models: unable to delete from device_makes") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: failed to get rows affected by delete for device_makes") - } - - if err := o.doAfterDeleteHooks(ctx, exec); err != nil { - return 0, err - } - - return rowsAff, nil -} - -// DeleteAll deletes all matching rows. -func (q deviceMakeQuery) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error) { - if q.Query == nil { - return 0, errors.New("models: no deviceMakeQuery provided for delete all") - } - - queries.SetDelete(q.Query) - - result, err := q.Query.ExecContext(ctx, exec) - if err != nil { - return 0, errors.Wrap(err, "models: unable to delete all from device_makes") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: failed to get rows affected by deleteall for device_makes") - } - - return rowsAff, nil -} - -// DeleteAll deletes all rows in the slice, using an executor. -func (o DeviceMakeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error) { - if len(o) == 0 { - return 0, nil - } - - if len(deviceMakeBeforeDeleteHooks) != 0 { - for _, obj := range o { - if err := obj.doBeforeDeleteHooks(ctx, exec); err != nil { - return 0, err - } - } - } - - var args []interface{} - for _, obj := range o { - pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), deviceMakePrimaryKeyMapping) - args = append(args, pkeyArgs...) - } - - sql := "DELETE FROM \"device_definitions_api\".\"device_makes\" WHERE " + - strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, deviceMakePrimaryKeyColumns, len(o)) - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, sql) - fmt.Fprintln(writer, args) - } - result, err := exec.ExecContext(ctx, sql, args...) - if err != nil { - return 0, errors.Wrap(err, "models: unable to delete all from deviceMake slice") - } - - rowsAff, err := result.RowsAffected() - if err != nil { - return 0, errors.Wrap(err, "models: failed to get rows affected by deleteall for device_makes") - } - - if len(deviceMakeAfterDeleteHooks) != 0 { - for _, obj := range o { - if err := obj.doAfterDeleteHooks(ctx, exec); err != nil { - return 0, err - } - } - } - - return rowsAff, nil -} - -// Reload refetches the object from the database -// using the primary keys with an executor. -func (o *DeviceMake) Reload(ctx context.Context, exec boil.ContextExecutor) error { - ret, err := FindDeviceMake(ctx, exec, o.ID) - if err != nil { - return err - } - - *o = *ret - return nil -} - -// ReloadAll refetches every row with matching primary key column values -// and overwrites the original object slice with the newly updated slice. -func (o *DeviceMakeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error { - if o == nil || len(*o) == 0 { - return nil - } - - slice := DeviceMakeSlice{} - var args []interface{} - for _, obj := range *o { - pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), deviceMakePrimaryKeyMapping) - args = append(args, pkeyArgs...) - } - - sql := "SELECT \"device_definitions_api\".\"device_makes\".* FROM \"device_definitions_api\".\"device_makes\" WHERE " + - strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, deviceMakePrimaryKeyColumns, len(*o)) - - q := queries.Raw(sql, args...) - - err := q.Bind(ctx, exec, &slice) - if err != nil { - return errors.Wrap(err, "models: unable to reload all in DeviceMakeSlice") - } - - *o = slice - - return nil -} - -// DeviceMakeExists checks if the DeviceMake row exists. -func DeviceMakeExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error) { - var exists bool - sql := "select exists(select 1 from \"device_definitions_api\".\"device_makes\" where \"id\"=$1 limit 1)" - - if boil.IsDebug(ctx) { - writer := boil.DebugWriterFrom(ctx) - fmt.Fprintln(writer, sql) - fmt.Fprintln(writer, iD) - } - row := exec.QueryRowContext(ctx, sql, iD) - - err := row.Scan(&exists) - if err != nil { - return false, errors.Wrap(err, "models: unable to check if device_makes exists") - } - - return exists, nil -} - -// Exists checks if the DeviceMake row exists. -func (o *DeviceMake) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) { - return DeviceMakeExists(ctx, exec, o.ID) -} diff --git a/internal/infrastructure/db/models/device_styles.go b/internal/infrastructure/db/models/device_styles.go index a258438a..02e061b1 100644 --- a/internal/infrastructure/db/models/device_styles.go +++ b/internal/infrastructure/db/models/device_styles.go @@ -89,6 +89,62 @@ var DeviceStyleTableColumns = struct { // Generated where +type whereHelpernull_String struct{ field string } + +func (w whereHelpernull_String) EQ(x null.String) qm.QueryMod { + return qmhelper.WhereNullEQ(w.field, false, x) +} +func (w whereHelpernull_String) NEQ(x null.String) qm.QueryMod { + return qmhelper.WhereNullEQ(w.field, true, x) +} +func (w whereHelpernull_String) LT(x null.String) qm.QueryMod { + return qmhelper.Where(w.field, qmhelper.LT, x) +} +func (w whereHelpernull_String) LTE(x null.String) qm.QueryMod { + return qmhelper.Where(w.field, qmhelper.LTE, x) +} +func (w whereHelpernull_String) GT(x null.String) qm.QueryMod { + return qmhelper.Where(w.field, qmhelper.GT, x) +} +func (w whereHelpernull_String) GTE(x null.String) qm.QueryMod { + return qmhelper.Where(w.field, qmhelper.GTE, x) +} +func (w whereHelpernull_String) LIKE(x null.String) qm.QueryMod { + return qm.Where(w.field+" LIKE ?", x) +} +func (w whereHelpernull_String) NLIKE(x null.String) qm.QueryMod { + return qm.Where(w.field+" NOT LIKE ?", x) +} +func (w whereHelpernull_String) ILIKE(x null.String) qm.QueryMod { + return qm.Where(w.field+" ILIKE ?", x) +} +func (w whereHelpernull_String) NILIKE(x null.String) qm.QueryMod { + return qm.Where(w.field+" NOT ILIKE ?", x) +} +func (w whereHelpernull_String) SIMILAR(x null.String) qm.QueryMod { + return qm.Where(w.field+" SIMILAR TO ?", x) +} +func (w whereHelpernull_String) NSIMILAR(x null.String) qm.QueryMod { + return qm.Where(w.field+" NOT SIMILAR TO ?", x) +} +func (w whereHelpernull_String) IN(slice []string) qm.QueryMod { + values := make([]interface{}, 0, len(slice)) + for _, value := range slice { + values = append(values, value) + } + return qm.WhereIn(fmt.Sprintf("%s IN ?", w.field), values...) +} +func (w whereHelpernull_String) NIN(slice []string) qm.QueryMod { + values := make([]interface{}, 0, len(slice)) + for _, value := range slice { + values = append(values, value) + } + return qm.WhereNotIn(fmt.Sprintf("%s NOT IN ?", w.field), values...) +} + +func (w whereHelpernull_String) IsNull() qm.QueryMod { return qmhelper.WhereIsNull(w.field) } +func (w whereHelpernull_String) IsNotNull() qm.QueryMod { return qmhelper.WhereIsNotNull(w.field) } + var DeviceStyleWhere = struct { ID whereHelperstring Name whereHelperstring diff --git a/internal/infrastructure/dbtest/test_helper.go b/internal/infrastructure/dbtest/test_helper.go index 15f83d24..a933620b 100644 --- a/internal/infrastructure/dbtest/test_helper.go +++ b/internal/infrastructure/dbtest/test_helper.go @@ -5,6 +5,7 @@ import ( "database/sql" _ "embed" "fmt" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "os" "testing" @@ -140,10 +141,10 @@ func TruncateTables(db *sql.DB, t *testing.T) { } } -func SetupCreateDeviceDefinition(t *testing.T, dm models.DeviceMake, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { +func SetupCreateDeviceDefinition(t *testing.T, manufacturerName, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { SetupCreateDeviceType(t, pdb) dd := &coremodels.DeviceDefinitionTablelandModel{ - ID: common.DeviceDefinitionSlug(dm.NameSlug, stringutils.SlugString(model), int16(year)), + ID: common.DeviceDefinitionSlug(stringutils.SlugString(manufacturerName), stringutils.SlugString(model), int16(year)), KSUID: ksuid.New().String(), Model: model, Year: year, @@ -154,8 +155,8 @@ func SetupCreateDeviceDefinition(t *testing.T, dm models.DeviceMake, model strin return dd } -func SetupCreateDeviceDefinitionWithVehicleInfo(t *testing.T, dm models.DeviceMake, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { - dd := SetupCreateDeviceDefinition(t, dm, model, year, pdb) +func SetupCreateDeviceDefinitionWithVehicleInfo(t *testing.T, dm gateways.Manufacturer, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { + dd := SetupCreateDeviceDefinition(t, dm.Name, model, year, pdb) dd.Metadata = &coremodels.DeviceDefinitionMetadata{ DeviceAttributes: []coremodels.DeviceTypeAttribute{ { @@ -180,36 +181,6 @@ func SetupCreateDeviceDefinitionWithVehicleInfo(t *testing.T, dm models.DeviceMa return dd } -func SetupCreateDeviceDefinitionWithVehicleInfoIncludePowerTrain(t *testing.T, dm models.DeviceMake, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { - dd := SetupCreateDeviceDefinition(t, dm, model, year, pdb) - dd.Metadata = &coremodels.DeviceDefinitionMetadata{ - DeviceAttributes: []coremodels.DeviceTypeAttribute{ - { - Name: "fuel_type", - Value: "defaultValue", - }, - { - Name: "driven_wheels", - Value: "4", - }, - { - Name: "number_of_doors", - Value: "4", - }, - { - Name: "mpg", - Value: "defaultValue", - }, - { - Name: "powertrain_type", - Value: "ICE", - }, - }, - } - - return dd -} - func SetupCreateDeviceType(t *testing.T, pdb db.Store) *models.DeviceType { dt := &models.DeviceType{ ID: ksuid.New().String(), @@ -222,14 +193,11 @@ func SetupCreateDeviceType(t *testing.T, pdb db.Store) *models.DeviceType { return dt } -func SetupCreateMake(t *testing.T, mk string, pdb db.Store) models.DeviceMake { - dm := models.DeviceMake{ - ID: ksuid.New().String(), - Name: mk, - NameSlug: stringutils.SlugString(mk), +func SetupCreateMake(mk string) gateways.Manufacturer { + dm := gateways.Manufacturer{ + Name: mk, + TokenID: 123, } - err := dm.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "no db error expected") return dm } @@ -249,15 +217,6 @@ func SetupCreateStyle(t *testing.T, definitionID string, name string, source str func SetupCreateAutoPiIntegration(t *testing.T, pdb db.Store) *models.Integration { - dMake := &models.DeviceMake{ - ID: ksuid.New().String(), - Name: "AutoPi", - NameSlug: "autopi", - } - - err := dMake.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "database error") - integration := &models.Integration{ ID: ksuid.New().String(), Type: models.IntegrationTypeAPI, @@ -267,7 +226,7 @@ func SetupCreateAutoPiIntegration(t *testing.T, pdb db.Store) *models.Integratio Points: 6000, ManufacturerTokenID: null.IntFrom(144), } - err = integration.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) + err := integration.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) require.NoError(t, err, "database error") return integration } @@ -282,55 +241,6 @@ func SetupCreateWMI(t *testing.T, id string, manufacturerName string, pdb db.Sto return wmi } -func SetupCreateSmartCarIntegration(t *testing.T, pdb db.Store) *models.Integration { - dMake := &models.DeviceMake{ - ID: ksuid.New().String(), - Name: "Smartcar", - NameSlug: "smartcar", - } - - err := dMake.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "database error") - - integration := &models.Integration{ - ID: ksuid.New().String(), - Type: models.IntegrationTypeAPI, - Style: models.IntegrationStyleWebhook, - Vendor: common.SmartCarVendor, - RefreshLimitSecs: 1800, - Points: 6000, - ManufacturerTokenID: null.IntFrom(143), - } - err = integration.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "database error") - return integration -} - -func SetupCreateHardwareIntegration(t *testing.T, pdb db.Store) *models.Integration { - - dMake := &models.DeviceMake{ - ID: ksuid.New().String(), - Name: "Macaron", - NameSlug: "macaron", - } - - err := dMake.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "database error") - - integration := &models.Integration{ - ID: ksuid.New().String(), - Type: models.IntegrationTypeHardware, - Style: models.IntegrationStyleAddon, - Vendor: "Hardware", - RefreshLimitSecs: 1800, - Points: 6000, - ManufacturerTokenID: null.IntFrom(142), - } - err = integration.Insert(context.Background(), pdb.DBS().Writer, boil.Infer()) - require.NoError(t, err, "database error") - return integration -} - func Logger() *zerolog.Logger { l := zerolog.New(os.Stdout).With(). Timestamp(). diff --git a/internal/infrastructure/gateways/device_definition_on_chain_service.go b/internal/infrastructure/gateways/device_definition_on_chain_service.go index 0af075af..b2145ae8 100644 --- a/internal/infrastructure/gateways/device_definition_on_chain_service.go +++ b/internal/infrastructure/gateways/device_definition_on_chain_service.go @@ -80,7 +80,7 @@ func NewDeviceDefinitionOnChainService(settings *config.Settings, logger *zerolo client: client, chainID: chainID, sender: sender, - identityAPI: NewIdentityAPIService(logger, settings, nil), + identityAPI: NewIdentityAPIService(logger, settings), inmemCache: cache.New(128*time.Hour, 1*time.Hour), dbs: dbs, } diff --git a/internal/infrastructure/gateways/identity_api.go b/internal/infrastructure/gateways/identity_api.go index 9876c1a3..8a1c225f 100644 --- a/internal/infrastructure/gateways/identity_api.go +++ b/internal/infrastructure/gateways/identity_api.go @@ -26,10 +26,8 @@ type IdentityAPI interface { // NewIdentityAPIService creates a new instance of IdentityAPI, initializing it with the provided logger, settings, and HTTP client. // httpClient is used for testing really -func NewIdentityAPIService(logger *zerolog.Logger, settings *config.Settings, httpClient http.ClientWrapper) IdentityAPI { - if httpClient == nil { - httpClient, _ = http.NewClientWrapper("", "", 10*time.Second, nil, true) // ok to ignore err since only used for tor check - } +func NewIdentityAPIService(logger *zerolog.Logger, settings *config.Settings) IdentityAPI { + httpClient, _ := http.NewClientWrapper("", "", 10*time.Second, nil, true) // ok to ignore err since only used for tor check return &identityAPIService{ httpClient: httpClient, diff --git a/pkg/grpc/device_definition.pb.go b/pkg/grpc/device_definition.pb.go index cad392e7..bd13b521 100644 --- a/pkg/grpc/device_definition.pb.go +++ b/pkg/grpc/device_definition.pb.go @@ -77,238 +77,6 @@ func (x *GetDeviceDefinitionRequest) GetMakeSlug() string { return "" } -type GetDeviceDefinitionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceDefinitions []*GetDeviceDefinitionItemResponse `protobuf:"bytes,1,rep,name=device_definitions,json=deviceDefinitions,proto3" json:"device_definitions,omitempty"` -} - -func (x *GetDeviceDefinitionResponse) Reset() { - *x = GetDeviceDefinitionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceDefinitionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceDefinitionResponse) ProtoMessage() {} - -func (x *GetDeviceDefinitionResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceDefinitionResponse.ProtoReflect.Descriptor instead. -func (*GetDeviceDefinitionResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{1} -} - -func (x *GetDeviceDefinitionResponse) GetDeviceDefinitions() []*GetDeviceDefinitionItemResponse { - if x != nil { - return x.DeviceDefinitions - } - return nil -} - -type GetDeviceDefinitionItemResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceDefinitionId string `protobuf:"bytes,1,opt,name=device_definition_id,json=deviceDefinitionId,proto3" json:"device_definition_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - ImageUrl string `protobuf:"bytes,3,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"` - Make *DeviceMake `protobuf:"bytes,8,opt,name=make,proto3" json:"make,omitempty"` - DeviceStyles []*DeviceStyle `protobuf:"bytes,9,rep,name=device_styles,json=deviceStyles,proto3" json:"device_styles,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - Source string `protobuf:"bytes,10,opt,name=source,proto3" json:"source,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - ExternalId string `protobuf:"bytes,11,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` - DeviceAttributes []*DeviceTypeAttribute `protobuf:"bytes,12,rep,name=device_attributes,json=deviceAttributes,proto3" json:"device_attributes,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - ExternalIds []*ExternalID `protobuf:"bytes,13,rep,name=external_ids,json=externalIds,proto3" json:"external_ids,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - HardwareTemplateId string `protobuf:"bytes,14,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - NameSlug string `protobuf:"bytes,15,opt,name=name_slug,json=nameSlug,proto3" json:"name_slug,omitempty"` - Transactions []string `protobuf:"bytes,16,rep,name=transactions,proto3" json:"transactions,omitempty"` - Year int32 `protobuf:"varint,17,opt,name=year,proto3" json:"year,omitempty"` - Model string `protobuf:"bytes,18,opt,name=model,proto3" json:"model,omitempty"` - Ksuid string `protobuf:"bytes,19,opt,name=ksuid,proto3" json:"ksuid,omitempty"` - Id string `protobuf:"bytes,20,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetDeviceDefinitionItemResponse) Reset() { - *x = GetDeviceDefinitionItemResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceDefinitionItemResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceDefinitionItemResponse) ProtoMessage() {} - -func (x *GetDeviceDefinitionItemResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceDefinitionItemResponse.ProtoReflect.Descriptor instead. -func (*GetDeviceDefinitionItemResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{2} -} - -func (x *GetDeviceDefinitionItemResponse) GetDeviceDefinitionId() string { - if x != nil { - return x.DeviceDefinitionId - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetVerified() bool { - if x != nil { - return x.Verified - } - return false -} - -func (x *GetDeviceDefinitionItemResponse) GetMake() *DeviceMake { - if x != nil { - return x.Make - } - return nil -} - -func (x *GetDeviceDefinitionItemResponse) GetDeviceStyles() []*DeviceStyle { - if x != nil { - return x.DeviceStyles - } - return nil -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *GetDeviceDefinitionItemResponse) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *GetDeviceDefinitionItemResponse) GetExternalId() string { - if x != nil { - return x.ExternalId - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetDeviceAttributes() []*DeviceTypeAttribute { - if x != nil { - return x.DeviceAttributes - } - return nil -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *GetDeviceDefinitionItemResponse) GetExternalIds() []*ExternalID { - if x != nil { - return x.ExternalIds - } - return nil -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *GetDeviceDefinitionItemResponse) GetHardwareTemplateId() string { - if x != nil { - return x.HardwareTemplateId - } - return "" -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *GetDeviceDefinitionItemResponse) GetNameSlug() string { - if x != nil { - return x.NameSlug - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetTransactions() []string { - if x != nil { - return x.Transactions - } - return nil -} - -func (x *GetDeviceDefinitionItemResponse) GetYear() int32 { - if x != nil { - return x.Year - } - return 0 -} - -func (x *GetDeviceDefinitionItemResponse) GetModel() string { - if x != nil { - return x.Model - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetKsuid() string { - if x != nil { - return x.Ksuid - } - return "" -} - -func (x *GetDeviceDefinitionItemResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - type GetDevicesMMYResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -320,7 +88,7 @@ type GetDevicesMMYResponse struct { func (x *GetDevicesMMYResponse) Reset() { *x = GetDevicesMMYResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[3] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -333,7 +101,7 @@ func (x *GetDevicesMMYResponse) String() string { func (*GetDevicesMMYResponse) ProtoMessage() {} func (x *GetDevicesMMYResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[3] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -346,7 +114,7 @@ func (x *GetDevicesMMYResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDevicesMMYResponse.ProtoReflect.Descriptor instead. func (*GetDevicesMMYResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{3} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{1} } func (x *GetDevicesMMYResponse) GetDevice() []*GetDevicesMMYItemResponse { @@ -372,7 +140,7 @@ type GetDevicesMMYItemResponse struct { func (x *GetDevicesMMYItemResponse) Reset() { *x = GetDevicesMMYItemResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[4] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -385,7 +153,7 @@ func (x *GetDevicesMMYItemResponse) String() string { func (*GetDevicesMMYItemResponse) ProtoMessage() {} func (x *GetDevicesMMYItemResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[4] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -398,7 +166,7 @@ func (x *GetDevicesMMYItemResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDevicesMMYItemResponse.ProtoReflect.Descriptor instead. func (*GetDevicesMMYItemResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{4} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{2} } func (x *GetDevicesMMYItemResponse) GetMake() string { @@ -455,7 +223,7 @@ type ExternalID struct { func (x *ExternalID) Reset() { *x = ExternalID{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[5] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +236,7 @@ func (x *ExternalID) String() string { func (*ExternalID) ProtoMessage() {} func (x *ExternalID) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[5] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +249,7 @@ func (x *ExternalID) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalID.ProtoReflect.Descriptor instead. func (*ExternalID) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{5} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{3} } func (x *ExternalID) GetVendor() string { @@ -498,53 +266,6 @@ func (x *ExternalID) GetId() string { return "" } -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RideGuideLink string `protobuf:"bytes,1,opt,name=RideGuideLink,proto3" json:"RideGuideLink,omitempty"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{6} -} - -func (x *Metadata) GetRideGuideLink() string { - if x != nil { - return x.RideGuideLink - } - return "" -} - type DeviceTypeAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -563,7 +284,7 @@ type DeviceTypeAttribute struct { func (x *DeviceTypeAttribute) Reset() { *x = DeviceTypeAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[7] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -576,7 +297,7 @@ func (x *DeviceTypeAttribute) String() string { func (*DeviceTypeAttribute) ProtoMessage() {} func (x *DeviceTypeAttribute) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[7] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -589,7 +310,7 @@ func (x *DeviceTypeAttribute) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceTypeAttribute.ProtoReflect.Descriptor instead. func (*DeviceTypeAttribute) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{7} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{4} } func (x *DeviceTypeAttribute) GetName() string { @@ -660,7 +381,7 @@ type DeviceTypeAttributeRequest struct { func (x *DeviceTypeAttributeRequest) Reset() { *x = DeviceTypeAttributeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[8] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -673,7 +394,7 @@ func (x *DeviceTypeAttributeRequest) String() string { func (*DeviceTypeAttributeRequest) ProtoMessage() {} func (x *DeviceTypeAttributeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[8] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -686,7 +407,7 @@ func (x *DeviceTypeAttributeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceTypeAttributeRequest.ProtoReflect.Descriptor instead. func (*DeviceTypeAttributeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{8} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{5} } func (x *DeviceTypeAttributeRequest) GetName() string { @@ -720,7 +441,7 @@ type DeviceType struct { func (x *DeviceType) Reset() { *x = DeviceType{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[9] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -733,7 +454,7 @@ func (x *DeviceType) String() string { func (*DeviceType) ProtoMessage() {} func (x *DeviceType) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[9] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -746,7 +467,7 @@ func (x *DeviceType) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceType.ProtoReflect.Descriptor instead. func (*DeviceType) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{9} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{6} } func (x *DeviceType) GetType() string { @@ -819,7 +540,7 @@ type DeviceStyle struct { func (x *DeviceStyle) Reset() { *x = DeviceStyle{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[10] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +553,7 @@ func (x *DeviceStyle) String() string { func (*DeviceStyle) ProtoMessage() {} func (x *DeviceStyle) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[10] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +566,7 @@ func (x *DeviceStyle) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceStyle.ProtoReflect.Descriptor instead. func (*DeviceStyle) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{10} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{7} } func (x *DeviceStyle) GetId() string { @@ -913,267 +634,6 @@ func (x *DeviceStyle) GetDefinitionId() string { return "" } -type DeviceMake struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - LogoUrl string `protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"` - OemPlatformName string `protobuf:"bytes,4,opt,name=oem_platform_name,json=oemPlatformName,proto3" json:"oem_platform_name,omitempty"` - TokenId uint64 `protobuf:"varint,5,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` - NameSlug string `protobuf:"bytes,6,opt,name=name_slug,json=nameSlug,proto3" json:"name_slug,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - ExternalIds string `protobuf:"bytes,7,opt,name=external_ids,json=externalIds,proto3" json:"external_ids,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - ExternalIdsTyped []*ExternalID `protobuf:"bytes,8,rep,name=external_ids_typed,json=externalIdsTyped,proto3" json:"external_ids_typed,omitempty"` - Metadata *Metadata `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - HardwareTemplateId string `protobuf:"bytes,10,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *DeviceMake) Reset() { - *x = DeviceMake{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceMake) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceMake) ProtoMessage() {} - -func (x *DeviceMake) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceMake.ProtoReflect.Descriptor instead. -func (*DeviceMake) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{11} -} - -func (x *DeviceMake) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *DeviceMake) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeviceMake) GetLogoUrl() string { - if x != nil { - return x.LogoUrl - } - return "" -} - -func (x *DeviceMake) GetOemPlatformName() string { - if x != nil { - return x.OemPlatformName - } - return "" -} - -func (x *DeviceMake) GetTokenId() uint64 { - if x != nil { - return x.TokenId - } - return 0 -} - -func (x *DeviceMake) GetNameSlug() string { - if x != nil { - return x.NameSlug - } - return "" -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *DeviceMake) GetExternalIds() string { - if x != nil { - return x.ExternalIds - } - return "" -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *DeviceMake) GetExternalIdsTyped() []*ExternalID { - if x != nil { - return x.ExternalIdsTyped - } - return nil -} - -func (x *DeviceMake) GetMetadata() *Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. -func (x *DeviceMake) GetHardwareTemplateId() string { - if x != nil { - return x.HardwareTemplateId - } - return "" -} - -func (x *DeviceMake) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *DeviceMake) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -// deprecated -type VehicleInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FuelType string `protobuf:"bytes,1,opt,name=fuel_type,json=fuelType,proto3" json:"fuel_type,omitempty"` - DrivenWheels string `protobuf:"bytes,2,opt,name=driven_wheels,json=drivenWheels,proto3" json:"driven_wheels,omitempty"` - NumberOfDoors int32 `protobuf:"varint,3,opt,name=number_of_doors,json=numberOfDoors,proto3" json:"number_of_doors,omitempty"` - Base_MSRP int32 `protobuf:"varint,4,opt,name=base_MSRP,json=baseMSRP,proto3" json:"base_MSRP,omitempty"` - EPAClass string `protobuf:"bytes,5,opt,name=EPA_class,json=EPAClass,proto3" json:"EPA_class,omitempty"` - VehicleType string `protobuf:"bytes,6,opt,name=vehicle_type,json=vehicleType,proto3" json:"vehicle_type,omitempty"` - MPGHighway float32 `protobuf:"fixed32,7,opt,name=MPG_highway,json=MPGHighway,proto3" json:"MPG_highway,omitempty"` - MPGCity float32 `protobuf:"fixed32,8,opt,name=MPG_city,json=MPGCity,proto3" json:"MPG_city,omitempty"` - FuelTankCapacityGal float32 `protobuf:"fixed32,9,opt,name=fuel_tank_capacity_gal,json=fuelTankCapacityGal,proto3" json:"fuel_tank_capacity_gal,omitempty"` - MPG float32 `protobuf:"fixed32,10,opt,name=MPG,proto3" json:"MPG,omitempty"` -} - -func (x *VehicleInfo) Reset() { - *x = VehicleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VehicleInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VehicleInfo) ProtoMessage() {} - -func (x *VehicleInfo) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VehicleInfo.ProtoReflect.Descriptor instead. -func (*VehicleInfo) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{12} -} - -func (x *VehicleInfo) GetFuelType() string { - if x != nil { - return x.FuelType - } - return "" -} - -func (x *VehicleInfo) GetDrivenWheels() string { - if x != nil { - return x.DrivenWheels - } - return "" -} - -func (x *VehicleInfo) GetNumberOfDoors() int32 { - if x != nil { - return x.NumberOfDoors - } - return 0 -} - -func (x *VehicleInfo) GetBase_MSRP() int32 { - if x != nil { - return x.Base_MSRP - } - return 0 -} - -func (x *VehicleInfo) GetEPAClass() string { - if x != nil { - return x.EPAClass - } - return "" -} - -func (x *VehicleInfo) GetVehicleType() string { - if x != nil { - return x.VehicleType - } - return "" -} - -func (x *VehicleInfo) GetMPGHighway() float32 { - if x != nil { - return x.MPGHighway - } - return 0 -} - -func (x *VehicleInfo) GetMPGCity() float32 { - if x != nil { - return x.MPGCity - } - return 0 -} - -func (x *VehicleInfo) GetFuelTankCapacityGal() float32 { - if x != nil { - return x.FuelTankCapacityGal - } - return 0 -} - -func (x *VehicleInfo) GetMPG() float32 { - if x != nil { - return x.MPG - } - return 0 -} - type GetDeviceDefinitionByMMYRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1188,7 +648,7 @@ type GetDeviceDefinitionByMMYRequest struct { func (x *GetDeviceDefinitionByMMYRequest) Reset() { *x = GetDeviceDefinitionByMMYRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[13] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1201,7 +661,7 @@ func (x *GetDeviceDefinitionByMMYRequest) String() string { func (*GetDeviceDefinitionByMMYRequest) ProtoMessage() {} func (x *GetDeviceDefinitionByMMYRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[13] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1214,7 +674,7 @@ func (x *GetDeviceDefinitionByMMYRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceDefinitionByMMYRequest.ProtoReflect.Descriptor instead. func (*GetDeviceDefinitionByMMYRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{13} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{8} } func (x *GetDeviceDefinitionByMMYRequest) GetMake() string { @@ -1256,7 +716,7 @@ type GetIntegrationResponse struct { func (x *GetIntegrationResponse) Reset() { *x = GetIntegrationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[14] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1269,7 +729,7 @@ func (x *GetIntegrationResponse) String() string { func (*GetIntegrationResponse) ProtoMessage() {} func (x *GetIntegrationResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[14] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1282,7 +742,7 @@ func (x *GetIntegrationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetIntegrationResponse.ProtoReflect.Descriptor instead. func (*GetIntegrationResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{14} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{9} } func (x *GetIntegrationResponse) GetIntegrations() []*Integration { @@ -1313,7 +773,7 @@ type Integration struct { func (x *Integration) Reset() { *x = Integration{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[15] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1326,7 +786,7 @@ func (x *Integration) String() string { func (*Integration) ProtoMessage() {} func (x *Integration) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[15] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1339,7 +799,7 @@ func (x *Integration) ProtoReflect() protoreflect.Message { // Deprecated: Use Integration.ProtoReflect.Descriptor instead. func (*Integration) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{15} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{10} } func (x *Integration) GetId() string { @@ -1430,7 +890,7 @@ type CreateDeviceDefinitionRequest struct { func (x *CreateDeviceDefinitionRequest) Reset() { *x = CreateDeviceDefinitionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[16] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1443,7 +903,7 @@ func (x *CreateDeviceDefinitionRequest) String() string { func (*CreateDeviceDefinitionRequest) ProtoMessage() {} func (x *CreateDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[16] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1456,7 +916,7 @@ func (x *CreateDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDeviceDefinitionRequest.ProtoReflect.Descriptor instead. func (*CreateDeviceDefinitionRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{16} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{11} } func (x *CreateDeviceDefinitionRequest) GetMake() string { @@ -1526,7 +986,7 @@ type BaseResponse struct { func (x *BaseResponse) Reset() { *x = BaseResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[17] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1539,7 +999,7 @@ func (x *BaseResponse) String() string { func (*BaseResponse) ProtoMessage() {} func (x *BaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[17] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1552,7 +1012,7 @@ func (x *BaseResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BaseResponse.ProtoReflect.Descriptor instead. func (*BaseResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{17} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{12} } func (x *BaseResponse) GetId() string { @@ -1574,7 +1034,7 @@ type CreateDeviceDefinitionResponse struct { func (x *CreateDeviceDefinitionResponse) Reset() { *x = CreateDeviceDefinitionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[18] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1587,7 +1047,7 @@ func (x *CreateDeviceDefinitionResponse) String() string { func (*CreateDeviceDefinitionResponse) ProtoMessage() {} func (x *CreateDeviceDefinitionResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[18] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1600,7 +1060,7 @@ func (x *CreateDeviceDefinitionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDeviceDefinitionResponse.ProtoReflect.Descriptor instead. func (*CreateDeviceDefinitionResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{18} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{13} } func (x *CreateDeviceDefinitionResponse) GetId() string { @@ -1644,7 +1104,7 @@ type UpdateDeviceDefinitionRequest struct { func (x *UpdateDeviceDefinitionRequest) Reset() { *x = UpdateDeviceDefinitionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[19] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1657,7 +1117,7 @@ func (x *UpdateDeviceDefinitionRequest) String() string { func (*UpdateDeviceDefinitionRequest) ProtoMessage() {} func (x *UpdateDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[19] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1670,7 +1130,7 @@ func (x *UpdateDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateDeviceDefinitionRequest.ProtoReflect.Descriptor instead. func (*UpdateDeviceDefinitionRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{19} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{14} } func (x *UpdateDeviceDefinitionRequest) GetDeviceDefinitionId() string { @@ -1790,7 +1250,7 @@ type FilterDeviceDefinitionRequest struct { func (x *FilterDeviceDefinitionRequest) Reset() { *x = FilterDeviceDefinitionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[20] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1803,7 +1263,7 @@ func (x *FilterDeviceDefinitionRequest) String() string { func (*FilterDeviceDefinitionRequest) ProtoMessage() {} func (x *FilterDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[20] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1816,7 +1276,7 @@ func (x *FilterDeviceDefinitionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterDeviceDefinitionRequest.ProtoReflect.Descriptor instead. func (*FilterDeviceDefinitionRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{20} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{15} } // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. @@ -1903,7 +1363,7 @@ type GetFilteredDeviceDefinitionsResponse struct { func (x *GetFilteredDeviceDefinitionsResponse) Reset() { *x = GetFilteredDeviceDefinitionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[21] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1916,7 +1376,7 @@ func (x *GetFilteredDeviceDefinitionsResponse) String() string { func (*GetFilteredDeviceDefinitionsResponse) ProtoMessage() {} func (x *GetFilteredDeviceDefinitionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[21] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1929,7 +1389,7 @@ func (x *GetFilteredDeviceDefinitionsResponse) ProtoReflect() protoreflect.Messa // Deprecated: Use GetFilteredDeviceDefinitionsResponse.ProtoReflect.Descriptor instead. func (*GetFilteredDeviceDefinitionsResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{21} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{16} } func (x *GetFilteredDeviceDefinitionsResponse) GetItems() []*FilterDeviceDefinitionsReponse { @@ -1965,7 +1425,7 @@ type FilterDeviceDefinitionsReponse struct { func (x *FilterDeviceDefinitionsReponse) Reset() { *x = FilterDeviceDefinitionsReponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[22] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1978,7 +1438,7 @@ func (x *FilterDeviceDefinitionsReponse) String() string { func (*FilterDeviceDefinitionsReponse) ProtoMessage() {} func (x *FilterDeviceDefinitionsReponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[22] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1991,7 +1451,7 @@ func (x *FilterDeviceDefinitionsReponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterDeviceDefinitionsReponse.ProtoReflect.Descriptor instead. func (*FilterDeviceDefinitionsReponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{22} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{17} } func (x *FilterDeviceDefinitionsReponse) GetId() string { @@ -2113,7 +1573,7 @@ type CreateDeviceStyleRequest struct { func (x *CreateDeviceStyleRequest) Reset() { *x = CreateDeviceStyleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[23] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2126,7 +1586,7 @@ func (x *CreateDeviceStyleRequest) String() string { func (*CreateDeviceStyleRequest) ProtoMessage() {} func (x *CreateDeviceStyleRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[23] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2139,7 +1599,7 @@ func (x *CreateDeviceStyleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDeviceStyleRequest.ProtoReflect.Descriptor instead. func (*CreateDeviceStyleRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{23} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{18} } // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. @@ -2204,7 +1664,7 @@ type GetIntegrationRequest struct { func (x *GetIntegrationRequest) Reset() { *x = GetIntegrationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[24] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2217,7 +1677,7 @@ func (x *GetIntegrationRequest) String() string { func (*GetIntegrationRequest) ProtoMessage() {} func (x *GetIntegrationRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[24] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2230,7 +1690,7 @@ func (x *GetIntegrationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetIntegrationRequest.ProtoReflect.Descriptor instead. func (*GetIntegrationRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{24} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{19} } func (x *GetIntegrationRequest) GetId() []string { @@ -2248,219 +1708,23 @@ type GetIntegrationByTokenIDRequest struct { TokenId uint64 `protobuf:"varint,1,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` } -func (x *GetIntegrationByTokenIDRequest) Reset() { - *x = GetIntegrationByTokenIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetIntegrationByTokenIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetIntegrationByTokenIDRequest) ProtoMessage() {} - -func (x *GetIntegrationByTokenIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetIntegrationByTokenIDRequest.ProtoReflect.Descriptor instead. -func (*GetIntegrationByTokenIDRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{25} -} - -func (x *GetIntegrationByTokenIDRequest) GetTokenId() uint64 { - if x != nil { - return x.TokenId - } - return 0 -} - -type CreateDeviceMakeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - HardwareTemplateId string `protobuf:"bytes,2,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` -} - -func (x *CreateDeviceMakeRequest) Reset() { - *x = CreateDeviceMakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateDeviceMakeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDeviceMakeRequest) ProtoMessage() {} - -func (x *CreateDeviceMakeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDeviceMakeRequest.ProtoReflect.Descriptor instead. -func (*CreateDeviceMakeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{26} -} - -func (x *CreateDeviceMakeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateDeviceMakeRequest) GetHardwareTemplateId() string { - if x != nil { - return x.HardwareTemplateId - } - return "" -} - -type GetDeviceStyleByIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetDeviceStyleByIDRequest) Reset() { - *x = GetDeviceStyleByIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceStyleByIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceStyleByIDRequest) ProtoMessage() {} - -func (x *GetDeviceStyleByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceStyleByIDRequest.ProtoReflect.Descriptor instead. -func (*GetDeviceStyleByIDRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{27} -} - -func (x *GetDeviceStyleByIDRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetDeviceStyleByDeviceDefinitionIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetDeviceStyleByDeviceDefinitionIDRequest) Reset() { - *x = GetDeviceStyleByDeviceDefinitionIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceStyleByDeviceDefinitionIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceStyleByDeviceDefinitionIDRequest) ProtoMessage() {} - -func (x *GetDeviceStyleByDeviceDefinitionIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceStyleByDeviceDefinitionIDRequest.ProtoReflect.Descriptor instead. -func (*GetDeviceStyleByDeviceDefinitionIDRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{28} -} - -func (x *GetDeviceStyleByDeviceDefinitionIDRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetDeviceStyleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceStyles []*DeviceStyle `protobuf:"bytes,1,rep,name=device_styles,json=deviceStyles,proto3" json:"device_styles,omitempty"` -} - -func (x *GetDeviceStyleResponse) Reset() { - *x = GetDeviceStyleResponse{} +func (x *GetIntegrationByTokenIDRequest) Reset() { + *x = GetIntegrationByTokenIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[29] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDeviceStyleResponse) String() string { +func (x *GetIntegrationByTokenIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDeviceStyleResponse) ProtoMessage() {} +func (*GetIntegrationByTokenIDRequest) ProtoMessage() {} -func (x *GetDeviceStyleResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[29] +func (x *GetIntegrationByTokenIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_grpc_device_definition_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2471,46 +1735,43 @@ func (x *GetDeviceStyleResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDeviceStyleResponse.ProtoReflect.Descriptor instead. -func (*GetDeviceStyleResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{29} +// Deprecated: Use GetIntegrationByTokenIDRequest.ProtoReflect.Descriptor instead. +func (*GetIntegrationByTokenIDRequest) Descriptor() ([]byte, []int) { + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{20} } -func (x *GetDeviceStyleResponse) GetDeviceStyles() []*DeviceStyle { +func (x *GetIntegrationByTokenIDRequest) GetTokenId() uint64 { if x != nil { - return x.DeviceStyles + return x.TokenId } - return nil + return 0 } -type CreateIntegrationRequest struct { +type GetDeviceStyleByIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Vendor string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Style string `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"` - TokenId uint64 `protobuf:"varint,4,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *CreateIntegrationRequest) Reset() { - *x = CreateIntegrationRequest{} +func (x *GetDeviceStyleByIDRequest) Reset() { + *x = GetDeviceStyleByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[30] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreateIntegrationRequest) String() string { +func (x *GetDeviceStyleByIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateIntegrationRequest) ProtoMessage() {} +func (*GetDeviceStyleByIDRequest) ProtoMessage() {} -func (x *CreateIntegrationRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[30] +func (x *GetDeviceStyleByIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_grpc_device_definition_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2521,64 +1782,43 @@ func (x *CreateIntegrationRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateIntegrationRequest.ProtoReflect.Descriptor instead. -func (*CreateIntegrationRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{30} -} - -func (x *CreateIntegrationRequest) GetVendor() string { - if x != nil { - return x.Vendor - } - return "" -} - -func (x *CreateIntegrationRequest) GetType() string { - if x != nil { - return x.Type - } - return "" +// Deprecated: Use GetDeviceStyleByIDRequest.ProtoReflect.Descriptor instead. +func (*GetDeviceStyleByIDRequest) Descriptor() ([]byte, []int) { + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{21} } -func (x *CreateIntegrationRequest) GetStyle() string { +func (x *GetDeviceStyleByIDRequest) GetId() string { if x != nil { - return x.Style + return x.Id } return "" } -func (x *CreateIntegrationRequest) GetTokenId() uint64 { - if x != nil { - return x.TokenId - } - return 0 -} - -type GetDeviceMakeBySlugRequest struct { +type GetDeviceStyleByDeviceDefinitionIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetDeviceMakeBySlugRequest) Reset() { - *x = GetDeviceMakeBySlugRequest{} +func (x *GetDeviceStyleByDeviceDefinitionIDRequest) Reset() { + *x = GetDeviceStyleByDeviceDefinitionIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[31] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDeviceMakeBySlugRequest) String() string { +func (x *GetDeviceStyleByDeviceDefinitionIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDeviceMakeBySlugRequest) ProtoMessage() {} +func (*GetDeviceStyleByDeviceDefinitionIDRequest) ProtoMessage() {} -func (x *GetDeviceMakeBySlugRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[31] +func (x *GetDeviceStyleByDeviceDefinitionIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_grpc_device_definition_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2589,43 +1829,43 @@ func (x *GetDeviceMakeBySlugRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDeviceMakeBySlugRequest.ProtoReflect.Descriptor instead. -func (*GetDeviceMakeBySlugRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{31} +// Deprecated: Use GetDeviceStyleByDeviceDefinitionIDRequest.ProtoReflect.Descriptor instead. +func (*GetDeviceStyleByDeviceDefinitionIDRequest) Descriptor() ([]byte, []int) { + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{22} } -func (x *GetDeviceMakeBySlugRequest) GetSlug() string { +func (x *GetDeviceStyleByDeviceDefinitionIDRequest) GetId() string { if x != nil { - return x.Slug + return x.Id } return "" } -type GetDeviceMakeResponse struct { +type GetDeviceStyleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DeviceMakes []*DeviceMake `protobuf:"bytes,1,rep,name=device_makes,json=deviceMakes,proto3" json:"device_makes,omitempty"` + DeviceStyles []*DeviceStyle `protobuf:"bytes,1,rep,name=device_styles,json=deviceStyles,proto3" json:"device_styles,omitempty"` } -func (x *GetDeviceMakeResponse) Reset() { - *x = GetDeviceMakeResponse{} +func (x *GetDeviceStyleResponse) Reset() { + *x = GetDeviceStyleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[32] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetDeviceMakeResponse) String() string { +func (x *GetDeviceStyleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDeviceMakeResponse) ProtoMessage() {} +func (*GetDeviceStyleResponse) ProtoMessage() {} -func (x *GetDeviceMakeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[32] +func (x *GetDeviceStyleResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_grpc_device_definition_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2636,51 +1876,46 @@ func (x *GetDeviceMakeResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDeviceMakeResponse.ProtoReflect.Descriptor instead. -func (*GetDeviceMakeResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{32} +// Deprecated: Use GetDeviceStyleResponse.ProtoReflect.Descriptor instead. +func (*GetDeviceStyleResponse) Descriptor() ([]byte, []int) { + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{23} } -func (x *GetDeviceMakeResponse) GetDeviceMakes() []*DeviceMake { +func (x *GetDeviceStyleResponse) GetDeviceStyles() []*DeviceStyle { if x != nil { - return x.DeviceMakes + return x.DeviceStyles } return nil } -type UpdateDeviceMakeRequest struct { +type CreateIntegrationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - LogoUrl string `protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"` - OemPlatformName string `protobuf:"bytes,4,opt,name=oem_platform_name,json=oemPlatformName,proto3" json:"oem_platform_name,omitempty"` - TokenId uint64 `protobuf:"varint,5,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` - NameSlug string `protobuf:"bytes,6,opt,name=name_slug,json=nameSlug,proto3" json:"name_slug,omitempty"` - ExternalIds string `protobuf:"bytes,7,opt,name=external_ids,json=externalIds,proto3" json:"external_ids,omitempty"` - Metadata string `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` - HardwareTemplateId string `protobuf:"bytes,9,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` + Vendor string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Style string `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"` + TokenId uint64 `protobuf:"varint,4,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` } -func (x *UpdateDeviceMakeRequest) Reset() { - *x = UpdateDeviceMakeRequest{} +func (x *CreateIntegrationRequest) Reset() { + *x = CreateIntegrationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[33] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UpdateDeviceMakeRequest) String() string { +func (x *CreateIntegrationRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateDeviceMakeRequest) ProtoMessage() {} +func (*CreateIntegrationRequest) ProtoMessage() {} -func (x *UpdateDeviceMakeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[33] +func (x *CreateIntegrationRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_grpc_device_definition_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2691,74 +1926,39 @@ func (x *UpdateDeviceMakeRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateDeviceMakeRequest.ProtoReflect.Descriptor instead. -func (*UpdateDeviceMakeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{33} -} - -func (x *UpdateDeviceMakeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" +// Deprecated: Use CreateIntegrationRequest.ProtoReflect.Descriptor instead. +func (*CreateIntegrationRequest) Descriptor() ([]byte, []int) { + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{24} } -func (x *UpdateDeviceMakeRequest) GetName() string { +func (x *CreateIntegrationRequest) GetVendor() string { if x != nil { - return x.Name + return x.Vendor } return "" } -func (x *UpdateDeviceMakeRequest) GetLogoUrl() string { +func (x *CreateIntegrationRequest) GetType() string { if x != nil { - return x.LogoUrl + return x.Type } return "" } -func (x *UpdateDeviceMakeRequest) GetOemPlatformName() string { +func (x *CreateIntegrationRequest) GetStyle() string { if x != nil { - return x.OemPlatformName + return x.Style } return "" } -func (x *UpdateDeviceMakeRequest) GetTokenId() uint64 { +func (x *CreateIntegrationRequest) GetTokenId() uint64 { if x != nil { return x.TokenId } return 0 } -func (x *UpdateDeviceMakeRequest) GetNameSlug() string { - if x != nil { - return x.NameSlug - } - return "" -} - -func (x *UpdateDeviceMakeRequest) GetExternalIds() string { - if x != nil { - return x.ExternalIds - } - return "" -} - -func (x *UpdateDeviceMakeRequest) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -func (x *UpdateDeviceMakeRequest) GetHardwareTemplateId() string { - if x != nil { - return x.HardwareTemplateId - } - return "" -} - type UpdateDeviceStyleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2779,7 +1979,7 @@ type UpdateDeviceStyleRequest struct { func (x *UpdateDeviceStyleRequest) Reset() { *x = UpdateDeviceStyleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[34] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2792,7 +1992,7 @@ func (x *UpdateDeviceStyleRequest) String() string { func (*UpdateDeviceStyleRequest) ProtoMessage() {} func (x *UpdateDeviceStyleRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[34] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2805,7 +2005,7 @@ func (x *UpdateDeviceStyleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateDeviceStyleRequest.ProtoReflect.Descriptor instead. func (*UpdateDeviceStyleRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{34} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{25} } func (x *UpdateDeviceStyleRequest) GetId() string { @@ -2880,7 +2080,7 @@ type GetDeviceStyleFilterRequest struct { func (x *GetDeviceStyleFilterRequest) Reset() { *x = GetDeviceStyleFilterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[35] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2893,7 +2093,7 @@ func (x *GetDeviceStyleFilterRequest) String() string { func (*GetDeviceStyleFilterRequest) ProtoMessage() {} func (x *GetDeviceStyleFilterRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[35] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2906,7 +2106,7 @@ func (x *GetDeviceStyleFilterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceStyleFilterRequest.ProtoReflect.Descriptor instead. func (*GetDeviceStyleFilterRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{35} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{26} } func (x *GetDeviceStyleFilterRequest) GetName() string { @@ -2948,7 +2148,7 @@ type GetDeviceTypeByIDRequest struct { func (x *GetDeviceTypeByIDRequest) Reset() { *x = GetDeviceTypeByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[36] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2961,7 +2161,7 @@ func (x *GetDeviceTypeByIDRequest) String() string { func (*GetDeviceTypeByIDRequest) ProtoMessage() {} func (x *GetDeviceTypeByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[36] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2974,7 +2174,7 @@ func (x *GetDeviceTypeByIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceTypeByIDRequest.ProtoReflect.Descriptor instead. func (*GetDeviceTypeByIDRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{36} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{27} } func (x *GetDeviceTypeByIDRequest) GetId() string { @@ -2998,7 +2198,7 @@ type GetDeviceTypeResponse struct { func (x *GetDeviceTypeResponse) Reset() { *x = GetDeviceTypeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[37] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3011,7 +2211,7 @@ func (x *GetDeviceTypeResponse) String() string { func (*GetDeviceTypeResponse) ProtoMessage() {} func (x *GetDeviceTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[37] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3024,7 +2224,7 @@ func (x *GetDeviceTypeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceTypeResponse.ProtoReflect.Descriptor instead. func (*GetDeviceTypeResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{37} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{28} } func (x *GetDeviceTypeResponse) GetId() string { @@ -3066,7 +2266,7 @@ type GetDeviceTypeListResponse struct { func (x *GetDeviceTypeListResponse) Reset() { *x = GetDeviceTypeListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[38] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3079,7 +2279,7 @@ func (x *GetDeviceTypeListResponse) String() string { func (*GetDeviceTypeListResponse) ProtoMessage() {} func (x *GetDeviceTypeListResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[38] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3092,7 +2292,7 @@ func (x *GetDeviceTypeListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceTypeListResponse.ProtoReflect.Descriptor instead. func (*GetDeviceTypeListResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{38} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{29} } func (x *GetDeviceTypeListResponse) GetDeviceTypes() []*GetDeviceTypeResponse { @@ -3114,7 +2314,7 @@ type CreateDeviceTypeRequest struct { func (x *CreateDeviceTypeRequest) Reset() { *x = CreateDeviceTypeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[39] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3127,7 +2327,7 @@ func (x *CreateDeviceTypeRequest) String() string { func (*CreateDeviceTypeRequest) ProtoMessage() {} func (x *CreateDeviceTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[39] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3140,7 +2340,7 @@ func (x *CreateDeviceTypeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDeviceTypeRequest.ProtoReflect.Descriptor instead. func (*CreateDeviceTypeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{39} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{30} } func (x *CreateDeviceTypeRequest) GetId() string { @@ -3170,7 +2370,7 @@ type UpdateDeviceTypeRequest struct { func (x *UpdateDeviceTypeRequest) Reset() { *x = UpdateDeviceTypeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[40] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3183,7 +2383,7 @@ func (x *UpdateDeviceTypeRequest) String() string { func (*UpdateDeviceTypeRequest) ProtoMessage() {} func (x *UpdateDeviceTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[40] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3196,7 +2396,7 @@ func (x *UpdateDeviceTypeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateDeviceTypeRequest.ProtoReflect.Descriptor instead. func (*UpdateDeviceTypeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{40} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{31} } func (x *UpdateDeviceTypeRequest) GetId() string { @@ -3237,7 +2437,7 @@ type CreateDeviceTypeAttributeRequest struct { func (x *CreateDeviceTypeAttributeRequest) Reset() { *x = CreateDeviceTypeAttributeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[41] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3250,7 +2450,7 @@ func (x *CreateDeviceTypeAttributeRequest) String() string { func (*CreateDeviceTypeAttributeRequest) ProtoMessage() {} func (x *CreateDeviceTypeAttributeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[41] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3263,7 +2463,7 @@ func (x *CreateDeviceTypeAttributeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateDeviceTypeAttributeRequest.ProtoReflect.Descriptor instead. func (*CreateDeviceTypeAttributeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{41} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{32} } func (x *CreateDeviceTypeAttributeRequest) GetName() string { @@ -3326,7 +2526,7 @@ type DeleteDeviceTypeRequest struct { func (x *DeleteDeviceTypeRequest) Reset() { *x = DeleteDeviceTypeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[42] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3339,7 +2539,7 @@ func (x *DeleteDeviceTypeRequest) String() string { func (*DeleteDeviceTypeRequest) ProtoMessage() {} func (x *DeleteDeviceTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[42] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3352,7 +2552,7 @@ func (x *DeleteDeviceTypeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteDeviceTypeRequest.ProtoReflect.Descriptor instead. func (*DeleteDeviceTypeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{42} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{33} } func (x *DeleteDeviceTypeRequest) GetId() string { @@ -3362,53 +2562,6 @@ func (x *DeleteDeviceTypeRequest) GetId() string { return "" } -type GetDeviceMakeByTokenIdRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TokenId string `protobuf:"bytes,1,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` -} - -func (x *GetDeviceMakeByTokenIdRequest) Reset() { - *x = GetDeviceMakeByTokenIdRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceMakeByTokenIdRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceMakeByTokenIdRequest) ProtoMessage() {} - -func (x *GetDeviceMakeByTokenIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceMakeByTokenIdRequest.ProtoReflect.Descriptor instead. -func (*GetDeviceMakeByTokenIdRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{43} -} - -func (x *GetDeviceMakeByTokenIdRequest) GetTokenId() string { - if x != nil { - return x.TokenId - } - return "" -} - type GetDeviceDefinitionHardwareTemplateByIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3421,7 +2574,7 @@ type GetDeviceDefinitionHardwareTemplateByIDRequest struct { func (x *GetDeviceDefinitionHardwareTemplateByIDRequest) Reset() { *x = GetDeviceDefinitionHardwareTemplateByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[44] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3434,7 +2587,7 @@ func (x *GetDeviceDefinitionHardwareTemplateByIDRequest) String() string { func (*GetDeviceDefinitionHardwareTemplateByIDRequest) ProtoMessage() {} func (x *GetDeviceDefinitionHardwareTemplateByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[44] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3447,7 +2600,7 @@ func (x *GetDeviceDefinitionHardwareTemplateByIDRequest) ProtoReflect() protoref // Deprecated: Use GetDeviceDefinitionHardwareTemplateByIDRequest.ProtoReflect.Descriptor instead. func (*GetDeviceDefinitionHardwareTemplateByIDRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{44} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{34} } func (x *GetDeviceDefinitionHardwareTemplateByIDRequest) GetId() string { @@ -3475,7 +2628,7 @@ type GetDeviceDefinitionHardwareTemplateByIDResponse struct { func (x *GetDeviceDefinitionHardwareTemplateByIDResponse) Reset() { *x = GetDeviceDefinitionHardwareTemplateByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[45] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3488,7 +2641,7 @@ func (x *GetDeviceDefinitionHardwareTemplateByIDResponse) String() string { func (*GetDeviceDefinitionHardwareTemplateByIDResponse) ProtoMessage() {} func (x *GetDeviceDefinitionHardwareTemplateByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[45] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3501,7 +2654,7 @@ func (x *GetDeviceDefinitionHardwareTemplateByIDResponse) ProtoReflect() protore // Deprecated: Use GetDeviceDefinitionHardwareTemplateByIDResponse.ProtoReflect.Descriptor instead. func (*GetDeviceDefinitionHardwareTemplateByIDResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{45} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{35} } func (x *GetDeviceDefinitionHardwareTemplateByIDResponse) GetHardwareTemplateId() string { @@ -3528,7 +2681,7 @@ type DeviceImage struct { func (x *DeviceImage) Reset() { *x = DeviceImage{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[46] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3541,7 +2694,7 @@ func (x *DeviceImage) String() string { func (*DeviceImage) ProtoMessage() {} func (x *DeviceImage) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[46] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3554,7 +2707,7 @@ func (x *DeviceImage) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceImage.ProtoReflect.Descriptor instead. func (*DeviceImage) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{46} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{36} } // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. @@ -3611,7 +2764,7 @@ type GetDeviceImagesResponse struct { func (x *GetDeviceImagesResponse) Reset() { *x = GetDeviceImagesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[47] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3624,7 +2777,7 @@ func (x *GetDeviceImagesResponse) String() string { func (*GetDeviceImagesResponse) ProtoMessage() {} func (x *GetDeviceImagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[47] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3637,7 +2790,7 @@ func (x *GetDeviceImagesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDeviceImagesResponse.ProtoReflect.Descriptor instead. func (*GetDeviceImagesResponse) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{47} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{37} } func (x *GetDeviceImagesResponse) GetImages() []*DeviceImage { @@ -3658,7 +2811,7 @@ type SyncStatusResult struct { func (x *SyncStatusResult) Reset() { *x = SyncStatusResult{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[48] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3671,7 +2824,7 @@ func (x *SyncStatusResult) String() string { func (*SyncStatusResult) ProtoMessage() {} func (x *SyncStatusResult) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[48] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3684,7 +2837,7 @@ func (x *SyncStatusResult) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncStatusResult.ProtoReflect.Descriptor instead. func (*SyncStatusResult) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{48} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{38} } func (x *SyncStatusResult) GetStatus() bool { @@ -3707,7 +2860,7 @@ type GetDeviceDefinitionByMakeAndYearRangeRequest struct { func (x *GetDeviceDefinitionByMakeAndYearRangeRequest) Reset() { *x = GetDeviceDefinitionByMakeAndYearRangeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[49] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3720,7 +2873,7 @@ func (x *GetDeviceDefinitionByMakeAndYearRangeRequest) String() string { func (*GetDeviceDefinitionByMakeAndYearRangeRequest) ProtoMessage() {} func (x *GetDeviceDefinitionByMakeAndYearRangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[49] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3733,7 +2886,7 @@ func (x *GetDeviceDefinitionByMakeAndYearRangeRequest) ProtoReflect() protorefle // Deprecated: Use GetDeviceDefinitionByMakeAndYearRangeRequest.ProtoReflect.Descriptor instead. func (*GetDeviceDefinitionByMakeAndYearRangeRequest) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{49} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{39} } func (x *GetDeviceDefinitionByMakeAndYearRangeRequest) GetMake() string { @@ -3771,7 +2924,7 @@ type Integration_AutoPiPowertrainTemplate struct { func (x *Integration_AutoPiPowertrainTemplate) Reset() { *x = Integration_AutoPiPowertrainTemplate{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[50] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3784,7 +2937,7 @@ func (x *Integration_AutoPiPowertrainTemplate) String() string { func (*Integration_AutoPiPowertrainTemplate) ProtoMessage() {} func (x *Integration_AutoPiPowertrainTemplate) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[50] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3797,7 +2950,7 @@ func (x *Integration_AutoPiPowertrainTemplate) ProtoReflect() protoreflect.Messa // Deprecated: Use Integration_AutoPiPowertrainTemplate.ProtoReflect.Descriptor instead. func (*Integration_AutoPiPowertrainTemplate) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{15, 0} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{10, 0} } func (x *Integration_AutoPiPowertrainTemplate) GetBEV() int32 { @@ -3846,7 +2999,7 @@ type UpdateDeviceDefinitionRequest_DeviceStyles struct { func (x *UpdateDeviceDefinitionRequest_DeviceStyles) Reset() { *x = UpdateDeviceDefinitionRequest_DeviceStyles{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[51] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3859,7 +3012,7 @@ func (x *UpdateDeviceDefinitionRequest_DeviceStyles) String() string { func (*UpdateDeviceDefinitionRequest_DeviceStyles) ProtoMessage() {} func (x *UpdateDeviceDefinitionRequest_DeviceStyles) ProtoReflect() protoreflect.Message { - mi := &file_pkg_grpc_device_definition_proto_msgTypes[51] + mi := &file_pkg_grpc_device_definition_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3872,7 +3025,7 @@ func (x *UpdateDeviceDefinitionRequest_DeviceStyles) ProtoReflect() protoreflect // Deprecated: Use UpdateDeviceDefinitionRequest_DeviceStyles.ProtoReflect.Descriptor instead. func (*UpdateDeviceDefinitionRequest_DeviceStyles) Descriptor() ([]byte, []int) { - return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{19, 0} + return file_pkg_grpc_device_definition_proto_rawDescGZIP(), []int{14, 0} } func (x *UpdateDeviceDefinitionRequest_DeviceStyles) GetId() string { @@ -3945,509 +3098,28 @@ var file_pkg_grpc_device_definition_proto_rawDesc = []byte{ 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x53, - 0x6c, 0x75, 0x67, 0x22, 0x73, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x05, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, - 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x6d, - 0x61, 0x6b, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x04, 0x6d, 0x61, 0x6b, - 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, - 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, - 0x75, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x73, 0x75, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6b, 0x73, 0x75, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x4d, 0x4d, 0x59, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x37, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x4d, 0x4d, 0x59, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4d, 0x4d, 0x59, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x79, 0x65, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, - 0x6c, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, - 0x6c, 0x75, 0x67, 0x22, 0x34, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, - 0x44, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x08, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x52, 0x69, 0x64, 0x65, 0x47, 0x75, 0x69, - 0x64, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x52, 0x69, - 0x64, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xe5, 0x01, 0x0a, 0x13, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, - 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x0a, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, - 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x61, 0x6b, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x53, 0x6c, 0x75, 0x67, 0x22, 0xeb, 0x02, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xf2, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x61, 0x6b, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6f, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x6f, - 0x55, 0x72, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x65, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x6f, 0x65, 0x6d, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, - 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x25, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x42, - 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, - 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xd7, 0x02, 0x0a, 0x0b, 0x56, - 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, - 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x75, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x6e, 0x5f, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x64, 0x72, 0x69, 0x76, 0x65, 0x6e, 0x57, 0x68, 0x65, 0x65, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x6f, 0x6f, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x44, - 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x4d, 0x53, 0x52, - 0x50, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x53, 0x52, - 0x50, 0x12, 0x1b, 0x0a, 0x09, 0x45, 0x50, 0x41, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x45, 0x50, 0x41, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x4d, 0x50, 0x47, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x4d, 0x50, 0x47, 0x48, 0x69, 0x67, 0x68, 0x77, - 0x61, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x4d, 0x50, 0x47, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x4d, 0x50, 0x47, 0x43, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, - 0x16, 0x66, 0x75, 0x65, 0x6c, 0x5f, 0x74, 0x61, 0x6e, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, - 0x69, 0x74, 0x79, 0x5f, 0x67, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x66, - 0x75, 0x65, 0x6c, 0x54, 0x61, 0x6e, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x47, - 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x50, 0x47, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x03, 0x4d, 0x50, 0x47, 0x22, 0x77, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x4d, 0x59, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, - 0x61, 0x6b, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x6b, - 0x65, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x22, 0x4f, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x83, - 0x04, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, - 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, - 0x12, 0x3c, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x69, 0x5f, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x69, - 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x69, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, - 0x65, 0x72, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x18, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x53, 0x65, 0x63, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, - 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6d, 0x61, 0x6e, 0x75, 0x66, - 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x1a, 0x64, - 0x0a, 0x18, 0x41, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x42, 0x45, - 0x56, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x42, 0x45, 0x56, 0x12, 0x10, 0x0a, 0x03, - 0x48, 0x45, 0x56, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x48, 0x45, 0x56, 0x12, 0x10, - 0x0a, 0x03, 0x49, 0x43, 0x45, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x49, 0x43, 0x45, - 0x12, 0x12, 0x0a, 0x04, 0x50, 0x48, 0x45, 0x56, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x50, 0x48, 0x45, 0x56, 0x22, 0xb8, 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x79, 0x65, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x6c, 0x75, 0x67, 0x22, 0x50, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x4d, 0x4d, 0x59, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4d, 0x4d, + 0x59, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x4d, 0x4d, 0x59, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, + 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, - 0x1e, 0x0a, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x4d, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0x90, - 0x07, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, - 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, - 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x12, 0x23, - 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, - 0x73, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x49, 0x64, 0x1a, 0xbb, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, - 0x79, 0x6c, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, - 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, - 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, - 0x64, 0x22, 0xf0, 0x02, 0x0a, 0x1d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x6b, 0x65, 0x49, 0x64, - 0x12, 0x29, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x13, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x79, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x56, - 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, - 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, - 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, - 0x6b, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x33, - 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, - 0x22, 0xa0, 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, - 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x1e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x17, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, - 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, - 0x74, 0x79, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, - 0x30, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, - 0x42, 0x79, 0x53, 0x6c, 0x75, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, - 0x67, 0x22, 0x4c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, - 0x6b, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x73, 0x22, - 0xad, 0x02, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x65, - 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x65, 0x6d, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x21, - 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, - 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, - 0xb0, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, - 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x2a, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4b, 0x65, 0x79, 0x22, 0x5b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x20, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, + 0x22, 0x34, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, @@ -4455,215 +3127,512 @@ var file_pkg_grpc_device_definition_proto_rawDesc = []byte{ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x61, 0x6b, 0x65, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, - 0x67, 0x0a, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, - 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, + 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, + 0x6c, 0x75, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x53, + 0x6c, 0x75, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x6c, 0x75, + 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x6c, + 0x75, 0x67, 0x22, 0xeb, 0x02, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, + 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x77, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x4d, 0x59, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x6b, 0x65, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x6b, 0x65, 0x49, 0x44, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x22, 0x4f, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x83, 0x04, 0x0a, 0x0b, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x1b, + 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x69, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x1b, 0x61, 0x75, + 0x74, 0x6f, 0x5f, 0x70, 0x69, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x18, 0x61, 0x75, 0x74, + 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, + 0x65, 0x63, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x1a, 0x64, 0x0a, 0x18, 0x41, 0x75, + 0x74, 0x6f, 0x50, 0x69, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x42, 0x45, 0x56, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x42, 0x45, 0x56, 0x12, 0x10, 0x0a, 0x03, 0x48, 0x45, 0x56, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x48, 0x45, 0x56, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x43, + 0x45, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x49, 0x43, 0x45, 0x12, 0x12, 0x0a, 0x04, + 0x50, 0x48, 0x45, 0x56, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50, 0x48, 0x45, 0x56, + 0x22, 0xb8, 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, + 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x4d, + 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x1e, 0x0a, 0x0c, 0x42, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0x90, 0x07, 0x0a, 0x1d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x24, 0x0a, + 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, + 0x65, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0b, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x1a, + 0xbb, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xc9, 0x01, - 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, - 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xf0, 0x02, + 0x0a, 0x1d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x07, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0e, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x13, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x5f, 0x76, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x56, 0x69, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x62, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x49, 0x44, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0xa0, 0x02, 0x0a, + 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, + 0x27, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, + 0x79, 0x6c, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x73, 0x22, 0x77, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0xb0, 0x02, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x98, 0x01, + 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, - 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, - 0x2a, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x2c, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, - 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x59, 0x65, 0x61, 0x72, 0x12, 0x19, - 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x32, 0x8e, 0x13, 0x0a, 0x17, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, - 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, + 0x22, 0x5b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, + 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, + 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x85, 0x01, 0x0a, + 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x67, + 0x0a, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, + 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xc9, 0x01, 0x0a, + 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x14, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2a, + 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x2c, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, + 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x59, 0x65, 0x61, 0x72, 0x12, 0x19, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x32, 0xd3, 0x0d, 0x0a, 0x17, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, + 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x4d, - 0x59, 0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x4d, - 0x59, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x49, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, - 0x42, 0x79, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x42, 0x79, 0x53, 0x6c, 0x75, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x12, 0x4f, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x42, 0x79, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x73, 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, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x1c, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, - 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x63, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x45, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, - 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x51, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, - 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, + 0x79, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x74, 0x0a, 0x23, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, + 0x65, 0x73, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x74, - 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x73, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x45, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, + 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 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, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 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, 0x1f, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, - 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, - 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x26, - 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 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, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, - 0x44, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x25, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x79, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, - 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x49, 0x4d, 0x4f, 0x2d, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x45, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, + 0x79, 0x49, 0x44, 0x12, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x58, 0x0a, 0x26, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 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, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x39, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x49, 0x4d, + 0x4f, 0x2d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x2d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -4678,152 +3647,116 @@ func file_pkg_grpc_device_definition_proto_rawDescGZIP() []byte { return file_pkg_grpc_device_definition_proto_rawDescData } -var file_pkg_grpc_device_definition_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_pkg_grpc_device_definition_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_pkg_grpc_device_definition_proto_goTypes = []interface{}{ (*GetDeviceDefinitionRequest)(nil), // 0: grpc.GetDeviceDefinitionRequest - (*GetDeviceDefinitionResponse)(nil), // 1: grpc.GetDeviceDefinitionResponse - (*GetDeviceDefinitionItemResponse)(nil), // 2: grpc.GetDeviceDefinitionItemResponse - (*GetDevicesMMYResponse)(nil), // 3: grpc.GetDevicesMMYResponse - (*GetDevicesMMYItemResponse)(nil), // 4: grpc.GetDevicesMMYItemResponse - (*ExternalID)(nil), // 5: grpc.ExternalID - (*Metadata)(nil), // 6: grpc.Metadata - (*DeviceTypeAttribute)(nil), // 7: grpc.DeviceTypeAttribute - (*DeviceTypeAttributeRequest)(nil), // 8: grpc.DeviceTypeAttributeRequest - (*DeviceType)(nil), // 9: grpc.DeviceType - (*DeviceStyle)(nil), // 10: grpc.DeviceStyle - (*DeviceMake)(nil), // 11: grpc.DeviceMake - (*VehicleInfo)(nil), // 12: grpc.VehicleInfo - (*GetDeviceDefinitionByMMYRequest)(nil), // 13: grpc.GetDeviceDefinitionByMMYRequest - (*GetIntegrationResponse)(nil), // 14: grpc.GetIntegrationResponse - (*Integration)(nil), // 15: grpc.Integration - (*CreateDeviceDefinitionRequest)(nil), // 16: grpc.CreateDeviceDefinitionRequest - (*BaseResponse)(nil), // 17: grpc.BaseResponse - (*CreateDeviceDefinitionResponse)(nil), // 18: grpc.CreateDeviceDefinitionResponse - (*UpdateDeviceDefinitionRequest)(nil), // 19: grpc.UpdateDeviceDefinitionRequest - (*FilterDeviceDefinitionRequest)(nil), // 20: grpc.FilterDeviceDefinitionRequest - (*GetFilteredDeviceDefinitionsResponse)(nil), // 21: grpc.GetFilteredDeviceDefinitionsResponse - (*FilterDeviceDefinitionsReponse)(nil), // 22: grpc.FilterDeviceDefinitionsReponse - (*CreateDeviceStyleRequest)(nil), // 23: grpc.CreateDeviceStyleRequest - (*GetIntegrationRequest)(nil), // 24: grpc.GetIntegrationRequest - (*GetIntegrationByTokenIDRequest)(nil), // 25: grpc.GetIntegrationByTokenIDRequest - (*CreateDeviceMakeRequest)(nil), // 26: grpc.CreateDeviceMakeRequest - (*GetDeviceStyleByIDRequest)(nil), // 27: grpc.GetDeviceStyleByIDRequest - (*GetDeviceStyleByDeviceDefinitionIDRequest)(nil), // 28: grpc.GetDeviceStyleByDeviceDefinitionIDRequest - (*GetDeviceStyleResponse)(nil), // 29: grpc.GetDeviceStyleResponse - (*CreateIntegrationRequest)(nil), // 30: grpc.CreateIntegrationRequest - (*GetDeviceMakeBySlugRequest)(nil), // 31: grpc.GetDeviceMakeBySlugRequest - (*GetDeviceMakeResponse)(nil), // 32: grpc.GetDeviceMakeResponse - (*UpdateDeviceMakeRequest)(nil), // 33: grpc.UpdateDeviceMakeRequest - (*UpdateDeviceStyleRequest)(nil), // 34: grpc.UpdateDeviceStyleRequest - (*GetDeviceStyleFilterRequest)(nil), // 35: grpc.GetDeviceStyleFilterRequest - (*GetDeviceTypeByIDRequest)(nil), // 36: grpc.GetDeviceTypeByIDRequest - (*GetDeviceTypeResponse)(nil), // 37: grpc.GetDeviceTypeResponse - (*GetDeviceTypeListResponse)(nil), // 38: grpc.GetDeviceTypeListResponse - (*CreateDeviceTypeRequest)(nil), // 39: grpc.CreateDeviceTypeRequest - (*UpdateDeviceTypeRequest)(nil), // 40: grpc.UpdateDeviceTypeRequest - (*CreateDeviceTypeAttributeRequest)(nil), // 41: grpc.CreateDeviceTypeAttributeRequest - (*DeleteDeviceTypeRequest)(nil), // 42: grpc.DeleteDeviceTypeRequest - (*GetDeviceMakeByTokenIdRequest)(nil), // 43: grpc.GetDeviceMakeByTokenIdRequest - (*GetDeviceDefinitionHardwareTemplateByIDRequest)(nil), // 44: grpc.GetDeviceDefinitionHardwareTemplateByIDRequest - (*GetDeviceDefinitionHardwareTemplateByIDResponse)(nil), // 45: grpc.GetDeviceDefinitionHardwareTemplateByIDResponse - (*DeviceImage)(nil), // 46: grpc.DeviceImage - (*GetDeviceImagesResponse)(nil), // 47: grpc.GetDeviceImagesResponse - (*SyncStatusResult)(nil), // 48: grpc.SyncStatusResult - (*GetDeviceDefinitionByMakeAndYearRangeRequest)(nil), // 49: grpc.GetDeviceDefinitionByMakeAndYearRangeRequest - (*Integration_AutoPiPowertrainTemplate)(nil), // 50: grpc.Integration.AutoPiPowertrainTemplate - (*UpdateDeviceDefinitionRequest_DeviceStyles)(nil), // 51: grpc.UpdateDeviceDefinitionRequest.DeviceStyles - (*timestamppb.Timestamp)(nil), // 52: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 53: google.protobuf.Empty + (*GetDevicesMMYResponse)(nil), // 1: grpc.GetDevicesMMYResponse + (*GetDevicesMMYItemResponse)(nil), // 2: grpc.GetDevicesMMYItemResponse + (*ExternalID)(nil), // 3: grpc.ExternalID + (*DeviceTypeAttribute)(nil), // 4: grpc.DeviceTypeAttribute + (*DeviceTypeAttributeRequest)(nil), // 5: grpc.DeviceTypeAttributeRequest + (*DeviceType)(nil), // 6: grpc.DeviceType + (*DeviceStyle)(nil), // 7: grpc.DeviceStyle + (*GetDeviceDefinitionByMMYRequest)(nil), // 8: grpc.GetDeviceDefinitionByMMYRequest + (*GetIntegrationResponse)(nil), // 9: grpc.GetIntegrationResponse + (*Integration)(nil), // 10: grpc.Integration + (*CreateDeviceDefinitionRequest)(nil), // 11: grpc.CreateDeviceDefinitionRequest + (*BaseResponse)(nil), // 12: grpc.BaseResponse + (*CreateDeviceDefinitionResponse)(nil), // 13: grpc.CreateDeviceDefinitionResponse + (*UpdateDeviceDefinitionRequest)(nil), // 14: grpc.UpdateDeviceDefinitionRequest + (*FilterDeviceDefinitionRequest)(nil), // 15: grpc.FilterDeviceDefinitionRequest + (*GetFilteredDeviceDefinitionsResponse)(nil), // 16: grpc.GetFilteredDeviceDefinitionsResponse + (*FilterDeviceDefinitionsReponse)(nil), // 17: grpc.FilterDeviceDefinitionsReponse + (*CreateDeviceStyleRequest)(nil), // 18: grpc.CreateDeviceStyleRequest + (*GetIntegrationRequest)(nil), // 19: grpc.GetIntegrationRequest + (*GetIntegrationByTokenIDRequest)(nil), // 20: grpc.GetIntegrationByTokenIDRequest + (*GetDeviceStyleByIDRequest)(nil), // 21: grpc.GetDeviceStyleByIDRequest + (*GetDeviceStyleByDeviceDefinitionIDRequest)(nil), // 22: grpc.GetDeviceStyleByDeviceDefinitionIDRequest + (*GetDeviceStyleResponse)(nil), // 23: grpc.GetDeviceStyleResponse + (*CreateIntegrationRequest)(nil), // 24: grpc.CreateIntegrationRequest + (*UpdateDeviceStyleRequest)(nil), // 25: grpc.UpdateDeviceStyleRequest + (*GetDeviceStyleFilterRequest)(nil), // 26: grpc.GetDeviceStyleFilterRequest + (*GetDeviceTypeByIDRequest)(nil), // 27: grpc.GetDeviceTypeByIDRequest + (*GetDeviceTypeResponse)(nil), // 28: grpc.GetDeviceTypeResponse + (*GetDeviceTypeListResponse)(nil), // 29: grpc.GetDeviceTypeListResponse + (*CreateDeviceTypeRequest)(nil), // 30: grpc.CreateDeviceTypeRequest + (*UpdateDeviceTypeRequest)(nil), // 31: grpc.UpdateDeviceTypeRequest + (*CreateDeviceTypeAttributeRequest)(nil), // 32: grpc.CreateDeviceTypeAttributeRequest + (*DeleteDeviceTypeRequest)(nil), // 33: grpc.DeleteDeviceTypeRequest + (*GetDeviceDefinitionHardwareTemplateByIDRequest)(nil), // 34: grpc.GetDeviceDefinitionHardwareTemplateByIDRequest + (*GetDeviceDefinitionHardwareTemplateByIDResponse)(nil), // 35: grpc.GetDeviceDefinitionHardwareTemplateByIDResponse + (*DeviceImage)(nil), // 36: grpc.DeviceImage + (*GetDeviceImagesResponse)(nil), // 37: grpc.GetDeviceImagesResponse + (*SyncStatusResult)(nil), // 38: grpc.SyncStatusResult + (*GetDeviceDefinitionByMakeAndYearRangeRequest)(nil), // 39: grpc.GetDeviceDefinitionByMakeAndYearRangeRequest + (*Integration_AutoPiPowertrainTemplate)(nil), // 40: grpc.Integration.AutoPiPowertrainTemplate + (*UpdateDeviceDefinitionRequest_DeviceStyles)(nil), // 41: grpc.UpdateDeviceDefinitionRequest.DeviceStyles + (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 43: google.protobuf.Empty } var file_pkg_grpc_device_definition_proto_depIdxs = []int32{ - 2, // 0: grpc.GetDeviceDefinitionResponse.device_definitions:type_name -> grpc.GetDeviceDefinitionItemResponse - 11, // 1: grpc.GetDeviceDefinitionItemResponse.make:type_name -> grpc.DeviceMake - 10, // 2: grpc.GetDeviceDefinitionItemResponse.device_styles:type_name -> grpc.DeviceStyle - 7, // 3: grpc.GetDeviceDefinitionItemResponse.device_attributes:type_name -> grpc.DeviceTypeAttribute - 5, // 4: grpc.GetDeviceDefinitionItemResponse.external_ids:type_name -> grpc.ExternalID - 4, // 5: grpc.GetDevicesMMYResponse.device:type_name -> grpc.GetDevicesMMYItemResponse - 7, // 6: grpc.DeviceStyle.device_attributes:type_name -> grpc.DeviceTypeAttribute - 5, // 7: grpc.DeviceMake.external_ids_typed:type_name -> grpc.ExternalID - 6, // 8: grpc.DeviceMake.metadata:type_name -> grpc.Metadata - 52, // 9: grpc.DeviceMake.created_at:type_name -> google.protobuf.Timestamp - 52, // 10: grpc.DeviceMake.updated_at:type_name -> google.protobuf.Timestamp - 15, // 11: grpc.GetIntegrationResponse.integrations:type_name -> grpc.Integration - 50, // 12: grpc.Integration.auto_pi_powertrain_template:type_name -> grpc.Integration.AutoPiPowertrainTemplate - 8, // 13: grpc.CreateDeviceDefinitionRequest.device_attributes:type_name -> grpc.DeviceTypeAttributeRequest - 51, // 14: grpc.UpdateDeviceDefinitionRequest.device_styles:type_name -> grpc.UpdateDeviceDefinitionRequest.DeviceStyles - 8, // 15: grpc.UpdateDeviceDefinitionRequest.device_attributes:type_name -> grpc.DeviceTypeAttributeRequest - 5, // 16: grpc.UpdateDeviceDefinitionRequest.external_ids:type_name -> grpc.ExternalID - 22, // 17: grpc.GetFilteredDeviceDefinitionsResponse.items:type_name -> grpc.FilterDeviceDefinitionsReponse - 5, // 18: grpc.FilterDeviceDefinitionsReponse.external_ids:type_name -> grpc.ExternalID - 10, // 19: grpc.GetDeviceStyleResponse.device_styles:type_name -> grpc.DeviceStyle - 11, // 20: grpc.GetDeviceMakeResponse.device_makes:type_name -> grpc.DeviceMake - 7, // 21: grpc.GetDeviceTypeResponse.attributes:type_name -> grpc.DeviceTypeAttribute - 37, // 22: grpc.GetDeviceTypeListResponse.device_types:type_name -> grpc.GetDeviceTypeResponse - 41, // 23: grpc.UpdateDeviceTypeRequest.attributes:type_name -> grpc.CreateDeviceTypeAttributeRequest - 46, // 24: grpc.GetDeviceImagesResponse.images:type_name -> grpc.DeviceImage - 52, // 25: grpc.UpdateDeviceDefinitionRequest.DeviceStyles.created_at:type_name -> google.protobuf.Timestamp - 52, // 26: grpc.UpdateDeviceDefinitionRequest.DeviceStyles.updated_at:type_name -> google.protobuf.Timestamp - 0, // 27: grpc.DeviceDefinitionService.GetDeviceDefinitionByID:input_type -> grpc.GetDeviceDefinitionRequest - 13, // 28: grpc.DeviceDefinitionService.GetDeviceDefinitionByMMY:input_type -> grpc.GetDeviceDefinitionByMMYRequest - 31, // 29: grpc.DeviceDefinitionService.GetDeviceMakeBySlug:input_type -> grpc.GetDeviceMakeBySlugRequest - 43, // 30: grpc.DeviceDefinitionService.GetDeviceMakeByTokenID:input_type -> grpc.GetDeviceMakeByTokenIdRequest - 53, // 31: grpc.DeviceDefinitionService.GetDeviceMakes:input_type -> google.protobuf.Empty - 53, // 32: grpc.DeviceDefinitionService.GetIntegrations:input_type -> google.protobuf.Empty - 24, // 33: grpc.DeviceDefinitionService.GetIntegrationByID:input_type -> grpc.GetIntegrationRequest - 16, // 34: grpc.DeviceDefinitionService.CreateDeviceDefinition:input_type -> grpc.CreateDeviceDefinitionRequest - 23, // 35: grpc.DeviceDefinitionService.CreateDeviceStyle:input_type -> grpc.CreateDeviceStyleRequest - 26, // 36: grpc.DeviceDefinitionService.CreateDeviceMake:input_type -> grpc.CreateDeviceMakeRequest - 30, // 37: grpc.DeviceDefinitionService.CreateIntegration:input_type -> grpc.CreateIntegrationRequest - 19, // 38: grpc.DeviceDefinitionService.UpdateDeviceDefinition:input_type -> grpc.UpdateDeviceDefinitionRequest - 20, // 39: grpc.DeviceDefinitionService.GetFilteredDeviceDefinition:input_type -> grpc.FilterDeviceDefinitionRequest - 27, // 40: grpc.DeviceDefinitionService.GetDeviceStyleByID:input_type -> grpc.GetDeviceStyleByIDRequest - 27, // 41: grpc.DeviceDefinitionService.GetDeviceStyleByExternalID:input_type -> grpc.GetDeviceStyleByIDRequest - 28, // 42: grpc.DeviceDefinitionService.GetDeviceStylesByDeviceDefinitionID:input_type -> grpc.GetDeviceStyleByDeviceDefinitionIDRequest - 35, // 43: grpc.DeviceDefinitionService.GetDeviceStylesByFilter:input_type -> grpc.GetDeviceStyleFilterRequest - 33, // 44: grpc.DeviceDefinitionService.UpdateDeviceMake:input_type -> grpc.UpdateDeviceMakeRequest - 34, // 45: grpc.DeviceDefinitionService.UpdateDeviceStyle:input_type -> grpc.UpdateDeviceStyleRequest - 36, // 46: grpc.DeviceDefinitionService.GetDeviceTypesByID:input_type -> grpc.GetDeviceTypeByIDRequest - 53, // 47: grpc.DeviceDefinitionService.GetDeviceTypes:input_type -> google.protobuf.Empty - 39, // 48: grpc.DeviceDefinitionService.CreateDeviceType:input_type -> grpc.CreateDeviceTypeRequest - 40, // 49: grpc.DeviceDefinitionService.UpdateDeviceType:input_type -> grpc.UpdateDeviceTypeRequest - 42, // 50: grpc.DeviceDefinitionService.DeleteDeviceType:input_type -> grpc.DeleteDeviceTypeRequest - 44, // 51: grpc.DeviceDefinitionService.GetDeviceDefinitionHardwareTemplateByID:input_type -> grpc.GetDeviceDefinitionHardwareTemplateByIDRequest - 53, // 52: grpc.DeviceDefinitionService.SyncDeviceDefinitionsWithElasticSearch:input_type -> google.protobuf.Empty - 25, // 53: grpc.DeviceDefinitionService.GetIntegrationByTokenID:input_type -> grpc.GetIntegrationByTokenIDRequest - 49, // 54: grpc.DeviceDefinitionService.GetDeviceDefinitionByMakeAndYearRange:input_type -> grpc.GetDeviceDefinitionByMakeAndYearRangeRequest - 1, // 55: grpc.DeviceDefinitionService.GetDeviceDefinitionByID:output_type -> grpc.GetDeviceDefinitionResponse - 2, // 56: grpc.DeviceDefinitionService.GetDeviceDefinitionByMMY:output_type -> grpc.GetDeviceDefinitionItemResponse - 11, // 57: grpc.DeviceDefinitionService.GetDeviceMakeBySlug:output_type -> grpc.DeviceMake - 11, // 58: grpc.DeviceDefinitionService.GetDeviceMakeByTokenID:output_type -> grpc.DeviceMake - 32, // 59: grpc.DeviceDefinitionService.GetDeviceMakes:output_type -> grpc.GetDeviceMakeResponse - 14, // 60: grpc.DeviceDefinitionService.GetIntegrations:output_type -> grpc.GetIntegrationResponse - 15, // 61: grpc.DeviceDefinitionService.GetIntegrationByID:output_type -> grpc.Integration - 18, // 62: grpc.DeviceDefinitionService.CreateDeviceDefinition:output_type -> grpc.CreateDeviceDefinitionResponse - 17, // 63: grpc.DeviceDefinitionService.CreateDeviceStyle:output_type -> grpc.BaseResponse - 17, // 64: grpc.DeviceDefinitionService.CreateDeviceMake:output_type -> grpc.BaseResponse - 17, // 65: grpc.DeviceDefinitionService.CreateIntegration:output_type -> grpc.BaseResponse - 17, // 66: grpc.DeviceDefinitionService.UpdateDeviceDefinition:output_type -> grpc.BaseResponse - 21, // 67: grpc.DeviceDefinitionService.GetFilteredDeviceDefinition:output_type -> grpc.GetFilteredDeviceDefinitionsResponse - 10, // 68: grpc.DeviceDefinitionService.GetDeviceStyleByID:output_type -> grpc.DeviceStyle - 10, // 69: grpc.DeviceDefinitionService.GetDeviceStyleByExternalID:output_type -> grpc.DeviceStyle - 29, // 70: grpc.DeviceDefinitionService.GetDeviceStylesByDeviceDefinitionID:output_type -> grpc.GetDeviceStyleResponse - 29, // 71: grpc.DeviceDefinitionService.GetDeviceStylesByFilter:output_type -> grpc.GetDeviceStyleResponse - 17, // 72: grpc.DeviceDefinitionService.UpdateDeviceMake:output_type -> grpc.BaseResponse - 17, // 73: grpc.DeviceDefinitionService.UpdateDeviceStyle:output_type -> grpc.BaseResponse - 37, // 74: grpc.DeviceDefinitionService.GetDeviceTypesByID:output_type -> grpc.GetDeviceTypeResponse - 38, // 75: grpc.DeviceDefinitionService.GetDeviceTypes:output_type -> grpc.GetDeviceTypeListResponse - 17, // 76: grpc.DeviceDefinitionService.CreateDeviceType:output_type -> grpc.BaseResponse - 17, // 77: grpc.DeviceDefinitionService.UpdateDeviceType:output_type -> grpc.BaseResponse - 17, // 78: grpc.DeviceDefinitionService.DeleteDeviceType:output_type -> grpc.BaseResponse - 45, // 79: grpc.DeviceDefinitionService.GetDeviceDefinitionHardwareTemplateByID:output_type -> grpc.GetDeviceDefinitionHardwareTemplateByIDResponse - 48, // 80: grpc.DeviceDefinitionService.SyncDeviceDefinitionsWithElasticSearch:output_type -> grpc.SyncStatusResult - 15, // 81: grpc.DeviceDefinitionService.GetIntegrationByTokenID:output_type -> grpc.Integration - 1, // 82: grpc.DeviceDefinitionService.GetDeviceDefinitionByMakeAndYearRange:output_type -> grpc.GetDeviceDefinitionResponse - 55, // [55:83] is the sub-list for method output_type - 27, // [27:55] is the sub-list for method input_type - 27, // [27:27] is the sub-list for extension type_name - 27, // [27:27] is the sub-list for extension extendee - 0, // [0:27] is the sub-list for field type_name + 2, // 0: grpc.GetDevicesMMYResponse.device:type_name -> grpc.GetDevicesMMYItemResponse + 4, // 1: grpc.DeviceStyle.device_attributes:type_name -> grpc.DeviceTypeAttribute + 10, // 2: grpc.GetIntegrationResponse.integrations:type_name -> grpc.Integration + 40, // 3: grpc.Integration.auto_pi_powertrain_template:type_name -> grpc.Integration.AutoPiPowertrainTemplate + 5, // 4: grpc.CreateDeviceDefinitionRequest.device_attributes:type_name -> grpc.DeviceTypeAttributeRequest + 41, // 5: grpc.UpdateDeviceDefinitionRequest.device_styles:type_name -> grpc.UpdateDeviceDefinitionRequest.DeviceStyles + 5, // 6: grpc.UpdateDeviceDefinitionRequest.device_attributes:type_name -> grpc.DeviceTypeAttributeRequest + 3, // 7: grpc.UpdateDeviceDefinitionRequest.external_ids:type_name -> grpc.ExternalID + 17, // 8: grpc.GetFilteredDeviceDefinitionsResponse.items:type_name -> grpc.FilterDeviceDefinitionsReponse + 3, // 9: grpc.FilterDeviceDefinitionsReponse.external_ids:type_name -> grpc.ExternalID + 7, // 10: grpc.GetDeviceStyleResponse.device_styles:type_name -> grpc.DeviceStyle + 4, // 11: grpc.GetDeviceTypeResponse.attributes:type_name -> grpc.DeviceTypeAttribute + 28, // 12: grpc.GetDeviceTypeListResponse.device_types:type_name -> grpc.GetDeviceTypeResponse + 32, // 13: grpc.UpdateDeviceTypeRequest.attributes:type_name -> grpc.CreateDeviceTypeAttributeRequest + 36, // 14: grpc.GetDeviceImagesResponse.images:type_name -> grpc.DeviceImage + 42, // 15: grpc.UpdateDeviceDefinitionRequest.DeviceStyles.created_at:type_name -> google.protobuf.Timestamp + 42, // 16: grpc.UpdateDeviceDefinitionRequest.DeviceStyles.updated_at:type_name -> google.protobuf.Timestamp + 43, // 17: grpc.DeviceDefinitionService.GetIntegrations:input_type -> google.protobuf.Empty + 19, // 18: grpc.DeviceDefinitionService.GetIntegrationByID:input_type -> grpc.GetIntegrationRequest + 11, // 19: grpc.DeviceDefinitionService.CreateDeviceDefinition:input_type -> grpc.CreateDeviceDefinitionRequest + 18, // 20: grpc.DeviceDefinitionService.CreateDeviceStyle:input_type -> grpc.CreateDeviceStyleRequest + 24, // 21: grpc.DeviceDefinitionService.CreateIntegration:input_type -> grpc.CreateIntegrationRequest + 14, // 22: grpc.DeviceDefinitionService.UpdateDeviceDefinition:input_type -> grpc.UpdateDeviceDefinitionRequest + 15, // 23: grpc.DeviceDefinitionService.GetFilteredDeviceDefinition:input_type -> grpc.FilterDeviceDefinitionRequest + 21, // 24: grpc.DeviceDefinitionService.GetDeviceStyleByID:input_type -> grpc.GetDeviceStyleByIDRequest + 21, // 25: grpc.DeviceDefinitionService.GetDeviceStyleByExternalID:input_type -> grpc.GetDeviceStyleByIDRequest + 22, // 26: grpc.DeviceDefinitionService.GetDeviceStylesByDeviceDefinitionID:input_type -> grpc.GetDeviceStyleByDeviceDefinitionIDRequest + 26, // 27: grpc.DeviceDefinitionService.GetDeviceStylesByFilter:input_type -> grpc.GetDeviceStyleFilterRequest + 25, // 28: grpc.DeviceDefinitionService.UpdateDeviceStyle:input_type -> grpc.UpdateDeviceStyleRequest + 27, // 29: grpc.DeviceDefinitionService.GetDeviceTypesByID:input_type -> grpc.GetDeviceTypeByIDRequest + 43, // 30: grpc.DeviceDefinitionService.GetDeviceTypes:input_type -> google.protobuf.Empty + 30, // 31: grpc.DeviceDefinitionService.CreateDeviceType:input_type -> grpc.CreateDeviceTypeRequest + 31, // 32: grpc.DeviceDefinitionService.UpdateDeviceType:input_type -> grpc.UpdateDeviceTypeRequest + 33, // 33: grpc.DeviceDefinitionService.DeleteDeviceType:input_type -> grpc.DeleteDeviceTypeRequest + 34, // 34: grpc.DeviceDefinitionService.GetDeviceDefinitionHardwareTemplateByID:input_type -> grpc.GetDeviceDefinitionHardwareTemplateByIDRequest + 43, // 35: grpc.DeviceDefinitionService.SyncDeviceDefinitionsWithElasticSearch:input_type -> google.protobuf.Empty + 20, // 36: grpc.DeviceDefinitionService.GetIntegrationByTokenID:input_type -> grpc.GetIntegrationByTokenIDRequest + 9, // 37: grpc.DeviceDefinitionService.GetIntegrations:output_type -> grpc.GetIntegrationResponse + 10, // 38: grpc.DeviceDefinitionService.GetIntegrationByID:output_type -> grpc.Integration + 13, // 39: grpc.DeviceDefinitionService.CreateDeviceDefinition:output_type -> grpc.CreateDeviceDefinitionResponse + 12, // 40: grpc.DeviceDefinitionService.CreateDeviceStyle:output_type -> grpc.BaseResponse + 12, // 41: grpc.DeviceDefinitionService.CreateIntegration:output_type -> grpc.BaseResponse + 12, // 42: grpc.DeviceDefinitionService.UpdateDeviceDefinition:output_type -> grpc.BaseResponse + 16, // 43: grpc.DeviceDefinitionService.GetFilteredDeviceDefinition:output_type -> grpc.GetFilteredDeviceDefinitionsResponse + 7, // 44: grpc.DeviceDefinitionService.GetDeviceStyleByID:output_type -> grpc.DeviceStyle + 7, // 45: grpc.DeviceDefinitionService.GetDeviceStyleByExternalID:output_type -> grpc.DeviceStyle + 23, // 46: grpc.DeviceDefinitionService.GetDeviceStylesByDeviceDefinitionID:output_type -> grpc.GetDeviceStyleResponse + 23, // 47: grpc.DeviceDefinitionService.GetDeviceStylesByFilter:output_type -> grpc.GetDeviceStyleResponse + 12, // 48: grpc.DeviceDefinitionService.UpdateDeviceStyle:output_type -> grpc.BaseResponse + 28, // 49: grpc.DeviceDefinitionService.GetDeviceTypesByID:output_type -> grpc.GetDeviceTypeResponse + 29, // 50: grpc.DeviceDefinitionService.GetDeviceTypes:output_type -> grpc.GetDeviceTypeListResponse + 12, // 51: grpc.DeviceDefinitionService.CreateDeviceType:output_type -> grpc.BaseResponse + 12, // 52: grpc.DeviceDefinitionService.UpdateDeviceType:output_type -> grpc.BaseResponse + 12, // 53: grpc.DeviceDefinitionService.DeleteDeviceType:output_type -> grpc.BaseResponse + 35, // 54: grpc.DeviceDefinitionService.GetDeviceDefinitionHardwareTemplateByID:output_type -> grpc.GetDeviceDefinitionHardwareTemplateByIDResponse + 38, // 55: grpc.DeviceDefinitionService.SyncDeviceDefinitionsWithElasticSearch:output_type -> grpc.SyncStatusResult + 10, // 56: grpc.DeviceDefinitionService.GetIntegrationByTokenID:output_type -> grpc.Integration + 37, // [37:57] is the sub-list for method output_type + 17, // [17:37] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_pkg_grpc_device_definition_proto_init() } @@ -4845,30 +3778,6 @@ func file_pkg_grpc_device_definition_proto_init() { } } file_pkg_grpc_device_definition_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceDefinitionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceDefinitionItemResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDevicesMMYResponse); i { case 0: return &v.state @@ -4880,7 +3789,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDevicesMMYItemResponse); i { case 0: return &v.state @@ -4892,7 +3801,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExternalID); i { case 0: return &v.state @@ -4904,19 +3813,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceTypeAttribute); i { case 0: return &v.state @@ -4928,7 +3825,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceTypeAttributeRequest); i { case 0: return &v.state @@ -4940,7 +3837,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceType); i { case 0: return &v.state @@ -4952,7 +3849,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceStyle); i { case 0: return &v.state @@ -4964,31 +3861,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceMake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VehicleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceDefinitionByMMYRequest); i { case 0: return &v.state @@ -5000,7 +3873,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetIntegrationResponse); i { case 0: return &v.state @@ -5012,7 +3885,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Integration); i { case 0: return &v.state @@ -5024,7 +3897,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateDeviceDefinitionRequest); i { case 0: return &v.state @@ -5036,7 +3909,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BaseResponse); i { case 0: return &v.state @@ -5048,7 +3921,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateDeviceDefinitionResponse); i { case 0: return &v.state @@ -5060,7 +3933,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateDeviceDefinitionRequest); i { case 0: return &v.state @@ -5072,7 +3945,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterDeviceDefinitionRequest); i { case 0: return &v.state @@ -5084,7 +3957,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetFilteredDeviceDefinitionsResponse); i { case 0: return &v.state @@ -5096,7 +3969,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterDeviceDefinitionsReponse); i { case 0: return &v.state @@ -5108,7 +3981,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateDeviceStyleRequest); i { case 0: return &v.state @@ -5120,7 +3993,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetIntegrationRequest); i { case 0: return &v.state @@ -5132,7 +4005,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetIntegrationByTokenIDRequest); i { case 0: return &v.state @@ -5144,19 +4017,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateDeviceMakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceStyleByIDRequest); i { case 0: return &v.state @@ -5168,7 +4029,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceStyleByDeviceDefinitionIDRequest); i { case 0: return &v.state @@ -5180,7 +4041,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceStyleResponse); i { case 0: return &v.state @@ -5192,7 +4053,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateIntegrationRequest); i { case 0: return &v.state @@ -5204,43 +4065,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceMakeBySlugRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceMakeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDeviceMakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateDeviceStyleRequest); i { case 0: return &v.state @@ -5252,7 +4077,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceStyleFilterRequest); i { case 0: return &v.state @@ -5264,7 +4089,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceTypeByIDRequest); i { case 0: return &v.state @@ -5276,7 +4101,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceTypeResponse); i { case 0: return &v.state @@ -5288,7 +4113,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceTypeListResponse); i { case 0: return &v.state @@ -5300,7 +4125,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateDeviceTypeRequest); i { case 0: return &v.state @@ -5312,7 +4137,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateDeviceTypeRequest); i { case 0: return &v.state @@ -5324,7 +4149,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateDeviceTypeAttributeRequest); i { case 0: return &v.state @@ -5336,7 +4161,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteDeviceTypeRequest); i { case 0: return &v.state @@ -5348,19 +4173,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceMakeByTokenIdRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_grpc_device_definition_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceDefinitionHardwareTemplateByIDRequest); i { case 0: return &v.state @@ -5372,7 +4185,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceDefinitionHardwareTemplateByIDResponse); i { case 0: return &v.state @@ -5384,7 +4197,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceImage); i { case 0: return &v.state @@ -5396,7 +4209,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceImagesResponse); i { case 0: return &v.state @@ -5408,7 +4221,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncStatusResult); i { case 0: return &v.state @@ -5420,7 +4233,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDeviceDefinitionByMakeAndYearRangeRequest); i { case 0: return &v.state @@ -5432,7 +4245,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Integration_AutoPiPowertrainTemplate); i { case 0: return &v.state @@ -5444,7 +4257,7 @@ func file_pkg_grpc_device_definition_proto_init() { return nil } } - file_pkg_grpc_device_definition_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_pkg_grpc_device_definition_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateDeviceDefinitionRequest_DeviceStyles); i { case 0: return &v.state @@ -5463,7 +4276,7 @@ func file_pkg_grpc_device_definition_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_grpc_device_definition_proto_rawDesc, NumEnums: 0, - NumMessages: 52, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/grpc/device_definition.proto b/pkg/grpc/device_definition.proto index 10959b88..49468d1f 100644 --- a/pkg/grpc/device_definition.proto +++ b/pkg/grpc/device_definition.proto @@ -12,31 +12,6 @@ message GetDeviceDefinitionRequest { string make_slug = 2; } - -message GetDeviceDefinitionResponse { - repeated GetDeviceDefinitionItemResponse device_definitions = 1; -} - -message GetDeviceDefinitionItemResponse { - string device_definition_id = 1; - string name = 2; - string image_url = 3; - bool verified = 6; - DeviceMake make = 8; - repeated DeviceStyle device_styles = 9; - string source = 10 [deprecated = true]; - string external_id = 11 [deprecated = true]; - repeated DeviceTypeAttribute device_attributes = 12; - repeated ExternalID external_ids = 13 [deprecated = true]; - string hardware_template_id = 14 [deprecated = true]; - string name_slug = 15[deprecated = true]; - repeated string transactions = 16; - int32 year = 17; - string model = 18; - string ksuid = 19; - string id = 20; -} - message GetDevicesMMYResponse { repeated GetDevicesMMYItemResponse device = 1; } @@ -55,10 +30,6 @@ message ExternalID { string id = 2; } -message Metadata { - string RideGuideLink = 1; -} - message DeviceTypeAttribute { string name = 1; string label = 2; @@ -97,35 +68,6 @@ message DeviceStyle { string definition_id = 9; } -message DeviceMake { - string id = 1; - string name = 2; - string logo_url = 3; - string oem_platform_name = 4; - uint64 token_id = 5; - string name_slug = 6; - string external_ids = 7 [deprecated = true]; - repeated ExternalID external_ids_typed = 8 [deprecated = true]; - Metadata metadata = 9; - string hardware_template_id = 10 [deprecated = true]; - google.protobuf.Timestamp created_at = 11; - google.protobuf.Timestamp updated_at = 12; -} - -// deprecated -message VehicleInfo { - string fuel_type = 1; - string driven_wheels = 2; - int32 number_of_doors = 3; - int32 base_MSRP = 4; - string EPA_class = 5; - string vehicle_type = 6; - float MPG_highway = 7; - float MPG_city = 8; - float fuel_tank_capacity_gal = 9; - float MPG = 10; -} - message GetDeviceDefinitionByMMYRequest { string make = 1; string makeID = 2; @@ -257,11 +199,6 @@ message GetIntegrationByTokenIDRequest { uint64 token_id = 1; } -message CreateDeviceMakeRequest { - string name = 1; - string hardware_template_id = 2; -} - message GetDeviceStyleByIDRequest { string id = 1; } @@ -281,26 +218,6 @@ message CreateIntegrationRequest { uint64 token_id = 4; } -message GetDeviceMakeBySlugRequest { - string slug = 1; -} - -message GetDeviceMakeResponse { - repeated DeviceMake device_makes = 1; -} - -message UpdateDeviceMakeRequest { - string id = 1; - string name = 2; - string logo_url = 3; - string oem_platform_name = 4; - uint64 token_id = 5; - string name_slug = 6; - string external_ids = 7; - string metadata = 8; - string hardware_template_id = 9; -} - message UpdateDeviceStyleRequest { string id = 1; string name = 2; @@ -359,10 +276,6 @@ message DeleteDeviceTypeRequest { string id = 1; } -message GetDeviceMakeByTokenIdRequest { - string token_id = 1; -} - message GetDeviceDefinitionHardwareTemplateByIDRequest { string id = 1; string integration_id = 2; @@ -396,16 +309,10 @@ message GetDeviceDefinitionByMakeAndYearRangeRequest { } service DeviceDefinitionService { - rpc GetDeviceDefinitionByID(GetDeviceDefinitionRequest) returns (GetDeviceDefinitionResponse); - rpc GetDeviceDefinitionByMMY(GetDeviceDefinitionByMMYRequest) returns (GetDeviceDefinitionItemResponse); - rpc GetDeviceMakeBySlug(GetDeviceMakeBySlugRequest) returns (DeviceMake); - rpc GetDeviceMakeByTokenID(GetDeviceMakeByTokenIdRequest) returns (DeviceMake); - rpc GetDeviceMakes(google.protobuf.Empty) returns (GetDeviceMakeResponse); rpc GetIntegrations(google.protobuf.Empty) returns (GetIntegrationResponse); rpc GetIntegrationByID(GetIntegrationRequest) returns (Integration); rpc CreateDeviceDefinition(CreateDeviceDefinitionRequest) returns (CreateDeviceDefinitionResponse); rpc CreateDeviceStyle(CreateDeviceStyleRequest) returns (BaseResponse); - rpc CreateDeviceMake(CreateDeviceMakeRequest) returns (BaseResponse); rpc CreateIntegration(CreateIntegrationRequest) returns (BaseResponse); rpc UpdateDeviceDefinition(UpdateDeviceDefinitionRequest) returns (BaseResponse); rpc GetFilteredDeviceDefinition(FilterDeviceDefinitionRequest) returns (GetFilteredDeviceDefinitionsResponse); @@ -413,7 +320,6 @@ service DeviceDefinitionService { rpc GetDeviceStyleByExternalID(GetDeviceStyleByIDRequest) returns (DeviceStyle); rpc GetDeviceStylesByDeviceDefinitionID(GetDeviceStyleByDeviceDefinitionIDRequest) returns (GetDeviceStyleResponse); rpc GetDeviceStylesByFilter(GetDeviceStyleFilterRequest) returns (GetDeviceStyleResponse); - rpc UpdateDeviceMake(UpdateDeviceMakeRequest) returns (BaseResponse); rpc UpdateDeviceStyle(UpdateDeviceStyleRequest) returns (BaseResponse); rpc GetDeviceTypesByID(GetDeviceTypeByIDRequest) returns (GetDeviceTypeResponse); rpc GetDeviceTypes(google.protobuf.Empty) returns (GetDeviceTypeListResponse); @@ -423,6 +329,5 @@ service DeviceDefinitionService { rpc GetDeviceDefinitionHardwareTemplateByID(GetDeviceDefinitionHardwareTemplateByIDRequest) returns (GetDeviceDefinitionHardwareTemplateByIDResponse); rpc SyncDeviceDefinitionsWithElasticSearch(google.protobuf.Empty) returns (SyncStatusResult); rpc GetIntegrationByTokenID(GetIntegrationByTokenIDRequest) returns (Integration); - rpc GetDeviceDefinitionByMakeAndYearRange(GetDeviceDefinitionByMakeAndYearRangeRequest) returns (GetDeviceDefinitionResponse); - + } \ No newline at end of file diff --git a/pkg/grpc/device_definition_grpc.pb.go b/pkg/grpc/device_definition_grpc.pb.go index 222e68f1..6598f1f0 100644 --- a/pkg/grpc/device_definition_grpc.pb.go +++ b/pkg/grpc/device_definition_grpc.pb.go @@ -20,16 +20,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - DeviceDefinitionService_GetDeviceDefinitionByID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceDefinitionByID" - DeviceDefinitionService_GetDeviceDefinitionByMMY_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceDefinitionByMMY" - DeviceDefinitionService_GetDeviceMakeBySlug_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceMakeBySlug" - DeviceDefinitionService_GetDeviceMakeByTokenID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceMakeByTokenID" - DeviceDefinitionService_GetDeviceMakes_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceMakes" DeviceDefinitionService_GetIntegrations_FullMethodName = "/grpc.DeviceDefinitionService/GetIntegrations" DeviceDefinitionService_GetIntegrationByID_FullMethodName = "/grpc.DeviceDefinitionService/GetIntegrationByID" DeviceDefinitionService_CreateDeviceDefinition_FullMethodName = "/grpc.DeviceDefinitionService/CreateDeviceDefinition" DeviceDefinitionService_CreateDeviceStyle_FullMethodName = "/grpc.DeviceDefinitionService/CreateDeviceStyle" - DeviceDefinitionService_CreateDeviceMake_FullMethodName = "/grpc.DeviceDefinitionService/CreateDeviceMake" DeviceDefinitionService_CreateIntegration_FullMethodName = "/grpc.DeviceDefinitionService/CreateIntegration" DeviceDefinitionService_UpdateDeviceDefinition_FullMethodName = "/grpc.DeviceDefinitionService/UpdateDeviceDefinition" DeviceDefinitionService_GetFilteredDeviceDefinition_FullMethodName = "/grpc.DeviceDefinitionService/GetFilteredDeviceDefinition" @@ -37,7 +31,6 @@ const ( DeviceDefinitionService_GetDeviceStyleByExternalID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceStyleByExternalID" DeviceDefinitionService_GetDeviceStylesByDeviceDefinitionID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceStylesByDeviceDefinitionID" DeviceDefinitionService_GetDeviceStylesByFilter_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceStylesByFilter" - DeviceDefinitionService_UpdateDeviceMake_FullMethodName = "/grpc.DeviceDefinitionService/UpdateDeviceMake" DeviceDefinitionService_UpdateDeviceStyle_FullMethodName = "/grpc.DeviceDefinitionService/UpdateDeviceStyle" DeviceDefinitionService_GetDeviceTypesByID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceTypesByID" DeviceDefinitionService_GetDeviceTypes_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceTypes" @@ -47,23 +40,16 @@ const ( DeviceDefinitionService_GetDeviceDefinitionHardwareTemplateByID_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceDefinitionHardwareTemplateByID" DeviceDefinitionService_SyncDeviceDefinitionsWithElasticSearch_FullMethodName = "/grpc.DeviceDefinitionService/SyncDeviceDefinitionsWithElasticSearch" DeviceDefinitionService_GetIntegrationByTokenID_FullMethodName = "/grpc.DeviceDefinitionService/GetIntegrationByTokenID" - DeviceDefinitionService_GetDeviceDefinitionByMakeAndYearRange_FullMethodName = "/grpc.DeviceDefinitionService/GetDeviceDefinitionByMakeAndYearRange" ) // DeviceDefinitionServiceClient is the client API for DeviceDefinitionService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type DeviceDefinitionServiceClient interface { - GetDeviceDefinitionByID(ctx context.Context, in *GetDeviceDefinitionRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionResponse, error) - GetDeviceDefinitionByMMY(ctx context.Context, in *GetDeviceDefinitionByMMYRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionItemResponse, error) - GetDeviceMakeBySlug(ctx context.Context, in *GetDeviceMakeBySlugRequest, opts ...grpc.CallOption) (*DeviceMake, error) - GetDeviceMakeByTokenID(ctx context.Context, in *GetDeviceMakeByTokenIdRequest, opts ...grpc.CallOption) (*DeviceMake, error) - GetDeviceMakes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDeviceMakeResponse, error) GetIntegrations(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetIntegrationResponse, error) GetIntegrationByID(ctx context.Context, in *GetIntegrationRequest, opts ...grpc.CallOption) (*Integration, error) CreateDeviceDefinition(ctx context.Context, in *CreateDeviceDefinitionRequest, opts ...grpc.CallOption) (*CreateDeviceDefinitionResponse, error) CreateDeviceStyle(ctx context.Context, in *CreateDeviceStyleRequest, opts ...grpc.CallOption) (*BaseResponse, error) - CreateDeviceMake(ctx context.Context, in *CreateDeviceMakeRequest, opts ...grpc.CallOption) (*BaseResponse, error) CreateIntegration(ctx context.Context, in *CreateIntegrationRequest, opts ...grpc.CallOption) (*BaseResponse, error) UpdateDeviceDefinition(ctx context.Context, in *UpdateDeviceDefinitionRequest, opts ...grpc.CallOption) (*BaseResponse, error) GetFilteredDeviceDefinition(ctx context.Context, in *FilterDeviceDefinitionRequest, opts ...grpc.CallOption) (*GetFilteredDeviceDefinitionsResponse, error) @@ -71,7 +57,6 @@ type DeviceDefinitionServiceClient interface { GetDeviceStyleByExternalID(ctx context.Context, in *GetDeviceStyleByIDRequest, opts ...grpc.CallOption) (*DeviceStyle, error) GetDeviceStylesByDeviceDefinitionID(ctx context.Context, in *GetDeviceStyleByDeviceDefinitionIDRequest, opts ...grpc.CallOption) (*GetDeviceStyleResponse, error) GetDeviceStylesByFilter(ctx context.Context, in *GetDeviceStyleFilterRequest, opts ...grpc.CallOption) (*GetDeviceStyleResponse, error) - UpdateDeviceMake(ctx context.Context, in *UpdateDeviceMakeRequest, opts ...grpc.CallOption) (*BaseResponse, error) UpdateDeviceStyle(ctx context.Context, in *UpdateDeviceStyleRequest, opts ...grpc.CallOption) (*BaseResponse, error) GetDeviceTypesByID(ctx context.Context, in *GetDeviceTypeByIDRequest, opts ...grpc.CallOption) (*GetDeviceTypeResponse, error) GetDeviceTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDeviceTypeListResponse, error) @@ -81,7 +66,6 @@ type DeviceDefinitionServiceClient interface { GetDeviceDefinitionHardwareTemplateByID(ctx context.Context, in *GetDeviceDefinitionHardwareTemplateByIDRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionHardwareTemplateByIDResponse, error) SyncDeviceDefinitionsWithElasticSearch(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SyncStatusResult, error) GetIntegrationByTokenID(ctx context.Context, in *GetIntegrationByTokenIDRequest, opts ...grpc.CallOption) (*Integration, error) - GetDeviceDefinitionByMakeAndYearRange(ctx context.Context, in *GetDeviceDefinitionByMakeAndYearRangeRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionResponse, error) } type deviceDefinitionServiceClient struct { @@ -92,51 +76,6 @@ func NewDeviceDefinitionServiceClient(cc grpc.ClientConnInterface) DeviceDefinit return &deviceDefinitionServiceClient{cc} } -func (c *deviceDefinitionServiceClient) GetDeviceDefinitionByID(ctx context.Context, in *GetDeviceDefinitionRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionResponse, error) { - out := new(GetDeviceDefinitionResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceDefinitionByID_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceDefinitionServiceClient) GetDeviceDefinitionByMMY(ctx context.Context, in *GetDeviceDefinitionByMMYRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionItemResponse, error) { - out := new(GetDeviceDefinitionItemResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceDefinitionByMMY_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceDefinitionServiceClient) GetDeviceMakeBySlug(ctx context.Context, in *GetDeviceMakeBySlugRequest, opts ...grpc.CallOption) (*DeviceMake, error) { - out := new(DeviceMake) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceMakeBySlug_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceDefinitionServiceClient) GetDeviceMakeByTokenID(ctx context.Context, in *GetDeviceMakeByTokenIdRequest, opts ...grpc.CallOption) (*DeviceMake, error) { - out := new(DeviceMake) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceMakeByTokenID_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceDefinitionServiceClient) GetDeviceMakes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDeviceMakeResponse, error) { - out := new(GetDeviceMakeResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceMakes_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *deviceDefinitionServiceClient) GetIntegrations(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetIntegrationResponse, error) { out := new(GetIntegrationResponse) err := c.cc.Invoke(ctx, DeviceDefinitionService_GetIntegrations_FullMethodName, in, out, opts...) @@ -173,15 +112,6 @@ func (c *deviceDefinitionServiceClient) CreateDeviceStyle(ctx context.Context, i return out, nil } -func (c *deviceDefinitionServiceClient) CreateDeviceMake(ctx context.Context, in *CreateDeviceMakeRequest, opts ...grpc.CallOption) (*BaseResponse, error) { - out := new(BaseResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_CreateDeviceMake_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *deviceDefinitionServiceClient) CreateIntegration(ctx context.Context, in *CreateIntegrationRequest, opts ...grpc.CallOption) (*BaseResponse, error) { out := new(BaseResponse) err := c.cc.Invoke(ctx, DeviceDefinitionService_CreateIntegration_FullMethodName, in, out, opts...) @@ -245,15 +175,6 @@ func (c *deviceDefinitionServiceClient) GetDeviceStylesByFilter(ctx context.Cont return out, nil } -func (c *deviceDefinitionServiceClient) UpdateDeviceMake(ctx context.Context, in *UpdateDeviceMakeRequest, opts ...grpc.CallOption) (*BaseResponse, error) { - out := new(BaseResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_UpdateDeviceMake_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *deviceDefinitionServiceClient) UpdateDeviceStyle(ctx context.Context, in *UpdateDeviceStyleRequest, opts ...grpc.CallOption) (*BaseResponse, error) { out := new(BaseResponse) err := c.cc.Invoke(ctx, DeviceDefinitionService_UpdateDeviceStyle_FullMethodName, in, out, opts...) @@ -335,29 +256,14 @@ func (c *deviceDefinitionServiceClient) GetIntegrationByTokenID(ctx context.Cont return out, nil } -func (c *deviceDefinitionServiceClient) GetDeviceDefinitionByMakeAndYearRange(ctx context.Context, in *GetDeviceDefinitionByMakeAndYearRangeRequest, opts ...grpc.CallOption) (*GetDeviceDefinitionResponse, error) { - out := new(GetDeviceDefinitionResponse) - err := c.cc.Invoke(ctx, DeviceDefinitionService_GetDeviceDefinitionByMakeAndYearRange_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // DeviceDefinitionServiceServer is the server API for DeviceDefinitionService service. // All implementations must embed UnimplementedDeviceDefinitionServiceServer // for forward compatibility type DeviceDefinitionServiceServer interface { - GetDeviceDefinitionByID(context.Context, *GetDeviceDefinitionRequest) (*GetDeviceDefinitionResponse, error) - GetDeviceDefinitionByMMY(context.Context, *GetDeviceDefinitionByMMYRequest) (*GetDeviceDefinitionItemResponse, error) - GetDeviceMakeBySlug(context.Context, *GetDeviceMakeBySlugRequest) (*DeviceMake, error) - GetDeviceMakeByTokenID(context.Context, *GetDeviceMakeByTokenIdRequest) (*DeviceMake, error) - GetDeviceMakes(context.Context, *emptypb.Empty) (*GetDeviceMakeResponse, error) GetIntegrations(context.Context, *emptypb.Empty) (*GetIntegrationResponse, error) GetIntegrationByID(context.Context, *GetIntegrationRequest) (*Integration, error) CreateDeviceDefinition(context.Context, *CreateDeviceDefinitionRequest) (*CreateDeviceDefinitionResponse, error) CreateDeviceStyle(context.Context, *CreateDeviceStyleRequest) (*BaseResponse, error) - CreateDeviceMake(context.Context, *CreateDeviceMakeRequest) (*BaseResponse, error) CreateIntegration(context.Context, *CreateIntegrationRequest) (*BaseResponse, error) UpdateDeviceDefinition(context.Context, *UpdateDeviceDefinitionRequest) (*BaseResponse, error) GetFilteredDeviceDefinition(context.Context, *FilterDeviceDefinitionRequest) (*GetFilteredDeviceDefinitionsResponse, error) @@ -365,7 +271,6 @@ type DeviceDefinitionServiceServer interface { GetDeviceStyleByExternalID(context.Context, *GetDeviceStyleByIDRequest) (*DeviceStyle, error) GetDeviceStylesByDeviceDefinitionID(context.Context, *GetDeviceStyleByDeviceDefinitionIDRequest) (*GetDeviceStyleResponse, error) GetDeviceStylesByFilter(context.Context, *GetDeviceStyleFilterRequest) (*GetDeviceStyleResponse, error) - UpdateDeviceMake(context.Context, *UpdateDeviceMakeRequest) (*BaseResponse, error) UpdateDeviceStyle(context.Context, *UpdateDeviceStyleRequest) (*BaseResponse, error) GetDeviceTypesByID(context.Context, *GetDeviceTypeByIDRequest) (*GetDeviceTypeResponse, error) GetDeviceTypes(context.Context, *emptypb.Empty) (*GetDeviceTypeListResponse, error) @@ -375,7 +280,6 @@ type DeviceDefinitionServiceServer interface { GetDeviceDefinitionHardwareTemplateByID(context.Context, *GetDeviceDefinitionHardwareTemplateByIDRequest) (*GetDeviceDefinitionHardwareTemplateByIDResponse, error) SyncDeviceDefinitionsWithElasticSearch(context.Context, *emptypb.Empty) (*SyncStatusResult, error) GetIntegrationByTokenID(context.Context, *GetIntegrationByTokenIDRequest) (*Integration, error) - GetDeviceDefinitionByMakeAndYearRange(context.Context, *GetDeviceDefinitionByMakeAndYearRangeRequest) (*GetDeviceDefinitionResponse, error) mustEmbedUnimplementedDeviceDefinitionServiceServer() } @@ -383,21 +287,6 @@ type DeviceDefinitionServiceServer interface { type UnimplementedDeviceDefinitionServiceServer struct { } -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceDefinitionByID(context.Context, *GetDeviceDefinitionRequest) (*GetDeviceDefinitionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceDefinitionByID not implemented") -} -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceDefinitionByMMY(context.Context, *GetDeviceDefinitionByMMYRequest) (*GetDeviceDefinitionItemResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceDefinitionByMMY not implemented") -} -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceMakeBySlug(context.Context, *GetDeviceMakeBySlugRequest) (*DeviceMake, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceMakeBySlug not implemented") -} -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceMakeByTokenID(context.Context, *GetDeviceMakeByTokenIdRequest) (*DeviceMake, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceMakeByTokenID not implemented") -} -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceMakes(context.Context, *emptypb.Empty) (*GetDeviceMakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceMakes not implemented") -} func (UnimplementedDeviceDefinitionServiceServer) GetIntegrations(context.Context, *emptypb.Empty) (*GetIntegrationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIntegrations not implemented") } @@ -410,9 +299,6 @@ func (UnimplementedDeviceDefinitionServiceServer) CreateDeviceDefinition(context func (UnimplementedDeviceDefinitionServiceServer) CreateDeviceStyle(context.Context, *CreateDeviceStyleRequest) (*BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceStyle not implemented") } -func (UnimplementedDeviceDefinitionServiceServer) CreateDeviceMake(context.Context, *CreateDeviceMakeRequest) (*BaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceMake not implemented") -} func (UnimplementedDeviceDefinitionServiceServer) CreateIntegration(context.Context, *CreateIntegrationRequest) (*BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateIntegration not implemented") } @@ -434,9 +320,6 @@ func (UnimplementedDeviceDefinitionServiceServer) GetDeviceStylesByDeviceDefinit func (UnimplementedDeviceDefinitionServiceServer) GetDeviceStylesByFilter(context.Context, *GetDeviceStyleFilterRequest) (*GetDeviceStyleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDeviceStylesByFilter not implemented") } -func (UnimplementedDeviceDefinitionServiceServer) UpdateDeviceMake(context.Context, *UpdateDeviceMakeRequest) (*BaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceMake not implemented") -} func (UnimplementedDeviceDefinitionServiceServer) UpdateDeviceStyle(context.Context, *UpdateDeviceStyleRequest) (*BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceStyle not implemented") } @@ -464,9 +347,6 @@ func (UnimplementedDeviceDefinitionServiceServer) SyncDeviceDefinitionsWithElast func (UnimplementedDeviceDefinitionServiceServer) GetIntegrationByTokenID(context.Context, *GetIntegrationByTokenIDRequest) (*Integration, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIntegrationByTokenID not implemented") } -func (UnimplementedDeviceDefinitionServiceServer) GetDeviceDefinitionByMakeAndYearRange(context.Context, *GetDeviceDefinitionByMakeAndYearRangeRequest) (*GetDeviceDefinitionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeviceDefinitionByMakeAndYearRange not implemented") -} func (UnimplementedDeviceDefinitionServiceServer) mustEmbedUnimplementedDeviceDefinitionServiceServer() { } @@ -481,96 +361,6 @@ func RegisterDeviceDefinitionServiceServer(s grpc.ServiceRegistrar, srv DeviceDe s.RegisterService(&DeviceDefinitionService_ServiceDesc, srv) } -func _DeviceDefinitionService_GetDeviceDefinitionByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceDefinitionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceDefinitionByID_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByID(ctx, req.(*GetDeviceDefinitionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceDefinitionService_GetDeviceDefinitionByMMY_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceDefinitionByMMYRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByMMY(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceDefinitionByMMY_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByMMY(ctx, req.(*GetDeviceDefinitionByMMYRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceDefinitionService_GetDeviceMakeBySlug_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceMakeBySlugRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakeBySlug(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceMakeBySlug_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakeBySlug(ctx, req.(*GetDeviceMakeBySlugRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceDefinitionService_GetDeviceMakeByTokenID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceMakeByTokenIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakeByTokenID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceMakeByTokenID_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakeByTokenID(ctx, req.(*GetDeviceMakeByTokenIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceDefinitionService_GetDeviceMakes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceMakes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceMakes(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - func _DeviceDefinitionService_GetIntegrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { @@ -643,24 +433,6 @@ func _DeviceDefinitionService_CreateDeviceStyle_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } -func _DeviceDefinitionService_CreateDeviceMake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDeviceMakeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).CreateDeviceMake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_CreateDeviceMake_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).CreateDeviceMake(ctx, req.(*CreateDeviceMakeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _DeviceDefinitionService_CreateIntegration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateIntegrationRequest) if err := dec(in); err != nil { @@ -787,24 +559,6 @@ func _DeviceDefinitionService_GetDeviceStylesByFilter_Handler(srv interface{}, c return interceptor(ctx, in, info, handler) } -func _DeviceDefinitionService_UpdateDeviceMake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateDeviceMakeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).UpdateDeviceMake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_UpdateDeviceMake_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).UpdateDeviceMake(ctx, req.(*UpdateDeviceMakeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _DeviceDefinitionService_UpdateDeviceStyle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateDeviceStyleRequest) if err := dec(in); err != nil { @@ -967,24 +721,6 @@ func _DeviceDefinitionService_GetIntegrationByTokenID_Handler(srv interface{}, c return interceptor(ctx, in, info, handler) } -func _DeviceDefinitionService_GetDeviceDefinitionByMakeAndYearRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceDefinitionByMakeAndYearRangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByMakeAndYearRange(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceDefinitionService_GetDeviceDefinitionByMakeAndYearRange_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceDefinitionServiceServer).GetDeviceDefinitionByMakeAndYearRange(ctx, req.(*GetDeviceDefinitionByMakeAndYearRangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - // DeviceDefinitionService_ServiceDesc is the grpc.ServiceDesc for DeviceDefinitionService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -992,26 +728,6 @@ var DeviceDefinitionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.DeviceDefinitionService", HandlerType: (*DeviceDefinitionServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "GetDeviceDefinitionByID", - Handler: _DeviceDefinitionService_GetDeviceDefinitionByID_Handler, - }, - { - MethodName: "GetDeviceDefinitionByMMY", - Handler: _DeviceDefinitionService_GetDeviceDefinitionByMMY_Handler, - }, - { - MethodName: "GetDeviceMakeBySlug", - Handler: _DeviceDefinitionService_GetDeviceMakeBySlug_Handler, - }, - { - MethodName: "GetDeviceMakeByTokenID", - Handler: _DeviceDefinitionService_GetDeviceMakeByTokenID_Handler, - }, - { - MethodName: "GetDeviceMakes", - Handler: _DeviceDefinitionService_GetDeviceMakes_Handler, - }, { MethodName: "GetIntegrations", Handler: _DeviceDefinitionService_GetIntegrations_Handler, @@ -1028,10 +744,6 @@ var DeviceDefinitionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateDeviceStyle", Handler: _DeviceDefinitionService_CreateDeviceStyle_Handler, }, - { - MethodName: "CreateDeviceMake", - Handler: _DeviceDefinitionService_CreateDeviceMake_Handler, - }, { MethodName: "CreateIntegration", Handler: _DeviceDefinitionService_CreateIntegration_Handler, @@ -1060,10 +772,6 @@ var DeviceDefinitionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetDeviceStylesByFilter", Handler: _DeviceDefinitionService_GetDeviceStylesByFilter_Handler, }, - { - MethodName: "UpdateDeviceMake", - Handler: _DeviceDefinitionService_UpdateDeviceMake_Handler, - }, { MethodName: "UpdateDeviceStyle", Handler: _DeviceDefinitionService_UpdateDeviceStyle_Handler, @@ -1100,10 +808,6 @@ var DeviceDefinitionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetIntegrationByTokenID", Handler: _DeviceDefinitionService_GetIntegrationByTokenID_Handler, }, - { - MethodName: "GetDeviceDefinitionByMakeAndYearRange", - Handler: _DeviceDefinitionService_GetDeviceDefinitionByMakeAndYearRange_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/grpc/device_definition.proto", From 8b8d42d41ccbdc0303e6a0964eab25a5ff3042d2 Mon Sep 17 00:00:00 2001 From: James Reategui Date: Wed, 11 Jun 2025 21:01:12 -0400 Subject: [PATCH 3/6] fix more errors --- internal/core/queries/decode_vin_test.go | 6 +- .../services/vin_decoding_service_test.go | 4 +- .../db/repositories/device_make_repo.go | 84 ------------------ .../mocks/device_make_repo_mock.go | 86 ------------------- .../db/repositories/vin_repo.go | 9 +- 5 files changed, 11 insertions(+), 178 deletions(-) delete mode 100644 internal/infrastructure/db/repositories/device_make_repo.go delete mode 100644 internal/infrastructure/db/repositories/mocks/device_make_repo_mock.go diff --git a/internal/core/queries/decode_vin_test.go b/internal/core/queries/decode_vin_test.go index e22f7129..f3427f78 100644 --- a/internal/core/queries/decode_vin_test.go +++ b/internal/core/queries/decode_vin_test.go @@ -91,7 +91,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingDD_UpdatesAt const vin = "1FMCU0G61MUA52727" // ford escape 2021 dm := dbtesthelper.SetupCreateMake("Ford") - dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm, "Escape", 2021, s.pdb) + dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm.Name, "Escape", 2021, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles vinInfoResp := &coremodels.DrivlyVINResponse{ @@ -199,7 +199,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD_WithMismatchWM dmFord := dbtesthelper.SetupCreateMake("Ford") dmLincoln := dbtesthelper.SetupCreateMake("Lincoln") _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dmFord.ID, s.pdb) + _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dmFord.Name, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles vinInfoResp := &coremodels.DrivlyVINResponse{ @@ -353,7 +353,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD() { dm := dbtesthelper.SetupCreateMake("Ford") _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) - _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dm.ID, s.pdb) + _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dm.Name, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles vinInfoResp := &coremodels.DrivlyVINResponse{ diff --git a/internal/core/services/vin_decoding_service_test.go b/internal/core/services/vin_decoding_service_test.go index 889557b2..5817d35a 100644 --- a/internal/core/services/vin_decoding_service_test.go +++ b/internal/core/services/vin_decoding_service_test.go @@ -221,8 +221,8 @@ func (s *VINDecodingServiceSuite) Test_VINDecodingService_DD_Default_Success() { const country = "US" dt := dbtesthelper.SetupCreateDeviceType(s.T(), s.pdb) - dm := dbtesthelper.SetupCreateMake(s.T(), "Ford", s.pdb) - dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm, "Escape", 2020, s.pdb) + dm := dbtesthelper.SetupCreateMake("Ford") + dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm.Name, "Escape", 2020, s.pdb) s.mockOnChainSvc.EXPECT().GetDefinitionByID(ctx, dd.ID).Times(1).Return(dd, nil, nil) diff --git a/internal/infrastructure/db/repositories/device_make_repo.go b/internal/infrastructure/db/repositories/device_make_repo.go deleted file mode 100644 index 89fc9b65..00000000 --- a/internal/infrastructure/db/repositories/device_make_repo.go +++ /dev/null @@ -1,84 +0,0 @@ -//go:generate mockgen -source device_make_repo.go -destination mocks/device_make_repo_mock.go -package mocks - -package repositories - -import ( - "context" - "database/sql" - "strings" - - stringutils "github.com/DIMO-Network/shared/pkg/strings" - - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - "github.com/DIMO-Network/shared/pkg/db" - "github.com/pkg/errors" - "github.com/segmentio/ksuid" - "github.com/volatiletech/null/v8" - "github.com/volatiletech/sqlboiler/v4/boil" - "github.com/volatiletech/sqlboiler/v4/queries/qm" -) - -type DeviceMakeRepository interface { - GetAll(ctx context.Context) ([]*models.DeviceMake, error) - GetBySlug(ctx context.Context, slug string) (*models.DeviceMake, error) - GetOrCreate(ctx context.Context, makeName string, logURL string, externalIDs string, metadata string, hardwareTemplateID string) (*models.DeviceMake, error) -} - -type deviceMakeRepository struct { - DBS func() *db.ReaderWriter -} - -func NewDeviceMakeRepository(dbs func() *db.ReaderWriter) DeviceMakeRepository { - return &deviceMakeRepository{ - DBS: dbs, - } -} - -func (r *deviceMakeRepository) GetAll(ctx context.Context) ([]*models.DeviceMake, error) { - makes, err := models.DeviceMakes(qm.OrderBy(models.DeviceMakeColumns.Name)).All(ctx, r.DBS().Reader) - - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return []*models.DeviceMake{}, err - } - - return nil, &exceptions.InternalError{Err: err} - } - - return makes, err -} - -func (r *deviceMakeRepository) GetOrCreate(ctx context.Context, makeName string, logURL string, externalIDs string, metadata string, hardwareTemplateID string) (*models.DeviceMake, error) { - m, err := models.DeviceMakes(models.DeviceMakeWhere.Name.EQ(strings.TrimSpace(makeName))).One(ctx, r.DBS().Writer) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - // create - m = &models.DeviceMake{ - ID: ksuid.New().String(), - Name: makeName, - NameSlug: stringutils.SlugString(makeName), - LogoURL: null.StringFrom(logURL), - ExternalIds: null.JSONFrom([]byte(externalIDs)), - Metadata: null.JSONFrom([]byte(metadata)), - HardwareTemplateID: null.StringFrom(hardwareTemplateID), - } - // todo set TokenID. increase from latest tokenId - err = m.Insert(ctx, r.DBS().Writer.DB, boil.Infer()) - if err != nil { - return nil, &exceptions.InternalError{Err: errors.Wrapf(err, "error inserting make: %s", makeName)} - } - return m, nil - } - return nil, errors.Wrapf(err, "error querying for make: %s", makeName) - } - return m, nil -} - -func (r *deviceMakeRepository) GetBySlug(ctx context.Context, slug string) (*models.DeviceMake, error) { - m, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(strings.TrimSpace(slug))).One(ctx, r.DBS().Writer) - if err != nil { - return nil, errors.Wrapf(err, "error querying for make: %s", slug) - } - return m, nil -} diff --git a/internal/infrastructure/db/repositories/mocks/device_make_repo_mock.go b/internal/infrastructure/db/repositories/mocks/device_make_repo_mock.go deleted file mode 100644 index e56e80f1..00000000 --- a/internal/infrastructure/db/repositories/mocks/device_make_repo_mock.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: device_make_repo.go -// -// Generated by this command: -// -// mockgen -source device_make_repo.go -destination mocks/device_make_repo_mock.go -package mocks -// - -// Package mocks is a generated GoMock package. -package mocks - -import ( - context "context" - reflect "reflect" - - models "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" - gomock "go.uber.org/mock/gomock" -) - -// MockDeviceMakeRepository is a mock of DeviceMakeRepository interface. -type MockDeviceMakeRepository struct { - ctrl *gomock.Controller - recorder *MockDeviceMakeRepositoryMockRecorder -} - -// MockDeviceMakeRepositoryMockRecorder is the mock recorder for MockDeviceMakeRepository. -type MockDeviceMakeRepositoryMockRecorder struct { - mock *MockDeviceMakeRepository -} - -// NewMockDeviceMakeRepository creates a new mock instance. -func NewMockDeviceMakeRepository(ctrl *gomock.Controller) *MockDeviceMakeRepository { - mock := &MockDeviceMakeRepository{ctrl: ctrl} - mock.recorder = &MockDeviceMakeRepositoryMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDeviceMakeRepository) EXPECT() *MockDeviceMakeRepositoryMockRecorder { - return m.recorder -} - -// GetAll mocks base method. -func (m *MockDeviceMakeRepository) GetAll(ctx context.Context) ([]*models.DeviceMake, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAll", ctx) - ret0, _ := ret[0].([]*models.DeviceMake) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAll indicates an expected call of GetAll. -func (mr *MockDeviceMakeRepositoryMockRecorder) GetAll(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockDeviceMakeRepository)(nil).GetAll), ctx) -} - -// GetBySlug mocks base method. -func (m *MockDeviceMakeRepository) GetBySlug(ctx context.Context, slug string) (*models.DeviceMake, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBySlug", ctx, slug) - ret0, _ := ret[0].(*models.DeviceMake) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetBySlug indicates an expected call of GetBySlug. -func (mr *MockDeviceMakeRepositoryMockRecorder) GetBySlug(ctx, slug any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBySlug", reflect.TypeOf((*MockDeviceMakeRepository)(nil).GetBySlug), ctx, slug) -} - -// GetOrCreate mocks base method. -func (m *MockDeviceMakeRepository) GetOrCreate(ctx context.Context, makeName, logURL, externalIDs, metadata, hardwareTemplateID string) (*models.DeviceMake, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOrCreate", ctx, makeName, logURL, externalIDs, metadata, hardwareTemplateID) - ret0, _ := ret[0].(*models.DeviceMake) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetOrCreate indicates an expected call of GetOrCreate. -func (mr *MockDeviceMakeRepositoryMockRecorder) GetOrCreate(ctx, makeName, logURL, externalIDs, metadata, hardwareTemplateID any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrCreate", reflect.TypeOf((*MockDeviceMakeRepository)(nil).GetOrCreate), ctx, makeName, logURL, externalIDs, metadata, hardwareTemplateID) -} diff --git a/internal/infrastructure/db/repositories/vin_repo.go b/internal/infrastructure/db/repositories/vin_repo.go index 4cf65f5c..6c11d03a 100644 --- a/internal/infrastructure/db/repositories/vin_repo.go +++ b/internal/infrastructure/db/repositories/vin_repo.go @@ -6,6 +6,7 @@ import ( "context" "database/sql" "fmt" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "github.com/DIMO-Network/device-definitions-api/internal/contracts" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -26,10 +27,11 @@ type VINRepository interface { type vinRepository struct { DBS func() *db.ReaderWriter registryInstance *contracts.Registry + identity gateways.IdentityAPI } -func NewVINRepository(dbs func() *db.ReaderWriter, registryInstance *contracts.Registry) VINRepository { - return &vinRepository{DBS: dbs, registryInstance: registryInstance} +func NewVINRepository(dbs func() *db.ReaderWriter, registryInstance *contracts.Registry, identity gateways.IdentityAPI) VINRepository { + return &vinRepository{DBS: dbs, registryInstance: registryInstance, identity: identity} } func (r *vinRepository) GetOrCreateWMI(ctx context.Context, wmi string, mk string) (*models.Wmi, error) { @@ -40,7 +42,8 @@ func (r *vinRepository) GetOrCreateWMI(ctx context.Context, wmi string, mk strin return nil, &exceptions.ValidationError{Err: fmt.Errorf("invalid make name for GetOrCreate: %s", mk)} } makeSlug := stringutils.SlugString(mk) - deviceMake, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(makeSlug)).One(ctx, r.DBS().Reader) + + deviceMake, err := r.identity.GetManufacturer(makeSlug) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, &exceptions.NotFoundError{ From a0f3b14fa445a4d7287fa4e441a690f05e5daf59 Mon Sep 17 00:00:00 2001 From: James Reategui Date: Wed, 11 Jun 2025 22:39:25 -0400 Subject: [PATCH 4/6] errors fixed, import cycle issue persists --- docs/docs.go | 33 - docs/swagger.json | 33 - docs/swagger.yaml | 23 - internal/api/api.go | 24 +- internal/api/grpc_definitions_service.go | 128 +-- internal/api/grpc_server.go | 4 +- .../handlers/device_definition_v2_handler.go | 64 -- internal/api/routes.go | 1 - internal/core/commands/bulk_validate_vin.go | 8 +- internal/core/queries/decode_vin.go | 8 +- internal/core/queries/decode_vin_test.go | 7 +- pkg/grpc/device_definition.pb.go | 769 +++++++++--------- pkg/grpc/device_definition.proto | 7 +- 13 files changed, 426 insertions(+), 683 deletions(-) delete mode 100644 internal/api/handlers/device_definition_v2_handler.go diff --git a/docs/docs.go b/docs/docs.go index cb5c26e3..8d2a16e9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -364,39 +364,6 @@ const docTemplate = `{ } } }, - "/v2/device-definitions/{make}/all": { - "get": { - "description": "gets a device definition", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "device-definitions" - ], - "summary": "gets all device definitions by Makes, models, and years, from tableland (on-chain records)", - "operationId": "GetDeviceDefinitionV2All", - "parameters": [ - { - "type": "string", - "description": "device make name", - "name": "make", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK" - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, "/vin-profile/{vin}": { "get": { "security": [ diff --git a/docs/swagger.json b/docs/swagger.json index 7448b3c6..6f28bbd6 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -355,39 +355,6 @@ } } }, - "/v2/device-definitions/{make}/all": { - "get": { - "description": "gets a device definition", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "device-definitions" - ], - "summary": "gets all device definitions by Makes, models, and years, from tableland (on-chain records)", - "operationId": "GetDeviceDefinitionV2All", - "parameters": [ - { - "type": "string", - "description": "device make name", - "name": "make", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK" - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, "/vin-profile/{vin}": { "get": { "security": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3e214844..4893be00 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -388,29 +388,6 @@ paths: summary: gets all supported manufacturers for the smartcar external integration tags: - device-definitions - /v2/device-definitions/{make}/all: - get: - consumes: - - application/json - description: gets a device definition - operationId: GetDeviceDefinitionV2All - parameters: - - description: device make name - in: path - name: make - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - "500": - description: Internal Server Error - summary: gets all device definitions by Makes, models, and years, from tableland - (on-chain records) - tags: - - device-definitions /vin-profile/{vin}: get: description: gets VIN profile if we have it. diff --git a/internal/api/api.go b/internal/api/api.go index 6c03621c..b1f9bfdc 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -55,6 +55,7 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, } //infra + identityAPI := gateways.NewIdentityAPIService(&logger, settings) drivlyAPIService := gateways.NewDrivlyAPIService(settings) vincarioAPIService := gateways.NewVincarioAPIService(settings, &logger) fuelAPIService := gateways.NewFuelAPIService(settings, &logger) @@ -70,8 +71,7 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, //repos //makeRepository := repositories.NewDeviceMakeRepository(pdb.DBS) deviceStyleRepository := repositories.NewDeviceStyleRepository(pdb.DBS) - deviceMakeRepository := repositories.NewDeviceMakeRepository(pdb.DBS) - vinRepository := repositories.NewVINRepository(pdb.DBS, registryInstance) + vinRepository := repositories.NewVINRepository(pdb.DBS, registryInstance, identityAPI) //cache services vincDecodingService := services.NewVINDecodingService(drivlyAPIService, vincarioAPIService, autoIsoAPIService, &logger, ddOnChainService, datGroupWSService, pdb.DBS, japan17VINAPI) @@ -87,8 +87,7 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, //mediator.WithBehaviour(common.NewValidationBehavior(&logger, settings)), //mediator.WithBehaviour(common.NewErrorHandlingBehavior(&logger, settings)), mediator.WithHandler(&queries.GetDeviceDefinitionByIDQuery{}, queries.NewGetDeviceDefinitionByIDQueryHandler(ddOnChainService, pdb.DBS)), - mediator.WithHandler(&queries.GetDeviceDefinitionByIDsQuery{}, queries.NewGetDeviceDefinitionByIDsQueryHandler(&logger, ddOnChainService, pdb.DBS)), - mediator.WithHandler(&queries.GetDeviceDefinitionByMakeModelYearQuery{}, queries.NewGetDeviceDefinitionByMakeModelYearQueryHandler(ddOnChainService, pdb.DBS)), + mediator.WithHandler(&queries.GetDeviceDefinitionByMakeModelYearQuery{}, queries.NewGetDeviceDefinitionByMakeModelYearQueryHandler(ddOnChainService, pdb.DBS, identityAPI)), mediator.WithHandler(&queries.GetDeviceDefinitionByDynamicFilterQuery{}, queries.NewGetDeviceDefinitionByDynamicFilterQueryHandler(pdb.DBS, ddOnChainService)), mediator.WithHandler(&queries.GetAllIntegrationQuery{}, queries.NewGetAllIntegrationQueryHandler(pdb.DBS)), mediator.WithHandler(&queries.GetIntegrationByIDQuery{}, queries.NewGetIntegrationByIDQueryHandler(pdb.DBS)), @@ -96,15 +95,10 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, mediator.WithHandler(&queries.GetDeviceStyleByFilterQuery{}, queries.NewGetDeviceStyleByFilterQueryHandler(pdb.DBS)), mediator.WithHandler(&queries.GetDeviceStyleByDeviceDefinitionIDQuery{}, queries.NewGetDeviceStyleByDeviceDefinitionIDQueryHandler(pdb.DBS)), mediator.WithHandler(&queries.GetDeviceStyleByExternalIDQuery{}, queries.NewGetDeviceStyleByExternalIDQueryHandler(pdb.DBS)), - mediator.WithHandler(&queries.GetDeviceMakeBySlugQuery{}, queries.NewGetDeviceMakeBySlugQueryHandler(pdb.DBS)), - mediator.WithHandler(&queries.GetDeviceMakeByTokenIDQuery{}, queries.NewGetDeviceMakeByTokenIDQueryHandler(pdb.DBS, registryInstance)), - mediator.WithHandler(&queries.GetAllDeviceMakeQuery{}, queries.NewGetAllDeviceMakeQueryHandler(pdb.DBS)), mediator.WithHandler(&queries.GetDeviceTypeByIDQuery{}, queries.NewGetDeviceTypeByIDQueryHandler(pdb.DBS)), mediator.WithHandler(&queries.GetDeviceDefinitionImagesByIDsQuery{}, queries.NewGetDeviceDefinitionImagesByIDsQueryHandler(pdb.DBS, &logger)), - mediator.WithHandler(&commands.CreateDeviceDefinitionCommand{}, commands.NewCreateDeviceDefinitionCommandHandler(ddOnChainService, pdb.DBS, powerTrainTypeService, fuelAPIService, &logger)), + mediator.WithHandler(&commands.CreateDeviceDefinitionCommand{}, commands.NewCreateDeviceDefinitionCommandHandler(ddOnChainService, pdb.DBS, powerTrainTypeService, fuelAPIService, &logger, identityAPI)), mediator.WithHandler(&commands.CreateDeviceStyleCommand{}, commands.NewCreateDeviceStyleCommandHandler(deviceStyleRepository)), - mediator.WithHandler(&commands.CreateDeviceMakeCommand{}, commands.NewCreateDeviceMakeCommandHandler(deviceMakeRepository)), - mediator.WithHandler(&commands.UpdateDeviceMakeCommand{}, commands.NewUpdateDeviceMakeCommandHandler(pdb.DBS)), mediator.WithHandler(&commands.UpdateDeviceStyleCommand{}, commands.NewUpdateDeviceStyleCommandHandler(pdb.DBS)), mediator.WithHandler(&queries.GetAllDeviceTypeQuery{}, queries.NewGetAllDeviceTypeQueryHandler(pdb.DBS)), mediator.WithHandler(&commands.UpdateDeviceTypeCommand{}, commands.NewUpdateDeviceTypeCommandHandler(pdb.DBS)), @@ -113,19 +107,15 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, mediator.WithHandler(&queries.GetIntegrationOptionsQuery{}, queries.NewGetIntegrationOptionsQueryHandler(pdb.DBS)), - mediator.WithHandler(&queries.DecodeVINQuery{}, queries.NewDecodeVINQueryHandler(pdb.DBS, vincDecodingService, vinRepository, &logger, fuelAPIService, powerTrainTypeService, ddOnChainService)), - - mediator.WithHandler(&queries.GetAllDeviceDefinitionByMakeYearRangeQuery{}, queries.NewGetAllDeviceDefinitionByMakeYearRangeQueryHandler(ddOnChainService, pdb.DBS)), + mediator.WithHandler(&queries.DecodeVINQuery{}, queries.NewDecodeVINQueryHandler(pdb.DBS, vincDecodingService, vinRepository, &logger, fuelAPIService, powerTrainTypeService, ddOnChainService, identityAPI)), mediator.WithHandler(&commands.BulkValidateVinCommand{}, commands.NewBulkValidateVinCommandHandler( pdb.DBS, - queries.NewDecodeVINQueryHandler(pdb.DBS, vincDecodingService, vinRepository, &logger, fuelAPIService, powerTrainTypeService, ddOnChainService), + queries.NewDecodeVINQueryHandler(pdb.DBS, vincDecodingService, vinRepository, &logger, fuelAPIService, powerTrainTypeService, ddOnChainService, identityAPI), queries.NewGetDeviceDefinitionByIDQueryHandler(ddOnChainService, pdb.DBS), )), mediator.WithHandler(&queries.GetIntegrationByTokenIDQuery{}, queries.NewGetIntegrationByTokenIDQueryHandler(pdb.DBS, &logger)), - - mediator.WithHandler(&queries.GetAllDeviceDefinitionOnChainQuery{}, queries.NewGetAllDeviceDefinitionOnChainQueryHandler(pdb.DBS, ddOnChainService)), mediator.WithHandler(&queries.GetAllDeviceDefinitionBySearchQuery{}, queries.NewGetAllDeviceDefinitionBySearchQueryHandler(searchService)), mediator.WithHandler(&queries.GetR1CompatibilitySearch{}, queries.NewGetR1CompatibilitySearchQueryHandler(searchService)), mediator.WithHandler(&queries.GetAllDeviceDefinitionByAutocompleteQuery{}, queries.NewGetAllDeviceDefinitionByAutocompleteQueryHandler(searchService)), @@ -160,7 +150,7 @@ func Run(ctx context.Context, logger zerolog.Logger, settings *config.Settings, app.Get("/v1/swagger/*", swagger.HandlerDefault) - go StartGrpcServer(logger, settings, *m, pdb.DBS, ddOnChainService, registryInstance) + go StartGrpcServer(logger, settings, *m, pdb.DBS, ddOnChainService, registryInstance, identityAPI) // Start Server from a different go routine go func() { diff --git a/internal/api/grpc_definitions_service.go b/internal/api/grpc_definitions_service.go index 8519484d..31f2a678 100644 --- a/internal/api/grpc_definitions_service.go +++ b/internal/api/grpc_definitions_service.go @@ -3,23 +3,21 @@ package api import ( "context" "encoding/json" + stringutils "github.com/DIMO-Network/shared/pkg/strings" "github.com/ethereum/go-ethereum/accounts/abi/bind" "google.golang.org/protobuf/types/known/emptypb" "github.com/DIMO-Network/device-definitions-api/internal/contracts" "github.com/DIMO-Network/device-definitions-api/internal/core/commands" - "github.com/DIMO-Network/device-definitions-api/internal/core/common" "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" "github.com/DIMO-Network/device-definitions-api/internal/core/queries" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" p_grpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" "github.com/DIMO-Network/shared/pkg/db" "github.com/friendsofgo/errors" "github.com/rs/zerolog" - "github.com/volatiletech/null/v8" ) type GrpcDefinitionsService struct { @@ -29,42 +27,16 @@ type GrpcDefinitionsService struct { dbs *db.ReaderWriter onChainDeviceDefs gateways.DeviceDefinitionOnChainService queryInstance *contracts.Registry + identity gateways.IdentityAPI } func NewGrpcService(mediator mediator.Mediator, logger *zerolog.Logger, dbs func() *db.ReaderWriter, - onChainDefs gateways.DeviceDefinitionOnChainService, queryInstance *contracts.Registry) p_grpc.DeviceDefinitionServiceServer { - return &GrpcDefinitionsService{Mediator: mediator, logger: logger, dbs: dbs(), onChainDeviceDefs: onChainDefs, queryInstance: queryInstance} + onChainDefs gateways.DeviceDefinitionOnChainService, queryInstance *contracts.Registry, identity gateways.IdentityAPI) p_grpc.DeviceDefinitionServiceServer { + return &GrpcDefinitionsService{Mediator: mediator, logger: logger, dbs: dbs(), onChainDeviceDefs: onChainDefs, queryInstance: queryInstance, identity: identity} } //** Device Definitions -// GetDeviceDefinitionByID used by: dimo-admin, cs-platform, valuations-api -func (s *GrpcDefinitionsService) GetDeviceDefinitionByID(ctx context.Context, in *p_grpc.GetDeviceDefinitionRequest) (*p_grpc.GetDeviceDefinitionResponse, error) { - - qryResult, _ := s.Mediator.Send(ctx, &queries.GetDeviceDefinitionByIDsQuery{ - DeviceDefinitionID: in.Ids, - }) - - result := qryResult.(*p_grpc.GetDeviceDefinitionResponse) - - return result, nil -} - -// GetDeviceDefinitionByMMY used by: dimo-admin, cs-platform, devices-api -func (s *GrpcDefinitionsService) GetDeviceDefinitionByMMY(ctx context.Context, in *p_grpc.GetDeviceDefinitionByMMYRequest) (*p_grpc.GetDeviceDefinitionItemResponse, error) { - - qryResult, _ := s.Mediator.Send(ctx, &queries.GetDeviceDefinitionByMakeModelYearQuery{ - Make: in.Make, - Model: in.Model, - Year: int(in.Year), - }) - - dd := qryResult.(*coremodels.GetDeviceDefinitionQueryResult) - result := common.BuildFromQueryResultToGRPC(dd) - - return result, nil -} - // GetFilteredDeviceDefinition used by: admin, cs-support-platform func (s *GrpcDefinitionsService) GetFilteredDeviceDefinition(ctx context.Context, in *p_grpc.FilterDeviceDefinitionRequest) (*p_grpc.GetFilteredDeviceDefinitionsResponse, error) { @@ -143,7 +115,7 @@ func (s *GrpcDefinitionsService) CreateDeviceDefinition(ctx context.Context, in // UpdateDeviceDefinition is used by admin tool to update tableland properties of a dd, and a couple augmented properties func (s *GrpcDefinitionsService) UpdateDeviceDefinition(ctx context.Context, in *p_grpc.UpdateDeviceDefinitionRequest) (*p_grpc.BaseResponse, error) { // if verified = true, send update request to tableland - dm, err := models.FindDeviceMake(ctx, s.dbs.Reader, in.DeviceMakeId) + dm, err := s.identity.GetManufacturer(stringutils.SlugString(in.ManufacturerName)) if err != nil { return nil, errors.Wrap(err, "failed to find device make") } @@ -234,19 +206,6 @@ func (s *GrpcDefinitionsService) GetIntegrationByTokenID(ctx context.Context, in return s.prepareIntegrationResponse(item) } -// GetDeviceDefinitionByMakeAndYearRange used by: dimo-admin and cs-support-platform -func (s *GrpcDefinitionsService) GetDeviceDefinitionByMakeAndYearRange(ctx context.Context, in *p_grpc.GetDeviceDefinitionByMakeAndYearRangeRequest) (*p_grpc.GetDeviceDefinitionResponse, error) { - qryResult, _ := s.Mediator.Send(ctx, &queries.GetAllDeviceDefinitionByMakeYearRangeQuery{ - Make: in.Make, - StartYear: in.StartYear, - EndYear: in.EndYear, - }) - - result := qryResult.(*p_grpc.GetDeviceDefinitionResponse) - - return result, nil -} - //** Device Styles / Trims func (s *GrpcDefinitionsService) CreateDeviceStyle(ctx context.Context, in *p_grpc.CreateDeviceStyleRequest) (*p_grpc.BaseResponse, error) { @@ -338,83 +297,6 @@ func (s *GrpcDefinitionsService) UpdateDeviceStyle(ctx context.Context, in *p_gr return &p_grpc.BaseResponse{Id: result.ID}, nil } -//** Makes / Manufacturers - -func (s *GrpcDefinitionsService) GetDeviceMakeBySlug(ctx context.Context, in *p_grpc.GetDeviceMakeBySlugRequest) (*p_grpc.DeviceMake, error) { - qryResult, _ := s.Mediator.Send(ctx, &queries.GetDeviceMakeBySlugQuery{ - Slug: in.Slug, - }) - - deviceMake := qryResult.(coremodels.DeviceMake) - - result := &p_grpc.DeviceMake{ - Id: deviceMake.ID, - Name: deviceMake.Name, - NameSlug: deviceMake.NameSlug, - LogoUrl: deviceMake.LogoURL.String, - OemPlatformName: deviceMake.OemPlatformName.String, - } - - manufacturerID, err := s.queryInstance.GetManufacturerIdByName(&bind.CallOpts{Context: ctx, Pending: true}, deviceMake.Name) - if err != nil { - return nil, errors.Wrapf(err, "failed to GetManufacturerIdByName for update: %s", deviceMake.Name) - } - result.TokenId = manufacturerID.Uint64() - - return result, nil -} - -func (s *GrpcDefinitionsService) GetDeviceMakeByTokenID(ctx context.Context, in *p_grpc.GetDeviceMakeByTokenIdRequest) (*p_grpc.DeviceMake, error) { - qryResult, _ := s.Mediator.Send(ctx, &queries.GetDeviceMakeByTokenIDQuery{ - TokenID: in.TokenId, - }) - - deviceMakes := qryResult.(*p_grpc.DeviceMake) - - return deviceMakes, nil -} - -func (s *GrpcDefinitionsService) GetDeviceMakes(ctx context.Context, _ *emptypb.Empty) (*p_grpc.GetDeviceMakeResponse, error) { - qryResult, _ := s.Mediator.Send(ctx, &queries.GetAllDeviceMakeQuery{}) - - deviceMakes := qryResult.(*p_grpc.GetDeviceMakeResponse) - - return deviceMakes, nil -} - -func (s *GrpcDefinitionsService) CreateDeviceMake(ctx context.Context, in *p_grpc.CreateDeviceMakeRequest) (*p_grpc.BaseResponse, error) { - - commandResult, _ := s.Mediator.Send(ctx, &commands.CreateDeviceMakeCommand{ - Name: in.Name, - HardwareTemplateID: in.HardwareTemplateId, - ExternalIDs: "{}", - Metadata: "{}", - }) - - result := commandResult.(commands.CreateDeviceMakeCommandResult) - - return &p_grpc.BaseResponse{Id: result.ID}, nil -} - -func (s *GrpcDefinitionsService) UpdateDeviceMake(ctx context.Context, in *p_grpc.UpdateDeviceMakeRequest) (*p_grpc.BaseResponse, error) { - - command := &commands.UpdateDeviceMakeCommand{ - ID: in.Id, - Name: in.Name, - LogoURL: null.StringFrom(in.LogoUrl), - OemPlatformName: null.StringFrom(in.OemPlatformName), - ExternalIDs: json.RawMessage(in.ExternalIds), - Metadata: json.RawMessage(in.Metadata), - HardwareTemplateID: in.HardwareTemplateId, - } - - commandResult, _ := s.Mediator.Send(ctx, command) - - result := commandResult.(commands.UpdateDeviceMakeCommandResult) - - return &p_grpc.BaseResponse{Id: result.ID}, nil -} - //** Device Types / Attributes func (s *GrpcDefinitionsService) GetDeviceTypesByID(ctx context.Context, in *p_grpc.GetDeviceTypeByIDRequest) (*p_grpc.GetDeviceTypeResponse, error) { diff --git a/internal/api/grpc_server.go b/internal/api/grpc_server.go index 180e5719..ca613559 100644 --- a/internal/api/grpc_server.go +++ b/internal/api/grpc_server.go @@ -24,13 +24,13 @@ import ( ) func StartGrpcServer(logger zerolog.Logger, s *config.Settings, m mediator.Mediator, dbs func() *db.ReaderWriter, - onChainDeviceDefs gateways.DeviceDefinitionOnChainService, registryInstance *contracts.Registry) { + onChainDeviceDefs gateways.DeviceDefinitionOnChainService, registryInstance *contracts.Registry, identity gateways.IdentityAPI) { lis, err := net.Listen("tcp", ":"+s.GRPCPort) if err != nil { logger.Fatal().Msgf("Failed to listen on port %v: %v", s.GRPCPort, err) } - deviceDefinitionService := NewGrpcService(m, &logger, dbs, onChainDeviceDefs, registryInstance) + deviceDefinitionService := NewGrpcService(m, &logger, dbs, onChainDeviceDefs, registryInstance, identity) integrationService := NewGrpcIntegrationService(m, &logger) decodeService := NewGrpcVinDecoderService(m, &logger) diff --git a/internal/api/handlers/device_definition_v2_handler.go b/internal/api/handlers/device_definition_v2_handler.go deleted file mode 100644 index e545f7b6..00000000 --- a/internal/api/handlers/device_definition_v2_handler.go +++ /dev/null @@ -1,64 +0,0 @@ -package handlers - -import ( - "strconv" - - "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - _ "github.com/DIMO-Network/device-definitions-api/internal/core/models" // required for swagger to generate modesl - "github.com/DIMO-Network/device-definitions-api/internal/core/queries" - "github.com/gofiber/fiber/v2" -) - -// GetDeviceDefinitionV2All godoc -// @Summary gets all device definitions by Makes, models, and years, from tableland (on-chain records) -// @ID GetDeviceDefinitionV2All -// @Description gets a device definition -// @Param make path string true "device make name" -// @Tags device-definitions -// @Accept json -// @Produce json -// @Success 200 -// @Failure 500 -// @Router /v2/device-definitions/{make}/all [get] -func GetDeviceDefinitionV2All(m mediator.Mediator) fiber.Handler { - return func(c *fiber.Ctx) error { - dm := c.Params("make") - model := c.Params("model") - yearStr := c.Params("year") - pageIndexStr := c.Params("pageIndex") - pageSizeStr := c.Params("pageSize") - - var pageIndex int32 = 1 - if pageIndexStr != "" { - pageIndex64, err := strconv.ParseInt(pageIndexStr, 10, 32) - if err != nil { - return c.Status(fiber.StatusBadRequest).SendString("pageIndex must be a valid integer") - } - pageIndex = int32(pageIndex64) - } - - var pageSize int32 = 30 - if pageSizeStr != "" { - pageSize64, err := strconv.ParseInt(pageSizeStr, 10, 32) - if err != nil { - return c.Status(fiber.StatusBadRequest).SendString("pageSize must be a valid integer") - } - pageSize = int32(pageSize64) - } - - year, err := strconv.Atoi(yearStr) - if err != nil { - return c.Status(fiber.StatusBadRequest).SendString("year must be a valid integer") - } - - query := &queries.GetAllDeviceDefinitionOnChainQuery{MakeSlug: dm, - Model: model, - Year: year, - PageIndex: pageIndex, - PageSize: pageSize} - - result, _ := m.Send(c.UserContext(), query) - - return c.Status(fiber.StatusOK).JSON(result) - } -} diff --git a/internal/api/routes.go b/internal/api/routes.go index eaf12b35..edbccad3 100644 --- a/internal/api/routes.go +++ b/internal/api/routes.go @@ -16,7 +16,6 @@ func RegisterDeviceDefinitionsRoutes(app fiber.Router, m mediator.Mediator, auth handlers.GetCompatibilityR1Sheet(m)).Name("compatibility-r1-sheet") app.Get("/device-definitions/:id", handlers.GetDeviceDefinitionByID(m)).Name("device-definitions-by-id") - app.Get("/v2/device-definitions/:make/all", handlers.GetDeviceDefinitionV2All(m)).Name("device-definitions-all-v2") // oems by external integration, used by mobile app app.Get("/manufacturers/integrations/smartcar", handlers.GetSmartcarManufacturers()).Name("device-definitions-smartcar") diff --git a/internal/core/commands/bulk_validate_vin.go b/internal/core/commands/bulk_validate_vin.go index d9f230d3..3792b1cb 100644 --- a/internal/core/commands/bulk_validate_vin.go +++ b/internal/core/commands/bulk_validate_vin.go @@ -10,7 +10,7 @@ import ( "github.com/DIMO-Network/device-definitions-api/internal/core/models" "github.com/DIMO-Network/device-definitions-api/internal/core/queries" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" - p_grpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" + pgrpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" "github.com/DIMO-Network/shared/pkg/db" ) @@ -64,7 +64,7 @@ func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediat continue } - devideDefinition, err := dc.DeviceDefinitionDataHandler.Handle(ctx, &queries.GetDeviceDefinitionByIDQuery{DeviceDefinitionID: decodedVIN.(*p_grpc.DecodeVinResponse).DefinitionId}) //nolint + devideDefinition, err := dc.DeviceDefinitionDataHandler.Handle(ctx, &queries.GetDeviceDefinitionByIDQuery{DeviceDefinitionID: decodedVIN.(*pgrpc.DecodeVinResponse).DefinitionId}) //nolint if err == nil { dd := devideDefinition.(*models.GetDeviceDefinitionQueryResult) @@ -75,8 +75,8 @@ func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediat decodedVINs = append(decodedVINs, DecodedVIN{ VIN: vin, - DefinitionID: decodedVIN.(*p_grpc.DecodeVinResponse).DefinitionId, - DeviceYear: decodedVIN.(*p_grpc.DecodeVinResponse).Year, + DefinitionID: decodedVIN.(*pgrpc.DecodeVinResponse).DefinitionId, + DeviceYear: decodedVIN.(*pgrpc.DecodeVinResponse).Year, DeviceMake: dm, DeviceModel: devideDefinition.(*models.GetDeviceDefinitionQueryResult).DeviceStyles[0].SubModel, }) diff --git a/internal/core/queries/decode_vin.go b/internal/core/queries/decode_vin.go index 2d499889..bf221ed3 100644 --- a/internal/core/queries/decode_vin.go +++ b/internal/core/queries/decode_vin.go @@ -41,6 +41,7 @@ type DecodeVINQueryHandler struct { fuelAPIService gateways.FuelAPIService powerTrainTypeService services.PowerTrainTypeService deviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService + identity gateways.IdentityAPI } type DecodeVINQuery struct { @@ -58,7 +59,8 @@ func NewDecodeVINQueryHandler(dbs func() *db.ReaderWriter, vinDecodingService se logger *zerolog.Logger, fuelAPIService gateways.FuelAPIService, powerTrainTypeService services.PowerTrainTypeService, - deviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService) DecodeVINQueryHandler { + deviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService, + identity gateways.IdentityAPI) DecodeVINQueryHandler { return DecodeVINQueryHandler{ dbs: dbs, vinDecodingService: vinDecodingService, @@ -67,6 +69,7 @@ func NewDecodeVINQueryHandler(dbs func() *db.ReaderWriter, vinDecodingService se fuelAPIService: fuelAPIService, powerTrainTypeService: powerTrainTypeService, deviceDefinitionOnChainService: deviceDefinitionOnChainService, + identity: identity, } } @@ -125,7 +128,7 @@ func (dc DecodeVINQueryHandler) Handle(ctx context.Context, query mediator.Messa return nil, errors.Wrapf(err, "failed to get device definition id: %s", qry.DefinitionID) } makeSlug := strings.Split(tblDef.ID, "_")[0] - dm, err := models.DeviceMakes(models.DeviceMakeWhere.NameSlug.EQ(makeSlug)).One(ctx, dc.dbs().Reader) + dm, err := dc.identity.GetManufacturer(makeSlug) if err != nil { return nil, errors.Wrapf(err, "failed to get device make for: %s", qry.DefinitionID) } @@ -168,7 +171,6 @@ func (dc DecodeVINQueryHandler) Handle(ctx context.Context, query mediator.Messa return nil, errors.Wrap(err, "error when commiting transaction for inserting vin_number") } - resp.DeviceMakeId = dm.ID //nolint resp.Manufacturer = dm.Name resp.Year = int32(vinDecodeNumber.Year) resp.Source = vinDecodeNumber.DecodeProvider.String diff --git a/internal/core/queries/decode_vin_test.go b/internal/core/queries/decode_vin_test.go index f3427f78..1afa991e 100644 --- a/internal/core/queries/decode_vin_test.go +++ b/internal/core/queries/decode_vin_test.go @@ -50,6 +50,7 @@ type DecodeVINQueryHandlerSuite struct { queryHandler DecodeVINQueryHandler mockVINRepo *mock_repository.MockVINRepository + mockIdentity *mock_gateways.MockIdentityAPI } const country = "USA" @@ -69,9 +70,10 @@ func (s *DecodeVINQueryHandlerSuite) SetupTest() { s.mockFuelAPIService = mock_gateways.NewMockFuelAPIService(s.ctrl) s.mockVINRepo = mock_repository.NewMockVINRepository(s.ctrl) + s.mockIdentity = mock_gateways.NewMockIdentityAPI(s.ctrl) s.pdb, s.container = dbtesthelper.StartContainerDatabase(s.ctx, dbName, s.T(), migrationsDirRelPath) - s.queryHandler = NewDecodeVINQueryHandler(s.pdb.DBS, s.mockVINService, s.mockVINRepo, dbtesthelper.Logger(), s.mockFuelAPIService, s.mockPowerTrainTypeService, s.mockDeviceDefinitionOnChainService) + s.queryHandler = NewDecodeVINQueryHandler(s.pdb.DBS, s.mockVINService, s.mockVINRepo, dbtesthelper.Logger(), s.mockFuelAPIService, s.mockPowerTrainTypeService, s.mockDeviceDefinitionOnChainService, s.mockIdentity) } func (s *DecodeVINQueryHandlerSuite) TearDownTest() { @@ -91,6 +93,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingDD_UpdatesAt const vin = "1FMCU0G61MUA52727" // ford escape 2021 dm := dbtesthelper.SetupCreateMake("Ford") + s.mockIdentity.EXPECT().GetManufacturer("ford").Return(dm, nil) dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm.Name, "Escape", 2021, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles @@ -197,7 +200,9 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD_WithMismatchWM const wmi = "1FM" dmFord := dbtesthelper.SetupCreateMake("Ford") + s.mockIdentity.EXPECT().GetManufacturer("ford").Return(dmFord, nil) dmLincoln := dbtesthelper.SetupCreateMake("Lincoln") + s.mockIdentity.EXPECT().GetManufacturer("lincoln").Return(dmLincoln, nil) _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dmFord.Name, s.pdb) diff --git a/pkg/grpc/device_definition.pb.go b/pkg/grpc/device_definition.pb.go index bd13b521..e97db9ed 100644 --- a/pkg/grpc/device_definition.pb.go +++ b/pkg/grpc/device_definition.pb.go @@ -1085,11 +1085,13 @@ type UpdateDeviceDefinitionRequest struct { // this is the name slug id now DeviceDefinitionId string `protobuf:"bytes,1,opt,name=device_definition_id,json=deviceDefinitionId,proto3" json:"device_definition_id,omitempty"` // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` - ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - Verified bool `protobuf:"varint,5,opt,name=verified,proto3" json:"verified,omitempty"` - Model string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"` - Year int32 `protobuf:"varint,7,opt,name=year,proto3" json:"year,omitempty"` + Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` + ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` + // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. + Verified bool `protobuf:"varint,5,opt,name=verified,proto3" json:"verified,omitempty"` + Model string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"` + Year int32 `protobuf:"varint,7,opt,name=year,proto3" json:"year,omitempty"` + // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. DeviceMakeId string `protobuf:"bytes,8,opt,name=device_make_id,json=deviceMakeId,proto3" json:"device_make_id,omitempty"` DeviceStyles []*UpdateDeviceDefinitionRequest_DeviceStyles `protobuf:"bytes,9,rep,name=device_styles,json=deviceStyles,proto3" json:"device_styles,omitempty"` // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. @@ -1097,8 +1099,10 @@ type UpdateDeviceDefinitionRequest struct { DeviceTypeId string `protobuf:"bytes,12,opt,name=device_type_id,json=deviceTypeId,proto3" json:"device_type_id,omitempty"` DeviceAttributes []*DeviceTypeAttributeRequest `protobuf:"bytes,13,rep,name=device_attributes,json=deviceAttributes,proto3" json:"device_attributes,omitempty"` // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. - ExternalIds []*ExternalID `protobuf:"bytes,14,rep,name=external_ids,json=externalIds,proto3" json:"external_ids,omitempty"` - HardwareTemplateId string `protobuf:"bytes,15,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` + ExternalIds []*ExternalID `protobuf:"bytes,14,rep,name=external_ids,json=externalIds,proto3" json:"external_ids,omitempty"` + // Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. + HardwareTemplateId string `protobuf:"bytes,15,opt,name=hardware_template_id,json=hardwareTemplateId,proto3" json:"hardware_template_id,omitempty"` + ManufacturerName string `protobuf:"bytes,16,opt,name=manufacturer_name,json=manufacturerName,proto3" json:"manufacturer_name,omitempty"` } func (x *UpdateDeviceDefinitionRequest) Reset() { @@ -1155,6 +1159,7 @@ func (x *UpdateDeviceDefinitionRequest) GetImageUrl() string { return "" } +// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. func (x *UpdateDeviceDefinitionRequest) GetVerified() bool { if x != nil { return x.Verified @@ -1176,6 +1181,7 @@ func (x *UpdateDeviceDefinitionRequest) GetYear() int32 { return 0 } +// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. func (x *UpdateDeviceDefinitionRequest) GetDeviceMakeId() string { if x != nil { return x.DeviceMakeId @@ -1220,6 +1226,7 @@ func (x *UpdateDeviceDefinitionRequest) GetExternalIds() []*ExternalID { return nil } +// Deprecated: Marked as deprecated in pkg/grpc/device_definition.proto. func (x *UpdateDeviceDefinitionRequest) GetHardwareTemplateId() string { if x != nil { return x.HardwareTemplateId @@ -1227,6 +1234,13 @@ func (x *UpdateDeviceDefinitionRequest) GetHardwareTemplateId() string { return "" } +func (x *UpdateDeviceDefinitionRequest) GetManufacturerName() string { + if x != nil { + return x.ManufacturerName + } + return "" +} + type FilterDeviceDefinitionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3243,7 +3257,7 @@ var file_pkg_grpc_device_definition_proto_rawDesc = []byte{ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0x90, 0x07, 0x0a, 0x1d, 0x55, + 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0xc9, 0x07, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, @@ -3252,387 +3266,390 @@ var file_pkg_grpc_device_definition_proto_rawDesc = []byte{ 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x24, 0x0a, - 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, - 0x65, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, - 0x79, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0b, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, + 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, + 0x72, 0x12, 0x28, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0d, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, + 0x79, 0x6c, 0x65, 0x73, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, + 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x4d, 0x0a, + 0x11, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x49, 0x44, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, + 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6d, + 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xbb, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xf0, 0x02, 0x0a, 0x1d, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x07, 0x6d, 0x61, 0x6b, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6d, + 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x33, 0x0a, 0x13, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, + 0x2a, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x6e, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x56, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, + 0x73, 0x6c, 0x75, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, + 0x53, 0x6c, 0x75, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x24, 0x47, 0x65, 0x74, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xb5, 0x03, + 0x0a, 0x1e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, + 0x61, 0x6b, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x0b, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, + 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0xa0, 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x1a, - 0xbb, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, + 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x3b, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x2b, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x29, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x0c, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x49, 0x64, 0x22, 0xb0, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x68, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xf0, 0x02, - 0x0a, 0x1d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x07, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0e, - 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x13, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x79, 0x65, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x5f, 0x76, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x56, 0x69, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x62, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x61, 0x6b, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x49, 0x44, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6c, 0x75, 0x67, 0x22, 0xa0, 0x02, 0x0a, - 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, - 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, - 0x27, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, - 0x79, 0x6c, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x73, 0x22, 0x77, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0xb0, 0x02, 0x0a, 0x18, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, - 0x79, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x98, 0x01, - 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x75, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, - 0x22, 0x5b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, - 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x85, 0x01, 0x0a, - 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0a, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x67, - 0x0a, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x22, 0x5b, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xdc, 0x01, + 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x17, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, - 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xc9, 0x01, 0x0a, - 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x14, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, - 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, - 0x6c, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2a, - 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x2c, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x79, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, - 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x59, 0x65, 0x61, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x32, 0xd3, 0x0d, 0x0a, 0x17, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, - 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x79, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x63, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xc9, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, + 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2a, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x7c, 0x0a, 0x2c, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4d, 0x61, 0x6b, 0x65, + 0x41, 0x6e, 0x64, 0x59, 0x65, 0x61, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6d, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x59, 0x65, 0x61, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x79, 0x65, + 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x61, + 0x72, 0x32, 0xd3, 0x0d, 0x0a, 0x17, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 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, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x16, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x47, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, - 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, - 0x1b, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, - 0x79, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x74, 0x0a, 0x23, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x12, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, - 0x65, 0x73, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1f, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x12, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x42, 0x79, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x1f, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x12, 0x74, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x42, + 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, - 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 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, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, + 0x79, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x73, 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, 0x1f, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x45, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, - 0x79, 0x49, 0x44, 0x12, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, - 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x58, 0x0a, 0x26, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6c, 0x61, - 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 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, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x39, - 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x49, 0x4d, - 0x4f, 0x2d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x2d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x12, 0x96, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x34, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, + 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x26, 0x53, 0x79, 0x6e, + 0x63, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 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, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x12, 0x24, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x49, 0x4d, 0x4f, 0x2d, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/grpc/device_definition.proto b/pkg/grpc/device_definition.proto index 49468d1f..9bef26d4 100644 --- a/pkg/grpc/device_definition.proto +++ b/pkg/grpc/device_definition.proto @@ -124,16 +124,17 @@ message UpdateDeviceDefinitionRequest { string device_definition_id = 1; string source = 3 [deprecated = true]; string image_url = 4; - bool verified = 5; + bool verified = 5 [deprecated = true]; string model = 6; int32 year = 7; - string device_make_id = 8; + string device_make_id = 8 [deprecated = true]; repeated DeviceStyles device_styles = 9; string external_id = 11 [deprecated = true]; string device_type_id = 12; repeated DeviceTypeAttributeRequest device_attributes = 13; repeated ExternalID external_ids = 14 [deprecated = true]; - string hardware_template_id = 15; + string hardware_template_id = 15 [deprecated = true]; + string manufacturer_name = 16; message DeviceStyles { string id = 1; From 03f190573e787886579685ff7fbadab13bf6a864 Mon Sep 17 00:00:00 2001 From: James Reategui Date: Thu, 12 Jun 2025 10:37:29 -0400 Subject: [PATCH 5/6] fixed import cycle, linter --- internal/api/grpc_definitions_service.go | 1 + internal/core/commands/bulk_validate_vin.go | 19 ++-- internal/core/common/utils.go | 69 ++++++++------- internal/core/models/manufacturer.go | 8 ++ .../db/repositories/vin_repo.go | 1 + internal/infrastructure/dbtest/test_helper.go | 7 +- .../device_definition_on_chain_service.go | 86 +++++++++---------- .../infrastructure/gateways/identity_api.go | 27 +++--- ...device_definition_on_chain_service_mock.go | 6 +- .../gateways/mocks/identity_api_mock.go | 10 +-- 10 files changed, 114 insertions(+), 120 deletions(-) create mode 100644 internal/core/models/manufacturer.go diff --git a/internal/api/grpc_definitions_service.go b/internal/api/grpc_definitions_service.go index 31f2a678..918891a7 100644 --- a/internal/api/grpc_definitions_service.go +++ b/internal/api/grpc_definitions_service.go @@ -3,6 +3,7 @@ package api import ( "context" "encoding/json" + stringutils "github.com/DIMO-Network/shared/pkg/strings" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/internal/core/commands/bulk_validate_vin.go b/internal/core/commands/bulk_validate_vin.go index 3792b1cb..cf48aa50 100644 --- a/internal/core/commands/bulk_validate_vin.go +++ b/internal/core/commands/bulk_validate_vin.go @@ -4,10 +4,9 @@ package commands import ( "context" "fmt" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "github.com/DIMO-Network/device-definitions-api/internal/core/mediator" - "github.com/DIMO-Network/device-definitions-api/internal/core/models" + coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" "github.com/DIMO-Network/device-definitions-api/internal/core/queries" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" pgrpc "github.com/DIMO-Network/device-definitions-api/pkg/grpc" @@ -24,11 +23,11 @@ type BulkValidateVinCommandResult struct { } type DecodedVIN struct { - VIN string `json:"vin"` - DefinitionID string `json:"definition_id"` - DeviceMake gateways.Manufacturer `json:"device_make"` - DeviceYear int32 `json:"device_year"` - DeviceModel string `json:"device_model"` + VIN string `json:"vin"` + DefinitionID string `json:"definition_id"` + DeviceMake coremodels.Manufacturer `json:"device_make"` + DeviceYear int32 `json:"device_year"` + DeviceModel string `json:"device_model"` } func (*BulkValidateVinCommand) Key() string { return "BulkValidateVinCommand" } @@ -67,8 +66,8 @@ func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediat devideDefinition, err := dc.DeviceDefinitionDataHandler.Handle(ctx, &queries.GetDeviceDefinitionByIDQuery{DeviceDefinitionID: decodedVIN.(*pgrpc.DecodeVinResponse).DefinitionId}) //nolint if err == nil { - dd := devideDefinition.(*models.GetDeviceDefinitionQueryResult) - dm := gateways.Manufacturer{ + dd := devideDefinition.(*coremodels.GetDeviceDefinitionQueryResult) + dm := coremodels.Manufacturer{ TokenID: dd.MakeTokenID, Name: dd.MakeName, } @@ -78,7 +77,7 @@ func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediat DefinitionID: decodedVIN.(*pgrpc.DecodeVinResponse).DefinitionId, DeviceYear: decodedVIN.(*pgrpc.DecodeVinResponse).Year, DeviceMake: dm, - DeviceModel: devideDefinition.(*models.GetDeviceDefinitionQueryResult).DeviceStyles[0].SubModel, + DeviceModel: devideDefinition.(*coremodels.GetDeviceDefinitionQueryResult).DeviceStyles[0].SubModel, }) } } diff --git a/internal/core/common/utils.go b/internal/core/common/utils.go index d4f1b634..c21ef029 100644 --- a/internal/core/common/utils.go +++ b/internal/core/common/utils.go @@ -3,11 +3,10 @@ package common import ( "encoding/json" "fmt" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "net/http" "strings" - "github.com/DIMO-Network/device-definitions-api/internal/core/models" + coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" repoModel "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/exceptions" "github.com/DIMO-Network/device-definitions-api/pkg/grpc" @@ -32,12 +31,12 @@ func Contains(s []string, str string) bool { return false } -func BuildExternalIDs(externalIDsJSON null.JSON) []*models.ExternalID { - var externalIDs []*models.ExternalID +func BuildExternalIDs(externalIDsJSON null.JSON) []*coremodels.ExternalID { + var externalIDs []*coremodels.ExternalID var ei map[string]string if err := externalIDsJSON.Unmarshal(&ei); err == nil { for vendor, id := range ei { - externalIDs = append(externalIDs, &models.ExternalID{ + externalIDs = append(externalIDs, &coremodels.ExternalID{ Vendor: vendor, ID: id, }) @@ -46,7 +45,7 @@ func BuildExternalIDs(externalIDsJSON null.JSON) []*models.ExternalID { return externalIDs } -func ExternalIDsToGRPC(externalIDs []*models.ExternalID) []*grpc.ExternalID { +func ExternalIDsToGRPC(externalIDs []*coremodels.ExternalID) []*grpc.ExternalID { externalIDsGRPC := make([]*grpc.ExternalID, len(externalIDs)) for i, ei := range externalIDs { externalIDsGRPC[i] = &grpc.ExternalID{ @@ -76,17 +75,17 @@ func GetDefaultImageURL(images []*repoModel.Image) string { return img } -//func BuildFromDeviceDefinitionOnChainToQueryResult(dd *repoModel.DeviceDefinition) (*models.GetDeviceDefinitionQueryResult, error) { +//func BuildFromDeviceDefinitionOnChainToQueryResult(dd *repoModel.DeviceDefinition) (*coremodels.GetDeviceDefinitionQueryResult, error) { // if dd.R == nil || dd.R.DeviceMake == nil { // return nil, errors.New("DeviceMake relation cannot be nil, must be loaded in relation R.DeviceMake") // } -// rp := &models.GetDeviceDefinitionQueryResult{ +// rp := &coremodels.GetDeviceDefinitionQueryResult{ // DefinitionID: dd.ID, // ExternalID: dd.ExternalID.String, // Name: BuildDeviceDefinitionName(dd.Year, dd.R.DeviceMake.Name, dd.Model), // Source: dd.Source.String, // HardwareTemplateID: dd.HardwareTemplateID.String, -// DeviceMake: models.DeviceMake{ +// DeviceMake: coremodels.DeviceMake{ // ID: dd.R.DeviceMake.ID, // Name: dd.R.DeviceMake.Name, // LogoURL: dd.R.DeviceMake.LogoURL, @@ -96,7 +95,7 @@ func GetDefaultImageURL(images []*repoModel.Image) string { // ExternalIDsTyped: BuildExternalIDs(dd.R.DeviceMake.ExternalIds), // HardwareTemplateID: dd.R.DeviceMake.HardwareTemplateID, // }, -// Type: models.DeviceType{ +// Type: coremodels.DeviceType{ // //Type: strings.TrimSpace(dd.R.DeviceType.ID), // Make: dd.R.DeviceMake.Name, // Model: dd.Model, @@ -114,17 +113,17 @@ func GetDefaultImageURL(images []*repoModel.Image) string { // } // // // build object for integrations that have all the info -// rp.DeviceIntegrations = []models.DeviceIntegration{} -// rp.DeviceStyles = []models.DeviceStyle{} -// rp.CompatibleIntegrations = []models.DeviceIntegration{} -// rp.DeviceAttributes = []models.DeviceTypeAttribute{} +// rp.DeviceIntegrations = []coremodels.DeviceIntegration{} +// rp.DeviceStyles = []coremodels.DeviceStyle{} +// rp.CompatibleIntegrations = []coremodels.DeviceIntegration{} +// rp.DeviceAttributes = []coremodels.DeviceTypeAttribute{} // // // pull out the device type device attributes, egGetDev. vehicle information // rp.DeviceAttributes = GetDeviceAttributesTyped(dd.Metadata, dd.R.DeviceType.Metadatakey) // // if dd.R.DeviceIntegrations != nil { // for _, di := range dd.R.DeviceIntegrations { -// deviceIntegration := models.DeviceIntegration{ +// deviceIntegration := coremodels.DeviceIntegration{ // ID: di.R.Integration.ID, // Type: di.R.Integration.Type, // Style: di.R.Integration.Style, @@ -133,7 +132,7 @@ func GetDefaultImageURL(images []*repoModel.Image) string { // } // // if di.Features.Valid { -// var deviceIntegrationFeature []models.DeviceIntegrationFeature +// var deviceIntegrationFeature []coremodels.DeviceIntegrationFeature // if err := di.Features.Unmarshal(&deviceIntegrationFeature); err == nil { // //nolint // deviceIntegration.Features = deviceIntegrationFeature @@ -149,7 +148,7 @@ func GetDefaultImageURL(images []*repoModel.Image) string { // rp.Type.SubModels = SubModelsFromStylesDB(dd.R.DefinitionDeviceStyles) // // for _, ds := range dd.R.DefinitionDeviceStyles { -// deviceStyle := models.DeviceStyle{ +// deviceStyle := coremodels.DeviceStyle{ // ID: ds.ID, // DefinitionID: ds.DefinitionID, // ExternalStyleID: ds.ExternalStyleID, @@ -172,15 +171,15 @@ func GetDefaultImageURL(images []*repoModel.Image) string { // return rp, nil //} -func GetDeviceAttributesTyped(metadata null.JSON, key string) []models.DeviceTypeAttributeEditor { - var respAttrs []models.DeviceTypeAttributeEditor +func GetDeviceAttributesTyped(metadata null.JSON, key string) []coremodels.DeviceTypeAttributeEditor { + var respAttrs []coremodels.DeviceTypeAttributeEditor var ai map[string]any if err := metadata.Unmarshal(&ai); err == nil { if ai != nil { if a, ok := ai[key]; ok && a != nil { attributes := ai[key].(map[string]any) for key, value := range attributes { - respAttrs = append(respAttrs, models.DeviceTypeAttributeEditor{ + respAttrs = append(respAttrs, coremodels.DeviceTypeAttributeEditor{ Name: key, Value: fmt.Sprint(value), }) @@ -192,12 +191,12 @@ func GetDeviceAttributesTyped(metadata null.JSON, key string) []models.DeviceTyp return respAttrs } -func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTablelandModel, dm *gateways.Manufacturer, dss []*repoModel.DeviceStyle, trx []*repoModel.DefinitionTransaction) (*models.GetDeviceDefinitionQueryResult, error) { +func BuildFromDeviceDefinitionToQueryResult(dd *coremodels.DeviceDefinitionTablelandModel, dm *coremodels.Manufacturer, dss []*repoModel.DeviceStyle, trx []*repoModel.DefinitionTransaction) (*coremodels.GetDeviceDefinitionQueryResult, error) { mdBytes := []byte("{}") if dd.Metadata != nil { mdBytes, _ = json.Marshal(dd.Metadata) } - rp := &models.GetDeviceDefinitionQueryResult{ + rp := &coremodels.GetDeviceDefinitionQueryResult{ DeviceDefinitionID: dd.ID, NameSlug: dd.ID, Name: BuildDeviceDefinitionName(int16(dd.Year), dm.Name, dd.Model), @@ -210,14 +209,14 @@ func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTableland } // build object for integrations that have all the info - rp.DeviceStyles = []models.DeviceStyle{} - rp.DeviceAttributes = []models.DeviceTypeAttributeEditor{} + rp.DeviceStyles = []coremodels.DeviceStyle{} + rp.DeviceAttributes = []coremodels.DeviceTypeAttributeEditor{} // pull out the device type device attributes, egGetDev. vehicle information rp.DeviceAttributes = GetDeviceAttributesTyped(null.JSONFrom(mdBytes), dd.DeviceType) for _, ds := range dss { - deviceStyle := models.DeviceStyle{ + deviceStyle := coremodels.DeviceStyle{ ID: ds.ID, DefinitionID: ds.DefinitionID, ExternalStyleID: ds.ExternalStyleID, @@ -244,16 +243,16 @@ func BuildFromDeviceDefinitionToQueryResult(dd *models.DeviceDefinitionTableland return rp, nil } -func BuildDeviceTypeAttributes(attributes []*models.UpdateDeviceTypeAttribute, dt *repoModel.DeviceType) (null.JSON, error) { +func BuildDeviceTypeAttributes(attributes []*coremodels.UpdateDeviceTypeAttribute, dt *repoModel.DeviceType) (null.JSON, error) { // attribute info if attributes == nil { return null.JSON{Valid: false}, nil } deviceTypeInfo := make(map[string]interface{}) metaData := make(map[string]interface{}) - var ai map[string][]models.GetDeviceTypeAttributeQueryResult + var ai map[string][]coremodels.GetDeviceTypeAttributeQueryResult if err := dt.Properties.Unmarshal(&ai); err == nil { - filterProperty := func(name string, items []models.GetDeviceTypeAttributeQueryResult) *models.GetDeviceTypeAttributeQueryResult { + filterProperty := func(name string, items []coremodels.GetDeviceTypeAttributeQueryResult) *coremodels.GetDeviceTypeAttributeQueryResult { for _, attribute := range items { if name == attribute.Name { return &attribute @@ -325,16 +324,16 @@ func CheckTransactionStatus(txHash, apiKey string, useAmoy bool) (bool, error) { return false, nil } -func ConvertMetadataToDeviceAttributes(metadata *models.DeviceDefinitionMetadata) []models.DeviceTypeAttributeEditor { +func ConvertMetadataToDeviceAttributes(metadata *coremodels.DeviceDefinitionMetadata) []coremodels.DeviceTypeAttributeEditor { // Depending on your types, you might have to perform additional conversion logic. // Here we're simply returning the metadata as-is for assignment, but if your // DeviceAttributes require a specific structure, you'll have to adjust this. - dta := []models.DeviceTypeAttributeEditor{} + dta := []coremodels.DeviceTypeAttributeEditor{} if metadata == nil { return dta } for _, attribute := range metadata.DeviceAttributes { - dta = append(dta, models.DeviceTypeAttributeEditor{ + dta = append(dta, coremodels.DeviceTypeAttributeEditor{ Name: attribute.Name, Label: attribute.Name, Description: attribute.Name, @@ -347,15 +346,15 @@ func ConvertMetadataToDeviceAttributes(metadata *models.DeviceDefinitionMetadata return dta } -func ConvertDeviceTypeAttrsToDefinitionMetadata(attributes []*models.UpdateDeviceTypeAttribute) *models.DeviceDefinitionMetadata { - ddm := &models.DeviceDefinitionMetadata{ - DeviceAttributes: make([]models.DeviceTypeAttribute, len(attributes)), +func ConvertDeviceTypeAttrsToDefinitionMetadata(attributes []*coremodels.UpdateDeviceTypeAttribute) *coremodels.DeviceDefinitionMetadata { + ddm := &coremodels.DeviceDefinitionMetadata{ + DeviceAttributes: make([]coremodels.DeviceTypeAttribute, len(attributes)), } if len(attributes) == 0 { return nil } for i, attr := range attributes { - ddm.DeviceAttributes[i] = models.DeviceTypeAttribute{ + ddm.DeviceAttributes[i] = coremodels.DeviceTypeAttribute{ Name: attr.Name, Value: attr.Value, } diff --git a/internal/core/models/manufacturer.go b/internal/core/models/manufacturer.go new file mode 100644 index 00000000..7099fd06 --- /dev/null +++ b/internal/core/models/manufacturer.go @@ -0,0 +1,8 @@ +package models + +type Manufacturer struct { + TokenID int `json:"tokenId"` + Name string `json:"name"` + TableID int `json:"tableId"` + Owner string `json:"owner"` +} diff --git a/internal/infrastructure/db/repositories/vin_repo.go b/internal/infrastructure/db/repositories/vin_repo.go index 6c11d03a..6391e04c 100644 --- a/internal/infrastructure/db/repositories/vin_repo.go +++ b/internal/infrastructure/db/repositories/vin_repo.go @@ -6,6 +6,7 @@ import ( "context" "database/sql" "fmt" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "github.com/DIMO-Network/device-definitions-api/internal/contracts" diff --git a/internal/infrastructure/dbtest/test_helper.go b/internal/infrastructure/dbtest/test_helper.go index a933620b..363f4d6e 100644 --- a/internal/infrastructure/dbtest/test_helper.go +++ b/internal/infrastructure/dbtest/test_helper.go @@ -5,7 +5,6 @@ import ( "database/sql" _ "embed" "fmt" - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" "os" "testing" @@ -155,7 +154,7 @@ func SetupCreateDeviceDefinition(t *testing.T, manufacturerName, model string, y return dd } -func SetupCreateDeviceDefinitionWithVehicleInfo(t *testing.T, dm gateways.Manufacturer, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { +func SetupCreateDeviceDefinitionWithVehicleInfo(t *testing.T, dm coremodels.Manufacturer, model string, year int, pdb db.Store) *coremodels.DeviceDefinitionTablelandModel { dd := SetupCreateDeviceDefinition(t, dm.Name, model, year, pdb) dd.Metadata = &coremodels.DeviceDefinitionMetadata{ DeviceAttributes: []coremodels.DeviceTypeAttribute{ @@ -193,8 +192,8 @@ func SetupCreateDeviceType(t *testing.T, pdb db.Store) *models.DeviceType { return dt } -func SetupCreateMake(mk string) gateways.Manufacturer { - dm := gateways.Manufacturer{ +func SetupCreateMake(mk string) coremodels.Manufacturer { + dm := coremodels.Manufacturer{ Name: mk, TokenID: 123, } diff --git a/internal/infrastructure/gateways/device_definition_on_chain_service.go b/internal/infrastructure/gateways/device_definition_on_chain_service.go index b2145ae8..bf8a578a 100644 --- a/internal/infrastructure/gateways/device_definition_on_chain_service.go +++ b/internal/infrastructure/gateways/device_definition_on_chain_service.go @@ -14,51 +14,43 @@ import ( "strings" "time" - stringutils "github.com/DIMO-Network/shared/pkg/strings" - - models2 "github.com/DIMO-Network/device-definitions-api/internal/core/models" - - "github.com/volatiletech/sqlboiler/v4/boil" - - "github.com/patrickmn/go-cache" - - "github.com/DIMO-Network/shared/pkg/db" - - "github.com/DIMO-Network/device-definitions-api/pkg/grpc" - "github.com/tidwall/gjson" - - "github.com/pkg/errors" - - "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/metrics" - "github.com/prometheus/client_golang/prometheus" - "github.com/DIMO-Network/device-definitions-api/internal/config" "github.com/DIMO-Network/device-definitions-api/internal/contracts" + coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/db/models" + "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/metrics" "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/sender" + "github.com/DIMO-Network/device-definitions-api/pkg/grpc" + "github.com/DIMO-Network/shared/pkg/db" + stringutils "github.com/DIMO-Network/shared/pkg/strings" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" eth_types "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/patrickmn/go-cache" + "github.com/pkg/errors" + "github.com/prometheus/client_golang/prometheus" "github.com/rs/zerolog" + "github.com/tidwall/gjson" "github.com/volatiletech/null/v8" + "github.com/volatiletech/sqlboiler/v4/boil" "github.com/volatiletech/sqlboiler/v4/types" ) //go:generate mockgen -source device_definition_on_chain_service.go -destination mocks/device_definition_on_chain_service_mock.go -package mocks type DeviceDefinitionOnChainService interface { - GetManufacturer(manufacturerSlug string) (*Manufacturer, error) + GetManufacturer(manufacturerSlug string) (*coremodels.Manufacturer, error) GetManufacturerNameByID(ctx context.Context, manufacturerID *big.Int) (string, error) // GetDeviceDefinitionByID get DD from tableland by slug ID and specifying the manufacturer for the table to lookup in - GetDeviceDefinitionByID(ctx context.Context, manufacturerID *big.Int, ID string) (*models2.DeviceDefinitionTablelandModel, error) + GetDeviceDefinitionByID(ctx context.Context, manufacturerID *big.Int, ID string) (*coremodels.DeviceDefinitionTablelandModel, error) // GetDefinitionByID get DD from tableland by slug ID, automatically figures out table by oem portion of slug. returns the manufacturer token id too - GetDefinitionByID(ctx context.Context, ID string) (*models2.DeviceDefinitionTablelandModel, *big.Int, error) - GetDefinitionTableland(ctx context.Context, manufacturerID *big.Int, ID string) (*models2.DeviceDefinitionTablelandModel, error) - GetDeviceDefinitions(ctx context.Context, manufacturerID types.NullDecimal, ID string, model string, year int, pageIndex, pageSize int32) ([]models2.DeviceDefinitionTablelandModel, error) - Create(ctx context.Context, manufacturerName string, dd models2.DeviceDefinitionTablelandModel) (*string, error) + GetDefinitionByID(ctx context.Context, ID string) (*coremodels.DeviceDefinitionTablelandModel, *big.Int, error) + GetDefinitionTableland(ctx context.Context, manufacturerID *big.Int, ID string) (*coremodels.DeviceDefinitionTablelandModel, error) + GetDeviceDefinitions(ctx context.Context, manufacturerID types.NullDecimal, ID string, model string, year int, pageIndex, pageSize int32) ([]coremodels.DeviceDefinitionTablelandModel, error) + Create(ctx context.Context, manufacturerName string, dd coremodels.DeviceDefinitionTablelandModel) (*string, error) Update(ctx context.Context, manufacturerName string, input contracts.DeviceDefinitionUpdateInput) (*string, error) Delete(ctx context.Context, manufacturerName, id string) (*string, error) - QueryDefinitionsCustom(ctx context.Context, manufacturerID int, whereClause string, pageIndex int) ([]models2.DeviceDefinitionTablelandModel, error) + QueryDefinitionsCustom(ctx context.Context, manufacturerID int, whereClause string, pageIndex int) ([]coremodels.DeviceDefinitionTablelandModel, error) } type deviceDefinitionOnChainService struct { @@ -87,7 +79,7 @@ func NewDeviceDefinitionOnChainService(settings *config.Settings, logger *zerolo } // GetDeviceDefinitionByID gets dd from tableland with a select statement, returning a db model object -func (e *deviceDefinitionOnChainService) GetDeviceDefinitionByID(ctx context.Context, manufacturerID *big.Int, ID string) (*models2.DeviceDefinitionTablelandModel, error) { +func (e *deviceDefinitionOnChainService) GetDeviceDefinitionByID(ctx context.Context, manufacturerID *big.Int, ID string) (*coremodels.DeviceDefinitionTablelandModel, error) { tablelandDD, err := e.GetDefinitionTableland(ctx, manufacturerID, ID) if err != nil { return nil, err @@ -129,7 +121,7 @@ func (e *deviceDefinitionOnChainService) GetManufacturerNameByID(ctx context.Con } // GetDefinitionByID returns the tableland on chain DD model and the manufacturer token id -func (e *deviceDefinitionOnChainService) GetDefinitionByID(ctx context.Context, ID string) (*models2.DeviceDefinitionTablelandModel, *big.Int, error) { +func (e *deviceDefinitionOnChainService) GetDefinitionByID(ctx context.Context, ID string) (*coremodels.DeviceDefinitionTablelandModel, *big.Int, error) { split := strings.Split(ID, "_") if len(split) != 3 { return nil, nil, fmt.Errorf("get dd by slug - invalid slug: %s", ID) @@ -145,10 +137,10 @@ func (e *deviceDefinitionOnChainService) GetDefinitionByID(ctx context.Context, return tblDD, manufacturerID, err } -func (e *deviceDefinitionOnChainService) GetManufacturer(manufacturerSlug string) (*Manufacturer, error) { +func (e *deviceDefinitionOnChainService) GetManufacturer(manufacturerSlug string) (*coremodels.Manufacturer, error) { value, found := e.inmemCache.Get(manufacturerSlug) if found { - return value.(*Manufacturer), nil + return value.(*coremodels.Manufacturer), nil } manufacturer, err := e.identityAPI.GetManufacturer(manufacturerSlug) if err != nil { @@ -159,7 +151,7 @@ func (e *deviceDefinitionOnChainService) GetManufacturer(manufacturerSlug string } // GetDefinitionTableland gets dd from tableland with a select statement and returns tbl object -func (e *deviceDefinitionOnChainService) GetDefinitionTableland(ctx context.Context, manufacturerID *big.Int, ID string) (*models2.DeviceDefinitionTablelandModel, error) { +func (e *deviceDefinitionOnChainService) GetDefinitionTableland(ctx context.Context, manufacturerID *big.Int, ID string) (*coremodels.DeviceDefinitionTablelandModel, error) { if manufacturerID == nil || manufacturerID.Uint64() == 0 { return nil, fmt.Errorf("GetDefinitionTableland - manufacturerID cannot be 0") } @@ -175,7 +167,7 @@ func (e *deviceDefinitionOnChainService) GetDefinitionTableland(ctx context.Cont "statement": statement, } - var modelTableland []models2.DeviceDefinitionTablelandModel + var modelTableland []coremodels.DeviceDefinitionTablelandModel if err := e.QueryTableland(queryParams, &modelTableland); err != nil { return nil, errors.Wrapf(err, "failed to query tableland, manufacturer: %d", manufacturerID.Int64()) } @@ -186,7 +178,7 @@ func (e *deviceDefinitionOnChainService) GetDefinitionTableland(ctx context.Cont return &modelTableland[0], nil } -func (e *deviceDefinitionOnChainService) GetDeviceDefinitions(ctx context.Context, manufacturerID types.NullDecimal, ID string, model string, year int, pageIndex, pageSize int32) ([]models2.DeviceDefinitionTablelandModel, error) { +func (e *deviceDefinitionOnChainService) GetDeviceDefinitions(ctx context.Context, manufacturerID types.NullDecimal, ID string, model string, year int, pageIndex, pageSize int32) ([]coremodels.DeviceDefinitionTablelandModel, error) { if manufacturerID.IsZero() { return nil, fmt.Errorf("manufacturerID cannot be 0") } @@ -218,7 +210,7 @@ func (e *deviceDefinitionOnChainService) GetDeviceDefinitions(ctx context.Contex "statement": statement, } - var modelTableland []models2.DeviceDefinitionTablelandModel + var modelTableland []coremodels.DeviceDefinitionTablelandModel if err := e.QueryTableland(queryParams, &modelTableland); err != nil { return nil, err } @@ -227,7 +219,7 @@ func (e *deviceDefinitionOnChainService) GetDeviceDefinitions(ctx context.Contex } // QueryDefinitionsCustom queries tableland definitions oem table based on manuf ID. Always page size of 500, but you can alter the page index -func (e *deviceDefinitionOnChainService) QueryDefinitionsCustom(ctx context.Context, manufacturerID int, whereClause string, pageIndex int) ([]models2.DeviceDefinitionTablelandModel, error) { +func (e *deviceDefinitionOnChainService) QueryDefinitionsCustom(ctx context.Context, manufacturerID int, whereClause string, pageIndex int) ([]coremodels.DeviceDefinitionTablelandModel, error) { if manufacturerID == 0 { return nil, fmt.Errorf("manufacturerID cannot be 0") } @@ -247,7 +239,7 @@ func (e *deviceDefinitionOnChainService) QueryDefinitionsCustom(ctx context.Cont "statement": statement, } - var modelTableland []models2.DeviceDefinitionTablelandModel + var modelTableland []coremodels.DeviceDefinitionTablelandModel if err := e.QueryTableland(queryParams, &modelTableland); err != nil { return nil, err } @@ -299,7 +291,7 @@ const ( ) // Create does a create for tableland, on-chain operation - checks if already exists, inserts transaction in db. returns the onchain transaction -func (e *deviceDefinitionOnChainService) Create(ctx context.Context, manufacturerName string, dd models2.DeviceDefinitionTablelandModel) (*string, error) { +func (e *deviceDefinitionOnChainService) Create(ctx context.Context, manufacturerName string, dd coremodels.DeviceDefinitionTablelandModel) (*string, error) { metrics.Success.With(prometheus.Labels{"method": TablelandRequests}).Inc() e.logger.Info().Msgf("OnChain Start Create for device definition %s. EthereumSendTransaction %t. payload: %+v", dd.ID, e.settings.EthereumSendTransaction, dd) @@ -656,17 +648,17 @@ func (e *deviceDefinitionOnChainService) Delete(ctx context.Context, manufacture return &trx, nil } -func validateAttributes(current, newAttrs []models2.DeviceTypeAttribute) ([]models2.DeviceTypeAttribute, []models2.DeviceTypeAttribute) { +func validateAttributes(current, newAttrs []coremodels.DeviceTypeAttribute) ([]coremodels.DeviceTypeAttribute, []coremodels.DeviceTypeAttribute) { currentMap := attributesToMap(current) newMap := attributesToMap(newAttrs) - var newOrModifiedAttributes []models2.DeviceTypeAttribute - var removedAttributes []models2.DeviceTypeAttribute + var newOrModifiedAttributes []coremodels.DeviceTypeAttribute + var removedAttributes []coremodels.DeviceTypeAttribute // Find new or changed attributes for name, newValue := range newMap { if currentValue, exists := currentMap[name]; !exists || currentValue != newValue { - newOrModifiedAttributes = append(newOrModifiedAttributes, models2.DeviceTypeAttribute{ + newOrModifiedAttributes = append(newOrModifiedAttributes, coremodels.DeviceTypeAttribute{ Name: name, Value: newValue, }) @@ -676,7 +668,7 @@ func validateAttributes(current, newAttrs []models2.DeviceTypeAttribute) ([]mode // Find deleted attributes for name, currentValue := range currentMap { if _, exists := newMap[name]; !exists { - removedAttributes = append(removedAttributes, models2.DeviceTypeAttribute{ + removedAttributes = append(removedAttributes, coremodels.DeviceTypeAttribute{ Name: name, Value: currentValue, }) @@ -686,7 +678,7 @@ func validateAttributes(current, newAttrs []models2.DeviceTypeAttribute) ([]mode return newOrModifiedAttributes, removedAttributes } -func attributesToMap(attributes []models2.DeviceTypeAttribute) map[string]string { +func attributesToMap(attributes []coremodels.DeviceTypeAttribute) map[string]string { attrMap := make(map[string]string) for _, attr := range attributes { attrMap[attr.Name] = attr.Value @@ -718,8 +710,8 @@ func NewKeyedTransactorWithChainID(context context.Context, send sender.Sender, }, nil } -func GetDeviceAttributesTyped(metadata null.JSON, key string) []models2.DeviceTypeAttribute { - var respAttrs []models2.DeviceTypeAttribute +func GetDeviceAttributesTyped(metadata null.JSON, key string) []coremodels.DeviceTypeAttribute { + var respAttrs []coremodels.DeviceTypeAttribute var ai map[string]any if err := metadata.Unmarshal(&ai); err == nil { if ai != nil { @@ -728,7 +720,7 @@ func GetDeviceAttributesTyped(metadata null.JSON, key string) []models2.DeviceTy for key, value := range attributes { v := fmt.Sprint(value) if len(v) > 0 { - respAttrs = append(respAttrs, models2.DeviceTypeAttribute{ + respAttrs = append(respAttrs, coremodels.DeviceTypeAttribute{ Name: key, Value: v, }) @@ -771,8 +763,8 @@ func BuildDeviceTypeAttributesTbland(attributes []*grpc.DeviceTypeAttributeReque if attributes == nil { return "" } - deviceTypeInfo := models2.DeviceDefinitionMetadata{} - metaData := make([]models2.DeviceTypeAttribute, len(attributes)) + deviceTypeInfo := coremodels.DeviceDefinitionMetadata{} + metaData := make([]coremodels.DeviceTypeAttribute, len(attributes)) for i, prop := range attributes { metaData[i].Name = prop.Name metaData[i].Value = prop.Value diff --git a/internal/infrastructure/gateways/identity_api.go b/internal/infrastructure/gateways/identity_api.go index 8a1c225f..8d314540 100644 --- a/internal/infrastructure/gateways/identity_api.go +++ b/internal/infrastructure/gateways/identity_api.go @@ -3,6 +3,8 @@ package gateways import ( "time" + coremodels "github.com/DIMO-Network/device-definitions-api/internal/core/models" + "github.com/DIMO-Network/device-definitions-api/internal/config" "github.com/DIMO-Network/shared/pkg/http" "github.com/pkg/errors" @@ -20,8 +22,8 @@ type identityAPIService struct { //go:generate mockgen -source identity_api.go -destination mocks/identity_api_mock.go -package mocks type IdentityAPI interface { - GetManufacturer(slug string) (*Manufacturer, error) - GetManufacturers() ([]Manufacturer, error) + GetManufacturer(slug string) (*coremodels.Manufacturer, error) + GetManufacturers() ([]coremodels.Manufacturer, error) } // NewIdentityAPIService creates a new instance of IdentityAPI, initializing it with the provided logger, settings, and HTTP client. @@ -37,7 +39,7 @@ func NewIdentityAPIService(logger *zerolog.Logger, settings *config.Settings) Id } // GetManufacturer from identity-api by the name - must match exactly. Returns the token id and other on chain info -func (i *identityAPIService) GetManufacturer(slug string) (*Manufacturer, error) { +func (i *identityAPIService) GetManufacturer(slug string) (*coremodels.Manufacturer, error) { query := `{ manufacturer(by: {slug: "` + slug + `"}) { tokenId @@ -48,7 +50,7 @@ func (i *identityAPIService) GetManufacturer(slug string) (*Manufacturer, error) }` var wrapper struct { Data struct { - Manufacturer Manufacturer `json:"manufacturer"` + Manufacturer coremodels.Manufacturer `json:"manufacturer"` } `json:"data"` } err := i.httpClient.GraphQLQuery("", query, &wrapper) @@ -61,7 +63,7 @@ func (i *identityAPIService) GetManufacturer(slug string) (*Manufacturer, error) return &wrapper.Data.Manufacturer, nil } -func (i *identityAPIService) GetManufacturers() ([]Manufacturer, error) { +func (i *identityAPIService) GetManufacturers() ([]coremodels.Manufacturer, error) { query := `{ manufacturers { totalCount @@ -76,9 +78,9 @@ func (i *identityAPIService) GetManufacturers() ([]Manufacturer, error) { }` var wrapper struct { Data struct { - Vehicles struct { - TotalCount int `json:"totalCount"` - Nodes []Manufacturer `json:"nodes"` + Manufacturers struct { + TotalCount int `json:"totalCount"` + Nodes []coremodels.Manufacturer `json:"nodes"` } `json:"manufacturers"` } `json:"data"` } @@ -87,14 +89,7 @@ func (i *identityAPIService) GetManufacturers() ([]Manufacturer, error) { if err != nil { return nil, err } - return wrapper.Data.Vehicles.Nodes, nil -} - -type Manufacturer struct { - TokenID int `json:"tokenId"` - Name string `json:"name"` - TableID int `json:"tableId"` - Owner string `json:"owner"` + return wrapper.Data.Manufacturers.Nodes, nil } type GraphQLRequest struct { diff --git a/internal/infrastructure/gateways/mocks/device_definition_on_chain_service_mock.go b/internal/infrastructure/gateways/mocks/device_definition_on_chain_service_mock.go index a76f9ed5..022a5dd1 100644 --- a/internal/infrastructure/gateways/mocks/device_definition_on_chain_service_mock.go +++ b/internal/infrastructure/gateways/mocks/device_definition_on_chain_service_mock.go @@ -16,7 +16,6 @@ import ( contracts "github.com/DIMO-Network/device-definitions-api/internal/contracts" models "github.com/DIMO-Network/device-definitions-api/internal/core/models" - gateways "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" types "github.com/volatiletech/sqlboiler/v4/types" gomock "go.uber.org/mock/gomock" ) @@ -25,6 +24,7 @@ import ( type MockDeviceDefinitionOnChainService struct { ctrl *gomock.Controller recorder *MockDeviceDefinitionOnChainServiceMockRecorder + isgomock struct{} } // MockDeviceDefinitionOnChainServiceMockRecorder is the mock recorder for MockDeviceDefinitionOnChainService. @@ -136,10 +136,10 @@ func (mr *MockDeviceDefinitionOnChainServiceMockRecorder) GetDeviceDefinitions(c } // GetManufacturer mocks base method. -func (m *MockDeviceDefinitionOnChainService) GetManufacturer(manufacturerSlug string) (*gateways.Manufacturer, error) { +func (m *MockDeviceDefinitionOnChainService) GetManufacturer(manufacturerSlug string) (*models.Manufacturer, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetManufacturer", manufacturerSlug) - ret0, _ := ret[0].(*gateways.Manufacturer) + ret0, _ := ret[0].(*models.Manufacturer) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/internal/infrastructure/gateways/mocks/identity_api_mock.go b/internal/infrastructure/gateways/mocks/identity_api_mock.go index ff05d17b..b59c6ce1 100644 --- a/internal/infrastructure/gateways/mocks/identity_api_mock.go +++ b/internal/infrastructure/gateways/mocks/identity_api_mock.go @@ -12,7 +12,7 @@ package mocks import ( reflect "reflect" - gateways "github.com/DIMO-Network/device-definitions-api/internal/infrastructure/gateways" + models "github.com/DIMO-Network/device-definitions-api/internal/core/models" gomock "go.uber.org/mock/gomock" ) @@ -41,10 +41,10 @@ func (m *MockIdentityAPI) EXPECT() *MockIdentityAPIMockRecorder { } // GetManufacturer mocks base method. -func (m *MockIdentityAPI) GetManufacturer(slug string) (*gateways.Manufacturer, error) { +func (m *MockIdentityAPI) GetManufacturer(slug string) (*models.Manufacturer, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetManufacturer", slug) - ret0, _ := ret[0].(*gateways.Manufacturer) + ret0, _ := ret[0].(*models.Manufacturer) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -56,10 +56,10 @@ func (mr *MockIdentityAPIMockRecorder) GetManufacturer(slug any) *gomock.Call { } // GetManufacturers mocks base method. -func (m *MockIdentityAPI) GetManufacturers() ([]gateways.Manufacturer, error) { +func (m *MockIdentityAPI) GetManufacturers() ([]models.Manufacturer, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetManufacturers") - ret0, _ := ret[0].([]gateways.Manufacturer) + ret0, _ := ret[0].([]models.Manufacturer) ret1, _ := ret[1].(error) return ret0, ret1 } From 4e38c84abbbc8d8712406e34ada457036b1cb35c Mon Sep 17 00:00:00 2001 From: James Reategui Date: Thu, 12 Jun 2025 13:59:53 -0400 Subject: [PATCH 6/6] fix tests --- internal/core/queries/decode_vin_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/core/queries/decode_vin_test.go b/internal/core/queries/decode_vin_test.go index 1afa991e..0153ec39 100644 --- a/internal/core/queries/decode_vin_test.go +++ b/internal/core/queries/decode_vin_test.go @@ -93,7 +93,7 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_WithExistingDD_UpdatesAt const vin = "1FMCU0G61MUA52727" // ford escape 2021 dm := dbtesthelper.SetupCreateMake("Ford") - s.mockIdentity.EXPECT().GetManufacturer("ford").Return(dm, nil) + //s.mockIdentity.EXPECT().GetManufacturer("ford").Return(&dm, nil) dd := dbtesthelper.SetupCreateDeviceDefinition(s.T(), dm.Name, "Escape", 2021, s.pdb) // mock setup, include some attributes we should expect in metadata, and trim we should expect created in styles @@ -200,9 +200,9 @@ func (s *DecodeVINQueryHandlerSuite) TestHandle_Success_CreatesDD_WithMismatchWM const wmi = "1FM" dmFord := dbtesthelper.SetupCreateMake("Ford") - s.mockIdentity.EXPECT().GetManufacturer("ford").Return(dmFord, nil) + //s.mockIdentity.EXPECT().GetManufacturer("ford").Return(&dmFord, nil) dmLincoln := dbtesthelper.SetupCreateMake("Lincoln") - s.mockIdentity.EXPECT().GetManufacturer("lincoln").Return(dmLincoln, nil) + //s.mockIdentity.EXPECT().GetManufacturer("lincoln").Return(&dmLincoln, nil) _ = dbtesthelper.SetupCreateAutoPiIntegration(s.T(), s.pdb) _ = dbtesthelper.SetupCreateWMI(s.T(), wmi, dmFord.Name, s.pdb)