diff --git a/_template/mapper/Dockerfile b/_template/mapper/Dockerfile deleted file mode 100644 index 8feae09..0000000 --- a/_template/mapper/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM golang:1.20.10-alpine3.18 AS builder - -WORKDIR /build - -ENV GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct - -COPY . . - -RUN CGO_ENABLED=0 GOOS=linux go build -o main cmd/main.go - - -FROM ubuntu:18.04 - -RUN mkdir -p kubeedge - -COPY --from=builder /build/main kubeedge/ -COPY ./config.yaml kubeedge/ - -WORKDIR kubeedge diff --git a/_template/mapper/data/dbmethod/influxdb2/handler.go b/_template/mapper/data/dbmethod/influxdb2/handler.go index 53d9509..2a35c61 100644 --- a/_template/mapper/data/dbmethod/influxdb2/handler.go +++ b/_template/mapper/data/dbmethod/influxdb2/handler.go @@ -21,6 +21,7 @@ import ( "time" "k8s.io/klog/v2" + "github.com/kubeedge/Template/driver" "github.com/kubeedge/mapper-framework/pkg/common" ) diff --git a/_template/mapper/go.mod b/_template/mapper/go.mod index 4c7874f..58d0b68 100644 --- a/_template/mapper/go.mod +++ b/_template/mapper/go.mod @@ -1,6 +1,8 @@ module github.com/kubeedge/Template -go 1.21 +go 1.22.0 + +toolchain go1.23.2 require ( github.com/eclipse/paho.mqtt.golang v1.2.0 @@ -13,9 +15,10 @@ require ( github.com/taosdata/driver-go/v3 v3.5.1 go.opentelemetry.io/otel v1.23.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.23.0 + go.opentelemetry.io/otel/metric v1.23.0 go.opentelemetry.io/otel/sdk v1.23.0 go.opentelemetry.io/otel/sdk/metric v1.23.0 - k8s.io/klog/v2 v2.110.1 + k8s.io/klog/v2 v2.120.1 ) require ( @@ -37,7 +40,6 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oapi-codegen/runtime v1.0.0 // indirect github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect - go.opentelemetry.io/otel/metric v1.23.0 // indirect go.opentelemetry.io/otel/trace v1.23.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect golang.org/x/net v0.30.0 // indirect diff --git a/_template/mapper/go.sum b/_template/mapper/go.sum index b722345..0227a17 100644 --- a/_template/mapper/go.sum +++ b/_template/mapper/go.sum @@ -18,7 +18,6 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -65,8 +64,8 @@ github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7o github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= +github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= @@ -121,5 +120,5 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= diff --git a/go.mod b/go.mod index 5f0a324..a900c51 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/kubeedge/mapper-framework -go 1.22 +go 1.22.0 + +toolchain go1.23.2 require ( github.com/avast/retry-go v3.0.0+incompatible @@ -8,21 +10,22 @@ require ( github.com/gorilla/mux v1.8.0 github.com/kubeedge/api v0.0.0 github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect google.golang.org/grpc v1.63.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/klog/v2 v2.110.1 + k8s.io/klog/v2 v2.120.1 ) require ( - github.com/go-logr/logr v1.4.1 // indirect - github.com/kr/pretty v0.1.0 // indirect - github.com/stretchr/testify v1.9.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) replace github.com/kubeedge/api => ../api diff --git a/go.sum b/go.sum index a261ff2..1eca560 100644 --- a/go.sum +++ b/go.sum @@ -1,45 +1,51 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= diff --git a/pkg/dmi-api/api.pb.go b/pkg/dmi-api/api.pb.go deleted file mode 100644 index 1a89812..0000000 --- a/pkg/dmi-api/api.pb.go +++ /dev/null @@ -1,3572 +0,0 @@ -/* -Copyright 2023 The KubeEdge Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -// -// To regenerate api.pb.go run hack/generate-dmi.sh - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc v3.20.3 -// source: api.proto - -package v1beta1 - -import ( - "google.golang.org/grpc" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MapperRegisterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The flag to show how device manager returns. - // True means device manager should return the device list in the response. - // False means device manager should just return nothing. - WithData bool `protobuf:"varint,1,opt,name=withData,proto3" json:"withData,omitempty"` - // Mapper information to be registered to the device manager. - Mapper *MapperInfo `protobuf:"bytes,2,opt,name=mapper,proto3" json:"mapper,omitempty"` -} - -func (x *MapperRegisterRequest) Reset() { - *x = MapperRegisterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapperRegisterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapperRegisterRequest) ProtoMessage() {} - -func (x *MapperRegisterRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapperRegisterRequest.ProtoReflect.Descriptor instead. -func (*MapperRegisterRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{0} -} - -func (x *MapperRegisterRequest) GetWithData() bool { - if x != nil { - return x.WithData - } - return false -} - -func (x *MapperRegisterRequest) GetMapper() *MapperInfo { - if x != nil { - return x.Mapper - } - return nil -} - -type MapperRegisterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of device models which the mapper maintains. - ModelList []*DeviceModel `protobuf:"bytes,1,rep,name=modelList,proto3" json:"modelList,omitempty"` - // List of devices which the mapper maintains. - DeviceList []*Device `protobuf:"bytes,2,rep,name=deviceList,proto3" json:"deviceList,omitempty"` -} - -func (x *MapperRegisterResponse) Reset() { - *x = MapperRegisterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapperRegisterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapperRegisterResponse) ProtoMessage() {} - -func (x *MapperRegisterResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_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 MapperRegisterResponse.ProtoReflect.Descriptor instead. -func (*MapperRegisterResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{1} -} - -func (x *MapperRegisterResponse) GetModelList() []*DeviceModel { - if x != nil { - return x.ModelList - } - return nil -} - -func (x *MapperRegisterResponse) GetDeviceList() []*Device { - if x != nil { - return x.DeviceList - } - return nil -} - -// DeviceModel specifies the information of a device model. -type DeviceModel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of a device model. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specification of a device model. - Spec *DeviceModelSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` -} - -func (x *DeviceModel) Reset() { - *x = DeviceModel{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceModel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceModel) ProtoMessage() {} - -func (x *DeviceModel) ProtoReflect() protoreflect.Message { - mi := &file_api_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 DeviceModel.ProtoReflect.Descriptor instead. -func (*DeviceModel) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{2} -} - -func (x *DeviceModel) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeviceModel) GetSpec() *DeviceModelSpec { - if x != nil { - return x.Spec - } - return nil -} - -// DeviceModelSpec is the specification of a device model. -type DeviceModelSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The properties provided by the device of this device model. - Properties []*ModelProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"` - // The commands executed by the device of this device model. - Commands []*DeviceCommand `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"` -} - -func (x *DeviceModelSpec) Reset() { - *x = DeviceModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceModelSpec) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceModelSpec) ProtoMessage() {} - -func (x *DeviceModelSpec) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceModelSpec.ProtoReflect.Descriptor instead. -func (*DeviceModelSpec) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{3} -} - -func (x *DeviceModelSpec) GetProperties() []*ModelProperty { - if x != nil { - return x.Properties - } - return nil -} - -func (x *DeviceModelSpec) GetCommands() []*DeviceCommand { - if x != nil { - return x.Commands - } - return nil -} - -// ModelProperty is the property of a device. -type ModelProperty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of this property. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The description of this property. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The specific type of this property. - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // The access mode of this property, ReadOnly or ReadWrite. - AccessMode string `protobuf:"bytes,4,opt,name=accessMode,proto3" json:"accessMode,omitempty"` - // The minimum value of this property. - Minimum string `protobuf:"bytes,5,opt,name=minimum,proto3" json:"minimum,omitempty"` - // The maximum value of this property. - Maximum string `protobuf:"bytes,6,opt,name=maximum,proto3" json:"maximum,omitempty"` - // The unit of this property. - Unit string `protobuf:"bytes,7,opt,name=unit,proto3" json:"unit,omitempty"` -} - -func (x *ModelProperty) Reset() { - *x = ModelProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ModelProperty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModelProperty) ProtoMessage() {} - -func (x *ModelProperty) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ModelProperty.ProtoReflect.Descriptor instead. -func (*ModelProperty) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{4} -} - -func (x *ModelProperty) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ModelProperty) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *ModelProperty) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ModelProperty) GetAccessMode() string { - if x != nil { - return x.AccessMode - } - return "" -} - -func (x *ModelProperty) GetMinimum() string { - if x != nil { - return x.Minimum - } - return "" -} - -func (x *ModelProperty) GetMaximum() string { - if x != nil { - return x.Maximum - } - return "" -} - -func (x *ModelProperty) GetUnit() string { - if x != nil { - return x.Unit - } - return "" -} - -// DeviceCommond is the description of a command which the device supports. -type DeviceCommand struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the command. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Url of the command to access. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // Method of the command. - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` - // Status code list which the command can return. - StatusCode []string `protobuf:"bytes,4,rep,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // Parameter list which the command carries. - Parameters []string `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"` - // Response examples of the command. - Response []byte `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *DeviceCommand) Reset() { - *x = DeviceCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceCommand) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceCommand) ProtoMessage() {} - -func (x *DeviceCommand) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceCommand.ProtoReflect.Descriptor instead. -func (*DeviceCommand) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{5} -} - -func (x *DeviceCommand) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeviceCommand) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *DeviceCommand) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *DeviceCommand) GetStatusCode() []string { - if x != nil { - return x.StatusCode - } - return nil -} - -func (x *DeviceCommand) GetParameters() []string { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *DeviceCommand) GetResponse() []byte { - if x != nil { - return x.Response - } - return nil -} - -// Device is the description of a device instance. -type Device struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the device. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specification of the device. - Spec *DeviceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` - // Status of the device. - Status *DeviceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *Device) Reset() { - *x = Device{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Device) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Device) ProtoMessage() {} - -func (x *Device) ProtoReflect() protoreflect.Message { - mi := &file_api_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 Device.ProtoReflect.Descriptor instead. -func (*Device) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{6} -} - -func (x *Device) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Device) GetSpec() *DeviceSpec { - if x != nil { - return x.Spec - } - return nil -} - -func (x *Device) GetStatus() *DeviceStatus { - if x != nil { - return x.Status - } - return nil -} - -// DeviceSpec is the specification of the device. -type DeviceSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The device model which the device references. - DeviceModelReference string `protobuf:"bytes,1,opt,name=deviceModelReference,proto3" json:"deviceModelReference,omitempty"` - // The specific config of the protocol to access to the device. - Protocol *ProtocolConfig `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` - // List of properties which describe the device properties. - Properties []*DeviceProperty `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"` -} - -func (x *DeviceSpec) Reset() { - *x = DeviceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceSpec) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceSpec) ProtoMessage() {} - -func (x *DeviceSpec) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceSpec.ProtoReflect.Descriptor instead. -func (*DeviceSpec) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{7} -} - -func (x *DeviceSpec) GetDeviceModelReference() string { - if x != nil { - return x.DeviceModelReference - } - return "" -} - -func (x *DeviceSpec) GetProtocol() *ProtocolConfig { - if x != nil { - return x.Protocol - } - return nil -} - -func (x *DeviceSpec) GetProperties() []*DeviceProperty { - if x != nil { - return x.Properties - } - return nil -} - -// DeviceProperty describes the specifics all the properties of the device. -type DeviceProperty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The device property name to be accessed. It must be unique. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // the desired value of the property configured by device manager. - Desired *TwinProperty `protobuf:"bytes,2,opt,name=desired,proto3" json:"desired,omitempty"` - // Visitors are intended to be consumed by device mappers which connect to devices - // and collect data / perform actions on the device. - Visitors *VisitorConfig `protobuf:"bytes,3,opt,name=visitors,proto3" json:"visitors,omitempty"` - // Define how frequent mapper will report the value. - ReportCycle int64 `protobuf:"varint,4,opt,name=reportCycle,proto3" json:"reportCycle,omitempty"` - // Define how frequent mapper will collect from device. - CollectCycle int64 `protobuf:"varint,5,opt,name=collectCycle,proto3" json:"collectCycle,omitempty"` - // whether be reported to the cloud - ReportToCloud bool `protobuf:"varint,6,opt,name=reportToCloud,proto3" json:"reportToCloud,omitempty"` - // PushMethod represents the protocol used to push data, - PushMethod *PushMethod `protobuf:"bytes,7,opt,name=pushMethod,proto3" json:"pushMethod,omitempty"` -} - -func (x *DeviceProperty) Reset() { - *x = DeviceProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceProperty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceProperty) ProtoMessage() {} - -func (x *DeviceProperty) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceProperty.ProtoReflect.Descriptor instead. -func (*DeviceProperty) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{8} -} - -func (x *DeviceProperty) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeviceProperty) GetDesired() *TwinProperty { - if x != nil { - return x.Desired - } - return nil -} - -func (x *DeviceProperty) GetVisitors() *VisitorConfig { - if x != nil { - return x.Visitors - } - return nil -} - -func (x *DeviceProperty) GetReportCycle() int64 { - if x != nil { - return x.ReportCycle - } - return 0 -} - -func (x *DeviceProperty) GetCollectCycle() int64 { - if x != nil { - return x.CollectCycle - } - return 0 -} - -func (x *DeviceProperty) GetReportToCloud() bool { - if x != nil { - return x.ReportToCloud - } - return false -} - -func (x *DeviceProperty) GetPushMethod() *PushMethod { - if x != nil { - return x.PushMethod - } - return nil -} - -// ProtocolConfig is the specific config of the protocol to access to the device. -type ProtocolConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the name of the customized protocol. - ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"` - // the config data of the customized protocol. - ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"` -} - -func (x *ProtocolConfig) Reset() { - *x = ProtocolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtocolConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtocolConfig) ProtoMessage() {} - -func (x *ProtocolConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProtocolConfig.ProtoReflect.Descriptor instead. -func (*ProtocolConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{9} -} - -func (x *ProtocolConfig) GetProtocolName() string { - if x != nil { - return x.ProtocolName - } - return "" -} - -func (x *ProtocolConfig) GetConfigData() *CustomizedValue { - if x != nil { - return x.ConfigData - } - return nil -} - -// the visitor to collect the properties of the device of customized protocol. -type VisitorConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the name of the customized protocol. - ProtocolName string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"` - // the config data of the customized protocol. - ConfigData *CustomizedValue `protobuf:"bytes,2,opt,name=configData,proto3" json:"configData,omitempty"` -} - -func (x *VisitorConfig) Reset() { - *x = VisitorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VisitorConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VisitorConfig) ProtoMessage() {} - -func (x *VisitorConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VisitorConfig.ProtoReflect.Descriptor instead. -func (*VisitorConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{10} -} - -func (x *VisitorConfig) GetProtocolName() string { - if x != nil { - return x.ProtocolName - } - return "" -} - -func (x *VisitorConfig) GetConfigData() *CustomizedValue { - if x != nil { - return x.ConfigData - } - return nil -} - -// CustomizedValue is the customized value for developers. -type CustomizedValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // data is the customized value and it can be any form. - Data map[string]*anypb.Any `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *CustomizedValue) Reset() { - *x = CustomizedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomizedValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomizedValue) ProtoMessage() {} - -func (x *CustomizedValue) ProtoReflect() protoreflect.Message { - mi := &file_api_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 CustomizedValue.ProtoReflect.Descriptor instead. -func (*CustomizedValue) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{11} -} - -func (x *CustomizedValue) GetData() map[string]*anypb.Any { - if x != nil { - return x.Data - } - return nil -} - -type PushMethod struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Http *PushMethodHTTP `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"` - Mqtt *PushMethodMQTT `protobuf:"bytes,2,opt,name=mqtt,proto3" json:"mqtt,omitempty"` - DBMethod *DBMethod `protobuf:"bytes,3,opt,name=dbMethod,proto3" json:"dbMethod,omitempty"` -} - -func (x *PushMethod) Reset() { - *x = PushMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMethod) ProtoMessage() {} - -func (x *PushMethod) ProtoReflect() protoreflect.Message { - mi := &file_api_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 PushMethod.ProtoReflect.Descriptor instead. -func (*PushMethod) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{12} -} - -func (x *PushMethod) GetHttp() *PushMethodHTTP { - if x != nil { - return x.Http - } - return nil -} - -func (x *PushMethod) GetMqtt() *PushMethodMQTT { - if x != nil { - return x.Mqtt - } - return nil -} - -func (x *PushMethod) GetDBMethod() *DBMethod { - if x != nil { - return x.DBMethod - } - return nil -} - -type PushMethodHTTP struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` - Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - Requestpath string `protobuf:"bytes,3,opt,name=requestpath,proto3" json:"requestpath,omitempty"` - Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` -} - -func (x *PushMethodHTTP) Reset() { - *x = PushMethodHTTP{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMethodHTTP) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMethodHTTP) ProtoMessage() {} - -func (x *PushMethodHTTP) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushMethodHTTP.ProtoReflect.Descriptor instead. -func (*PushMethodHTTP) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{13} -} - -func (x *PushMethodHTTP) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *PushMethodHTTP) GetPort() int64 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *PushMethodHTTP) GetRequestpath() string { - if x != nil { - return x.Requestpath - } - return "" -} - -func (x *PushMethodHTTP) GetTimeout() int64 { - if x != nil { - return x.Timeout - } - return 0 -} - -type PushMethodMQTT struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // broker address, like mqtt://127.0.0.1:1883 - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // publish topic for mqtt - Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` - // qos of mqtt publish param - Qos int32 `protobuf:"varint,3,opt,name=qos,proto3" json:"qos,omitempty"` - // Is the message retained - Retained bool `protobuf:"varint,4,opt,name=retained,proto3" json:"retained,omitempty"` -} - -func (x *PushMethodMQTT) Reset() { - *x = PushMethodMQTT{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMethodMQTT) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMethodMQTT) ProtoMessage() {} - -func (x *PushMethodMQTT) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushMethodMQTT.ProtoReflect.Descriptor instead. -func (*PushMethodMQTT) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{14} -} - -func (x *PushMethodMQTT) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *PushMethodMQTT) GetTopic() string { - if x != nil { - return x.Topic - } - return "" -} - -func (x *PushMethodMQTT) GetQos() int32 { - if x != nil { - return x.Qos - } - return 0 -} - -func (x *PushMethodMQTT) GetRetained() bool { - if x != nil { - return x.Retained - } - return false -} - -type DBMethod struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the config of database . - Influxdb2 *DBMethodInfluxdb2 `protobuf:"bytes,1,opt,name=influxdb2,proto3" json:"influxdb2,omitempty"` - Redis *DBMethodRedis `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis,omitempty"` - Tdengine *DBMethodTDEngine `protobuf:"bytes,3,opt,name=tdengine,proto3" json:"tdengine,omitempty"` -} - -func (x *DBMethod) Reset() { - *x = DBMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DBMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DBMethod) ProtoMessage() {} - -func (x *DBMethod) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DBMethod.ProtoReflect.Descriptor instead. -func (*DBMethod) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{15} -} - -func (x *DBMethod) GetInfluxdb2() *DBMethodInfluxdb2 { - if x != nil { - return x.Influxdb2 - } - return nil -} - -func (x *DBMethod) GetRedis() *DBMethodRedis { - if x != nil { - return x.Redis - } - return nil -} - -func (x *DBMethod) GetTdengine() *DBMethodTDEngine { - if x != nil { - return x.Tdengine - } - return nil -} - -type DBMethodInfluxdb2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the config of influx database. - Influxdb2ClientConfig *Influxdb2ClientConfig `protobuf:"bytes,1,opt,name=influxdb2ClientConfig,proto3" json:"influxdb2ClientConfig,omitempty"` - Influxdb2DataConfig *Influxdb2DataConfig `protobuf:"bytes,2,opt,name=influxdb2DataConfig,proto3" json:"influxdb2DataConfig,omitempty"` -} - -func (x *DBMethodInfluxdb2) Reset() { - *x = DBMethodInfluxdb2{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DBMethodInfluxdb2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DBMethodInfluxdb2) ProtoMessage() {} - -func (x *DBMethodInfluxdb2) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DBMethodInfluxdb2.ProtoReflect.Descriptor instead. -func (*DBMethodInfluxdb2) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{16} -} - -func (x *DBMethodInfluxdb2) GetInfluxdb2ClientConfig() *Influxdb2ClientConfig { - if x != nil { - return x.Influxdb2ClientConfig - } - return nil -} - -func (x *DBMethodInfluxdb2) GetInfluxdb2DataConfig() *Influxdb2DataConfig { - if x != nil { - return x.Influxdb2DataConfig - } - return nil -} - -type Influxdb2DataConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // data config when push data to influx - Measurement string `protobuf:"bytes,1,opt,name=measurement,proto3" json:"measurement,omitempty"` - Tag map[string]string `protobuf:"bytes,2,rep,name=tag,proto3" json:"tag,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - FieldKey string `protobuf:"bytes,3,opt,name=fieldKey,proto3" json:"fieldKey,omitempty"` -} - -func (x *Influxdb2DataConfig) Reset() { - *x = Influxdb2DataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Influxdb2DataConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Influxdb2DataConfig) ProtoMessage() {} - -func (x *Influxdb2DataConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Influxdb2DataConfig.ProtoReflect.Descriptor instead. -func (*Influxdb2DataConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{17} -} - -func (x *Influxdb2DataConfig) GetMeasurement() string { - if x != nil { - return x.Measurement - } - return "" -} - -func (x *Influxdb2DataConfig) GetTag() map[string]string { - if x != nil { - return x.Tag - } - return nil -} - -func (x *Influxdb2DataConfig) GetFieldKey() string { - if x != nil { - return x.FieldKey - } - return "" -} - -type Influxdb2ClientConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // influx database url - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - // usr org in influx database - Org string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"` - // usr bucket in influx database - Bucket string `protobuf:"bytes,3,opt,name=bucket,proto3" json:"bucket,omitempty"` -} - -func (x *Influxdb2ClientConfig) Reset() { - *x = Influxdb2ClientConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Influxdb2ClientConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Influxdb2ClientConfig) ProtoMessage() {} - -func (x *Influxdb2ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Influxdb2ClientConfig.ProtoReflect.Descriptor instead. -func (*Influxdb2ClientConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{18} -} - -func (x *Influxdb2ClientConfig) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Influxdb2ClientConfig) GetOrg() string { - if x != nil { - return x.Org - } - return "" -} - -func (x *Influxdb2ClientConfig) GetBucket() string { - if x != nil { - return x.Bucket - } - return "" -} - -type DBMethodRedis struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // data config when push data to redis - RedisClientConfig *RedisClientConfig `protobuf:"bytes,1,opt,name=redisClientConfig,proto3" json:"redisClientConfig,omitempty"` -} - -func (x *DBMethodRedis) Reset() { - *x = DBMethodRedis{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DBMethodRedis) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DBMethodRedis) ProtoMessage() {} - -func (x *DBMethodRedis) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DBMethodRedis.ProtoReflect.Descriptor instead. -func (*DBMethodRedis) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{19} -} - -func (x *DBMethodRedis) GetRedisClientConfig() *RedisClientConfig { - if x != nil { - return x.RedisClientConfig - } - return nil -} - -type RedisClientConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // redis address - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - // number of redis db - Db int32 `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` - // number of redis poolsize - Poolsize int32 `protobuf:"varint,3,opt,name=poolsize,proto3" json:"poolsize,omitempty"` - // number of redis minidleconns - MinIdleConns int32 `protobuf:"varint,4,opt,name=minIdleConns,proto3" json:"minIdleConns,omitempty"` -} - -func (x *RedisClientConfig) Reset() { - *x = RedisClientConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedisClientConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedisClientConfig) ProtoMessage() {} - -func (x *RedisClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedisClientConfig.ProtoReflect.Descriptor instead. -func (*RedisClientConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{20} -} - -func (x *RedisClientConfig) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -func (x *RedisClientConfig) GetDb() int32 { - if x != nil { - return x.Db - } - return 0 -} - -func (x *RedisClientConfig) GetPoolsize() int32 { - if x != nil { - return x.Poolsize - } - return 0 -} - -func (x *RedisClientConfig) GetMinIdleConns() int32 { - if x != nil { - return x.MinIdleConns - } - return 0 -} - -type DBMethodTDEngine struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // data config when push data to tdengine - TdEngineClientConfig *TDEngineClientConfig `protobuf:"bytes,1,opt,name=tdEngineClientConfig,proto3" json:"tdEngineClientConfig,omitempty"` -} - -func (x *DBMethodTDEngine) Reset() { - *x = DBMethodTDEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DBMethodTDEngine) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DBMethodTDEngine) ProtoMessage() {} - -func (x *DBMethodTDEngine) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DBMethodTDEngine.ProtoReflect.Descriptor instead. -func (*DBMethodTDEngine) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{21} -} - -func (x *DBMethodTDEngine) GetTdEngineClientConfig() *TDEngineClientConfig { - if x != nil { - return x.TdEngineClientConfig - } - return nil -} - -type TDEngineClientConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tdengine address,like 127.0.0.1:6041 - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` - // tdengine database name - Dbname string `protobuf:"bytes,2,opt,name=dbname,proto3" json:"dbname,omitempty"` -} - -func (x *TDEngineClientConfig) Reset() { - *x = TDEngineClientConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TDEngineClientConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TDEngineClientConfig) ProtoMessage() {} - -func (x *TDEngineClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TDEngineClientConfig.ProtoReflect.Descriptor instead. -func (*TDEngineClientConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{22} -} - -func (x *TDEngineClientConfig) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -func (x *TDEngineClientConfig) GetDbname() string { - if x != nil { - return x.Dbname - } - return "" -} - -// MapperInfo is the information of mapper. -type MapperInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name of the mapper. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // version of the mapper. - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // api version of the mapper. - ApiVersion string `protobuf:"bytes,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - // the protocol of the mapper. - Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` - // the address of the mapper. it is a unix domain socket of grpc. - Address []byte `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` - // the state of the mapper. - State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *MapperInfo) Reset() { - *x = MapperInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapperInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapperInfo) ProtoMessage() {} - -func (x *MapperInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapperInfo.ProtoReflect.Descriptor instead. -func (*MapperInfo) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{23} -} - -func (x *MapperInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MapperInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *MapperInfo) GetApiVersion() string { - if x != nil { - return x.ApiVersion - } - return "" -} - -func (x *MapperInfo) GetProtocol() string { - if x != nil { - return x.Protocol - } - return "" -} - -func (x *MapperInfo) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *MapperInfo) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type ReportDeviceStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"` - ReportedDevice *DeviceStatus `protobuf:"bytes,2,opt,name=reportedDevice,proto3" json:"reportedDevice,omitempty"` -} - -func (x *ReportDeviceStatusRequest) Reset() { - *x = ReportDeviceStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReportDeviceStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReportDeviceStatusRequest) ProtoMessage() {} - -func (x *ReportDeviceStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReportDeviceStatusRequest.ProtoReflect.Descriptor instead. -func (*ReportDeviceStatusRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{24} -} - -func (x *ReportDeviceStatusRequest) GetDeviceName() string { - if x != nil { - return x.DeviceName - } - return "" -} - -func (x *ReportDeviceStatusRequest) GetReportedDevice() *DeviceStatus { - if x != nil { - return x.ReportedDevice - } - return nil -} - -// DeviceStatus is the status of the device. -type DeviceStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the device twins of the device. - Twins []*Twin `protobuf:"bytes,1,rep,name=twins,proto3" json:"twins,omitempty"` -} - -func (x *DeviceStatus) Reset() { - *x = DeviceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeviceStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceStatus) ProtoMessage() {} - -func (x *DeviceStatus) ProtoReflect() protoreflect.Message { - mi := &file_api_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 DeviceStatus.ProtoReflect.Descriptor instead. -func (*DeviceStatus) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{25} -} - -func (x *DeviceStatus) GetTwins() []*Twin { - if x != nil { - return x.Twins - } - return nil -} - -// Twin is the digital model of a device. It contains a series of properties. -type Twin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the name of the property. - PropertyName string `protobuf:"bytes,1,opt,name=propertyName,proto3" json:"propertyName,omitempty"` - // the observedDesired value of the property configured by mapper. - ObservedDesired *TwinProperty `protobuf:"bytes,2,opt,name=observedDesired,proto3" json:"observedDesired,omitempty"` - // the reported value of the property from the real device. - Reported *TwinProperty `protobuf:"bytes,3,opt,name=reported,proto3" json:"reported,omitempty"` -} - -func (x *Twin) Reset() { - *x = Twin{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Twin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Twin) ProtoMessage() {} - -func (x *Twin) ProtoReflect() protoreflect.Message { - mi := &file_api_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 Twin.ProtoReflect.Descriptor instead. -func (*Twin) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{26} -} - -func (x *Twin) GetPropertyName() string { - if x != nil { - return x.PropertyName - } - return "" -} - -func (x *Twin) GetObservedDesired() *TwinProperty { - if x != nil { - return x.ObservedDesired - } - return nil -} - -func (x *Twin) GetReported() *TwinProperty { - if x != nil { - return x.Reported - } - return nil -} - -// TwinProperty is the specification of the property. -type TwinProperty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the value of the property. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // the metadata to describe this property. - Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *TwinProperty) Reset() { - *x = TwinProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TwinProperty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TwinProperty) ProtoMessage() {} - -func (x *TwinProperty) ProtoReflect() protoreflect.Message { - mi := &file_api_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 TwinProperty.ProtoReflect.Descriptor instead. -func (*TwinProperty) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{27} -} - -func (x *TwinProperty) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *TwinProperty) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -type ReportDeviceStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ReportDeviceStatusResponse) Reset() { - *x = ReportDeviceStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReportDeviceStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReportDeviceStatusResponse) ProtoMessage() {} - -func (x *ReportDeviceStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_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 ReportDeviceStatusResponse.ProtoReflect.Descriptor instead. -func (*ReportDeviceStatusResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{28} -} - -type RegisterDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` -} - -func (x *RegisterDeviceRequest) Reset() { - *x = RegisterDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterDeviceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterDeviceRequest) ProtoMessage() {} - -func (x *RegisterDeviceRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterDeviceRequest.ProtoReflect.Descriptor instead. -func (*RegisterDeviceRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{29} -} - -func (x *RegisterDeviceRequest) GetDevice() *Device { - if x != nil { - return x.Device - } - return nil -} - -type RegisterDeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"` -} - -func (x *RegisterDeviceResponse) Reset() { - *x = RegisterDeviceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterDeviceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterDeviceResponse) ProtoMessage() {} - -func (x *RegisterDeviceResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterDeviceResponse.ProtoReflect.Descriptor instead. -func (*RegisterDeviceResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{30} -} - -func (x *RegisterDeviceResponse) GetDeviceName() string { - if x != nil { - return x.DeviceName - } - return "" -} - -type CreateDeviceModelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` -} - -func (x *CreateDeviceModelRequest) Reset() { - *x = CreateDeviceModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateDeviceModelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDeviceModelRequest) ProtoMessage() {} - -func (x *CreateDeviceModelRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDeviceModelRequest.ProtoReflect.Descriptor instead. -func (*CreateDeviceModelRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{31} -} - -func (x *CreateDeviceModelRequest) GetModel() *DeviceModel { - if x != nil { - return x.Model - } - return nil -} - -type CreateDeviceModelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceModelName string `protobuf:"bytes,1,opt,name=deviceModelName,proto3" json:"deviceModelName,omitempty"` -} - -func (x *CreateDeviceModelResponse) Reset() { - *x = CreateDeviceModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateDeviceModelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDeviceModelResponse) ProtoMessage() {} - -func (x *CreateDeviceModelResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDeviceModelResponse.ProtoReflect.Descriptor instead. -func (*CreateDeviceModelResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{32} -} - -func (x *CreateDeviceModelResponse) GetDeviceModelName() string { - if x != nil { - return x.DeviceModelName - } - return "" -} - -type RemoveDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"` -} - -func (x *RemoveDeviceRequest) Reset() { - *x = RemoveDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDeviceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceRequest) ProtoMessage() {} - -func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead. -func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{33} -} - -func (x *RemoveDeviceRequest) GetDeviceName() string { - if x != nil { - return x.DeviceName - } - return "" -} - -type RemoveDeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveDeviceResponse) Reset() { - *x = RemoveDeviceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDeviceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceResponse) ProtoMessage() {} - -func (x *RemoveDeviceResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceResponse.ProtoReflect.Descriptor instead. -func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{34} -} - -type RemoveDeviceModelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ModelName string `protobuf:"bytes,1,opt,name=modelName,proto3" json:"modelName,omitempty"` -} - -func (x *RemoveDeviceModelRequest) Reset() { - *x = RemoveDeviceModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDeviceModelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceModelRequest) ProtoMessage() {} - -func (x *RemoveDeviceModelRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceModelRequest.ProtoReflect.Descriptor instead. -func (*RemoveDeviceModelRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{35} -} - -func (x *RemoveDeviceModelRequest) GetModelName() string { - if x != nil { - return x.ModelName - } - return "" -} - -type RemoveDeviceModelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveDeviceModelResponse) Reset() { - *x = RemoveDeviceModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveDeviceModelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceModelResponse) ProtoMessage() {} - -func (x *RemoveDeviceModelResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceModelResponse.ProtoReflect.Descriptor instead. -func (*RemoveDeviceModelResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{36} -} - -type UpdateDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` -} - -func (x *UpdateDeviceRequest) Reset() { - *x = UpdateDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDeviceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDeviceRequest) ProtoMessage() {} - -func (x *UpdateDeviceRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDeviceRequest.ProtoReflect.Descriptor instead. -func (*UpdateDeviceRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{37} -} - -func (x *UpdateDeviceRequest) GetDevice() *Device { - if x != nil { - return x.Device - } - return nil -} - -type UpdateDeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateDeviceResponse) Reset() { - *x = UpdateDeviceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDeviceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDeviceResponse) ProtoMessage() {} - -func (x *UpdateDeviceResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDeviceResponse.ProtoReflect.Descriptor instead. -func (*UpdateDeviceResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{38} -} - -type UpdateDeviceModelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Model *DeviceModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` -} - -func (x *UpdateDeviceModelRequest) Reset() { - *x = UpdateDeviceModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDeviceModelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDeviceModelRequest) ProtoMessage() {} - -func (x *UpdateDeviceModelRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDeviceModelRequest.ProtoReflect.Descriptor instead. -func (*UpdateDeviceModelRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{39} -} - -func (x *UpdateDeviceModelRequest) GetModel() *DeviceModel { - if x != nil { - return x.Model - } - return nil -} - -type UpdateDeviceModelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateDeviceModelResponse) Reset() { - *x = UpdateDeviceModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateDeviceModelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateDeviceModelResponse) ProtoMessage() {} - -func (x *UpdateDeviceModelResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateDeviceModelResponse.ProtoReflect.Descriptor instead. -func (*UpdateDeviceModelResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{40} -} - -type GetDeviceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeviceName string `protobuf:"bytes,1,opt,name=deviceName,proto3" json:"deviceName,omitempty"` -} - -func (x *GetDeviceRequest) Reset() { - *x = GetDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceRequest) ProtoMessage() {} - -func (x *GetDeviceRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceRequest.ProtoReflect.Descriptor instead. -func (*GetDeviceRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{41} -} - -func (x *GetDeviceRequest) GetDeviceName() string { - if x != nil { - return x.DeviceName - } - return "" -} - -type GetDeviceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` -} - -func (x *GetDeviceResponse) Reset() { - *x = GetDeviceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDeviceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeviceResponse) ProtoMessage() {} - -func (x *GetDeviceResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeviceResponse.ProtoReflect.Descriptor instead. -func (*GetDeviceResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{42} -} - -func (x *GetDeviceResponse) GetDevice() *Device { - if x != nil { - return x.Device - } - return nil -} - -var File_api_proto protoreflect.FileDescriptor - -var file_api_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x60, 0x0a, 0x15, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x22, 0x7d, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x2f, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x4f, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, - 0x63, 0x22, 0x7d, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x22, 0xc1, 0x01, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, - 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x75, 0x6e, 0x69, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x74, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x27, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x37, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x0e, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2f, 0x0a, 0x07, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x07, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, - 0x12, 0x32, 0x0a, 0x08, 0x76, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x76, 0x69, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x79, - 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x6e, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x6d, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, - 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, - 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x1a, 0x4d, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x95, 0x01, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2b, - 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x6d, - 0x71, 0x74, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x51, - 0x54, 0x54, 0x52, 0x04, 0x6d, 0x71, 0x74, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x64, 0x62, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x08, 0x64, - 0x62, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x7c, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x54, 0x54, 0x50, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x6e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x4d, 0x51, 0x54, 0x54, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x6f, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x71, 0x6f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, - 0x32, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x12, 0x2c, 0x0a, 0x05, - 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, - 0x64, 0x69, 0x73, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x64, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, - 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x64, 0x65, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x11, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, - 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x12, 0x54, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x75, - 0x78, 0x64, 0x62, 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, - 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, - 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, - 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x78, - 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc4, 0x01, - 0x0a, 0x13, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x61, 0x73, - 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, - 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, 0x32, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x54, 0x61, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x74, 0x61, 0x67, - 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x1a, 0x36, 0x0a, 0x08, - 0x54, 0x61, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x53, 0x0a, 0x15, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x64, 0x62, - 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, - 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, - 0x67, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x42, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x48, 0x0a, 0x11, 0x72, 0x65, - 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x11, 0x72, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x77, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x64, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, - 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x22, 0x65, 0x0a, - 0x10, 0x44, 0x42, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x12, 0x51, 0x0a, 0x14, 0x74, 0x64, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, - 0x74, 0x64, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x42, 0x0a, 0x14, 0x54, 0x44, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, - 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, - 0x12, 0x16, 0x0a, 0x06, 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0a, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x22, 0x7a, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3d, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x33, - 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x52, 0x05, 0x74, 0x77, - 0x69, 0x6e, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x04, 0x54, 0x77, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x3f, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x65, 0x73, 0x69, - 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x31, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, - 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x77, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x27, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x38, 0x0a, 0x16, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x19, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x27, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x46, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x05, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3c, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, - 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x32, 0xcc, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x53, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xe8, 0x04, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, - 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x5c, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, - 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_proto_rawDescOnce sync.Once - file_api_proto_rawDescData = file_api_proto_rawDesc -) - -func file_api_proto_rawDescGZIP() []byte { - file_api_proto_rawDescOnce.Do(func() { - file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData) - }) - return file_api_proto_rawDescData -} - -var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 46) -var file_api_proto_goTypes = []interface{}{ - (*MapperRegisterRequest)(nil), // 0: v1beta1.MapperRegisterRequest - (*MapperRegisterResponse)(nil), // 1: v1beta1.MapperRegisterResponse - (*DeviceModel)(nil), // 2: v1beta1.DeviceModel - (*DeviceModelSpec)(nil), // 3: v1beta1.DeviceModelSpec - (*ModelProperty)(nil), // 4: v1beta1.ModelProperty - (*DeviceCommand)(nil), // 5: v1beta1.DeviceCommand - (*Device)(nil), // 6: v1beta1.Device - (*DeviceSpec)(nil), // 7: v1beta1.DeviceSpec - (*DeviceProperty)(nil), // 8: v1beta1.DeviceProperty - (*ProtocolConfig)(nil), // 9: v1beta1.ProtocolConfig - (*VisitorConfig)(nil), // 10: v1beta1.VisitorConfig - (*CustomizedValue)(nil), // 11: v1beta1.CustomizedValue - (*PushMethod)(nil), // 12: v1beta1.PushMethod - (*PushMethodHTTP)(nil), // 13: v1beta1.PushMethodHTTP - (*PushMethodMQTT)(nil), // 14: v1beta1.PushMethodMQTT - (*DBMethod)(nil), // 15: v1beta1.DBMethod - (*DBMethodInfluxdb2)(nil), // 16: v1beta1.DBMethodInfluxdb2 - (*Influxdb2DataConfig)(nil), // 17: v1beta1.Influxdb2DataConfig - (*Influxdb2ClientConfig)(nil), // 18: v1beta1.Influxdb2ClientConfig - (*DBMethodRedis)(nil), // 19: v1beta1.DBMethodRedis - (*RedisClientConfig)(nil), // 20: v1beta1.RedisClientConfig - (*DBMethodTDEngine)(nil), // 21: v1beta1.DBMethodTDEngine - (*TDEngineClientConfig)(nil), // 22: v1beta1.TDEngineClientConfig - (*MapperInfo)(nil), // 23: v1beta1.MapperInfo - (*ReportDeviceStatusRequest)(nil), // 24: v1beta1.ReportDeviceStatusRequest - (*DeviceStatus)(nil), // 25: v1beta1.DeviceStatus - (*Twin)(nil), // 26: v1beta1.Twin - (*TwinProperty)(nil), // 27: v1beta1.TwinProperty - (*ReportDeviceStatusResponse)(nil), // 28: v1beta1.ReportDeviceStatusResponse - (*RegisterDeviceRequest)(nil), // 29: v1beta1.RegisterDeviceRequest - (*RegisterDeviceResponse)(nil), // 30: v1beta1.RegisterDeviceResponse - (*CreateDeviceModelRequest)(nil), // 31: v1beta1.CreateDeviceModelRequest - (*CreateDeviceModelResponse)(nil), // 32: v1beta1.CreateDeviceModelResponse - (*RemoveDeviceRequest)(nil), // 33: v1beta1.RemoveDeviceRequest - (*RemoveDeviceResponse)(nil), // 34: v1beta1.RemoveDeviceResponse - (*RemoveDeviceModelRequest)(nil), // 35: v1beta1.RemoveDeviceModelRequest - (*RemoveDeviceModelResponse)(nil), // 36: v1beta1.RemoveDeviceModelResponse - (*UpdateDeviceRequest)(nil), // 37: v1beta1.UpdateDeviceRequest - (*UpdateDeviceResponse)(nil), // 38: v1beta1.UpdateDeviceResponse - (*UpdateDeviceModelRequest)(nil), // 39: v1beta1.UpdateDeviceModelRequest - (*UpdateDeviceModelResponse)(nil), // 40: v1beta1.UpdateDeviceModelResponse - (*GetDeviceRequest)(nil), // 41: v1beta1.GetDeviceRequest - (*GetDeviceResponse)(nil), // 42: v1beta1.GetDeviceResponse - nil, // 43: v1beta1.CustomizedValue.DataEntry - nil, // 44: v1beta1.Influxdb2DataConfig.TagEntry - nil, // 45: v1beta1.TwinProperty.MetadataEntry - (*anypb.Any)(nil), // 46: google.protobuf.Any -} -var file_api_proto_depIdxs = []int32{ - 23, // 0: v1beta1.MapperRegisterRequest.mapper:type_name -> v1beta1.MapperInfo - 2, // 1: v1beta1.MapperRegisterResponse.modelList:type_name -> v1beta1.DeviceModel - 6, // 2: v1beta1.MapperRegisterResponse.deviceList:type_name -> v1beta1.Device - 3, // 3: v1beta1.DeviceModel.spec:type_name -> v1beta1.DeviceModelSpec - 4, // 4: v1beta1.DeviceModelSpec.properties:type_name -> v1beta1.ModelProperty - 5, // 5: v1beta1.DeviceModelSpec.commands:type_name -> v1beta1.DeviceCommand - 7, // 6: v1beta1.Device.spec:type_name -> v1beta1.DeviceSpec - 25, // 7: v1beta1.Device.status:type_name -> v1beta1.DeviceStatus - 9, // 8: v1beta1.DeviceSpec.protocol:type_name -> v1beta1.ProtocolConfig - 8, // 9: v1beta1.DeviceSpec.properties:type_name -> v1beta1.DeviceProperty - 27, // 10: v1beta1.DeviceProperty.desired:type_name -> v1beta1.TwinProperty - 10, // 11: v1beta1.DeviceProperty.visitors:type_name -> v1beta1.VisitorConfig - 12, // 12: v1beta1.DeviceProperty.pushMethod:type_name -> v1beta1.PushMethod - 11, // 13: v1beta1.ProtocolConfig.configData:type_name -> v1beta1.CustomizedValue - 11, // 14: v1beta1.VisitorConfig.configData:type_name -> v1beta1.CustomizedValue - 43, // 15: v1beta1.CustomizedValue.data:type_name -> v1beta1.CustomizedValue.DataEntry - 13, // 16: v1beta1.PushMethod.http:type_name -> v1beta1.PushMethodHTTP - 14, // 17: v1beta1.PushMethod.mqtt:type_name -> v1beta1.PushMethodMQTT - 15, // 18: v1beta1.PushMethod.dbMethod:type_name -> v1beta1.DBMethod - 16, // 19: v1beta1.DBMethod.influxdb2:type_name -> v1beta1.DBMethodInfluxdb2 - 19, // 20: v1beta1.DBMethod.redis:type_name -> v1beta1.DBMethodRedis - 21, // 21: v1beta1.DBMethod.tdengine:type_name -> v1beta1.DBMethodTDEngine - 18, // 22: v1beta1.DBMethodInfluxdb2.influxdb2ClientConfig:type_name -> v1beta1.Influxdb2ClientConfig - 17, // 23: v1beta1.DBMethodInfluxdb2.influxdb2DataConfig:type_name -> v1beta1.Influxdb2DataConfig - 44, // 24: v1beta1.Influxdb2DataConfig.tag:type_name -> v1beta1.Influxdb2DataConfig.TagEntry - 20, // 25: v1beta1.DBMethodRedis.redisClientConfig:type_name -> v1beta1.RedisClientConfig - 22, // 26: v1beta1.DBMethodTDEngine.tdEngineClientConfig:type_name -> v1beta1.TDEngineClientConfig - 25, // 27: v1beta1.ReportDeviceStatusRequest.reportedDevice:type_name -> v1beta1.DeviceStatus - 26, // 28: v1beta1.DeviceStatus.twins:type_name -> v1beta1.Twin - 27, // 29: v1beta1.Twin.observedDesired:type_name -> v1beta1.TwinProperty - 27, // 30: v1beta1.Twin.reported:type_name -> v1beta1.TwinProperty - 45, // 31: v1beta1.TwinProperty.metadata:type_name -> v1beta1.TwinProperty.MetadataEntry - 6, // 32: v1beta1.RegisterDeviceRequest.device:type_name -> v1beta1.Device - 2, // 33: v1beta1.CreateDeviceModelRequest.model:type_name -> v1beta1.DeviceModel - 6, // 34: v1beta1.UpdateDeviceRequest.device:type_name -> v1beta1.Device - 2, // 35: v1beta1.UpdateDeviceModelRequest.model:type_name -> v1beta1.DeviceModel - 6, // 36: v1beta1.GetDeviceResponse.device:type_name -> v1beta1.Device - 46, // 37: v1beta1.CustomizedValue.DataEntry.value:type_name -> google.protobuf.Any - 0, // 38: v1beta1.DeviceManagerService.MapperRegister:input_type -> v1beta1.MapperRegisterRequest - 24, // 39: v1beta1.DeviceManagerService.ReportDeviceStatus:input_type -> v1beta1.ReportDeviceStatusRequest - 29, // 40: v1beta1.DeviceMapperService.RegisterDevice:input_type -> v1beta1.RegisterDeviceRequest - 33, // 41: v1beta1.DeviceMapperService.RemoveDevice:input_type -> v1beta1.RemoveDeviceRequest - 37, // 42: v1beta1.DeviceMapperService.UpdateDevice:input_type -> v1beta1.UpdateDeviceRequest - 31, // 43: v1beta1.DeviceMapperService.CreateDeviceModel:input_type -> v1beta1.CreateDeviceModelRequest - 35, // 44: v1beta1.DeviceMapperService.RemoveDeviceModel:input_type -> v1beta1.RemoveDeviceModelRequest - 39, // 45: v1beta1.DeviceMapperService.UpdateDeviceModel:input_type -> v1beta1.UpdateDeviceModelRequest - 41, // 46: v1beta1.DeviceMapperService.GetDevice:input_type -> v1beta1.GetDeviceRequest - 1, // 47: v1beta1.DeviceManagerService.MapperRegister:output_type -> v1beta1.MapperRegisterResponse - 28, // 48: v1beta1.DeviceManagerService.ReportDeviceStatus:output_type -> v1beta1.ReportDeviceStatusResponse - 30, // 49: v1beta1.DeviceMapperService.RegisterDevice:output_type -> v1beta1.RegisterDeviceResponse - 34, // 50: v1beta1.DeviceMapperService.RemoveDevice:output_type -> v1beta1.RemoveDeviceResponse - 38, // 51: v1beta1.DeviceMapperService.UpdateDevice:output_type -> v1beta1.UpdateDeviceResponse - 32, // 52: v1beta1.DeviceMapperService.CreateDeviceModel:output_type -> v1beta1.CreateDeviceModelResponse - 36, // 53: v1beta1.DeviceMapperService.RemoveDeviceModel:output_type -> v1beta1.RemoveDeviceModelResponse - 40, // 54: v1beta1.DeviceMapperService.UpdateDeviceModel:output_type -> v1beta1.UpdateDeviceModelResponse - 42, // 55: v1beta1.DeviceMapperService.GetDevice:output_type -> v1beta1.GetDeviceResponse - 47, // [47:56] is the sub-list for method output_type - 38, // [38:47] is the sub-list for method input_type - 38, // [38:38] is the sub-list for extension type_name - 38, // [38:38] is the sub-list for extension extendee - 0, // [0:38] is the sub-list for field type_name -} - -func init() { file_api_proto_init() } -func file_api_proto_init() { - if File_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapperRegisterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapperRegisterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModelProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Device); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VisitorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomizedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMethodHTTP); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMethodMQTT); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBMethodInfluxdb2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Influxdb2DataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Influxdb2ClientConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBMethodRedis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedisClientConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBMethodTDEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TDEngineClientConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapperInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportDeviceStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Twin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TwinProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportDeviceStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterDeviceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateDeviceModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateDeviceModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDeviceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDeviceModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveDeviceModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDeviceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDeviceModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDeviceModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDeviceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 46, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_api_proto_goTypes, - DependencyIndexes: file_api_proto_depIdxs, - MessageInfos: file_api_proto_msgTypes, - }.Build() - File_api_proto = out.File - file_api_proto_rawDesc = nil - file_api_proto_goTypes = nil - file_api_proto_depIdxs = nil -} - -func NewMapperClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient { - return &deviceMapperServiceClient{cc} -} - -func NewDeviceManageClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient { - return &deviceManagerServiceClient{cc} -} diff --git a/pkg/dmi-api/api.proto b/pkg/dmi-api/api.proto deleted file mode 100644 index ae112e7..0000000 --- a/pkg/dmi-api/api.proto +++ /dev/null @@ -1,395 +0,0 @@ -/* -Copyright 2023 The KubeEdge Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// To regenerate api.pb.go run hack/generate-dmi.sh -syntax = "proto3"; - -//option go_package = "path;name"; -option go_package = "./;v1beta1"; -package v1beta1; - -import "google/protobuf/any.proto"; - -// DeviceManagerService defines the public APIS for remote device management. -// The server is implemented by the module of device manager in edgecore -// and the client is implemented by the device mapper for upstreaming. -// The mapper should register itself to the device manager when it is online -// to get the list of devices. And then the mapper can report the device status to the device manager. -service DeviceManagerService { - // MapperRegister registers the information of the mapper to device manager - // when the mapper is online. Device manager returns the list of devices and device models which - // this mapper should manage. - rpc MapperRegister(MapperRegisterRequest) returns (MapperRegisterResponse) {} - // ReportDeviceStatus reports the status of devices to device manager. - // When the mapper collects some properties of a device, it can make them a map of device twins - // and report it to the device manager through the interface of ReportDeviceStatus. - rpc ReportDeviceStatus(ReportDeviceStatusRequest) returns (ReportDeviceStatusResponse) {} -} - -// DeviceMapperService defines the public APIS for remote device management. -// The server is implemented by the device mapper -// and the client is implemented by the module of device manager in edgecore for downstreaming. -// The device manager can manage the device life cycle through these interfaces provided by DeviceMapperService. -// When device manager gets a message of device management from cloudcore, it should call the corresponding grpc interface -// to make the mapper maintain the list of device information. -service DeviceMapperService { - // RegisterDevice registers a device to the device mapper. - // Device manager registers a device instance with the information of device - // to the mapper through the interface of RegisterDevice. - // When the mapper gets the request of register with device information, - // it should add the device to the device list and connect to the real physical device via the specific protocol. - rpc RegisterDevice(RegisterDeviceRequest) returns (RegisterDeviceResponse) {} - // RemoveDevice unregisters a device to the device mapper. - // Device manager unregisters a device instance with the name of device - // to the mapper through the interface of RemoveDevice. - // When the mapper gets the request of unregister with device name, - // it should remove the device from the device list and disconnect to the real physical device. - rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {} - // UpdateDevice updates a device to the device mapper - // Device manager updates the information of a device used by the mapper - // through the interface of UpdateDevice. - // The information of a device includes the meta data and the status data of a device. - // When the mapper gets the request of updating with the information of a device, - // it should update the device of the device list and connect to the real physical device via the updated information. - rpc UpdateDevice(UpdateDeviceRequest) returns (UpdateDeviceResponse) {} - // CreateDeviceModel creates a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of CreateDeviceModel. - // When the mapper gets the request of creating with the information of device model, - // it should create a new device model to the list of device models. - rpc CreateDeviceModel(CreateDeviceModelRequest) returns (CreateDeviceModelResponse) {} - // RemoveDeviceModel remove a device model to the device mapper. - // Device manager sends the name of device model to the mapper - // through the interface of RemoveDeviceModel. - // When the mapper gets the request of removing with the name of device model, - // it should remove the device model to the list of device models. - rpc RemoveDeviceModel(RemoveDeviceModelRequest) returns (RemoveDeviceModelResponse) {} - // UpdateDeviceModel update a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of UpdateDeviceModel. - // When the mapper gets the request of updating with the information of device model, - // it should update the device model to the list of device models. - rpc UpdateDeviceModel(UpdateDeviceModelRequest) returns (UpdateDeviceModelResponse) {} - // GetDevice get the information of a device from the device mapper. - // Device sends the request of querying device information with the device name to the mapper - // through the interface of GetDevice. - // When the mapper gets the request of querying with the device name, - // it should return the device information. - rpc GetDevice(GetDeviceRequest) returns (GetDeviceResponse) {} -} - -message MapperRegisterRequest { - // The flag to show how device manager returns. - // True means device manager should return the device list in the response. - // False means device manager should just return nothing. - bool withData = 1; - // Mapper information to be registered to the device manager. - MapperInfo mapper = 2; -} - -message MapperRegisterResponse { - // List of device models which the mapper maintains. - repeated DeviceModel modelList = 1; - // List of devices which the mapper maintains. - repeated Device deviceList = 2; -} - -// DeviceModel specifies the information of a device model. -message DeviceModel { - // Name of a device model. - string name = 1; - // Specification of a device model. - DeviceModelSpec spec = 2; -} - -// DeviceModelSpec is the specification of a device model. -message DeviceModelSpec { - // The properties provided by the device of this device model. - repeated ModelProperty properties = 1; - // The commands executed by the device of this device model. - repeated DeviceCommand commands = 2; -} - -// ModelProperty is the property of a device. -message ModelProperty { - // The name of this property. - string name = 1; - // The description of this property. - string description = 2; - // The specific type of this property. - string type = 3; - // The access mode of this property, ReadOnly or ReadWrite. - string accessMode = 4; - // The minimum value of this property. - string minimum = 5; - // The maximum value of this property. - string maximum = 6; - // The unit of this property. - string unit = 7; -} - -// DeviceCommond is the description of a command which the device supports. -message DeviceCommand { - // Name of the command. - string name = 1; - // Url of the command to access. - string url = 2; - // Method of the command. - string method = 3; - // Status code list which the command can return. - repeated string status_code = 4; - // Parameter list which the command carries. - repeated string parameters = 5; - // Response examples of the command. - bytes response = 6; -} - -// Device is the description of a device instance. -message Device { - // Name of the device. - string name = 1; - // Specification of the device. - DeviceSpec spec = 2; - // Status of the device. - DeviceStatus status = 3; -} - -// DeviceSpec is the specification of the device. -message DeviceSpec { - // The device model which the device references. - string deviceModelReference = 1; - // The specific config of the protocol to access to the device. - ProtocolConfig protocol = 2; - // List of properties which describe the device properties. - repeated DeviceProperty properties = 3; -} - -// DeviceProperty describes the specifics all the properties of the device. -message DeviceProperty { - // The device property name to be accessed. It must be unique. - string name = 1; - // the desired value of the property configured by device manager. - TwinProperty desired = 2; - // Visitors are intended to be consumed by device mappers which connect to devices - // and collect data / perform actions on the device. - VisitorConfig visitors = 3; - // Define how frequent mapper will report the value. - int64 reportCycle = 4; - // Define how frequent mapper will collect from device. - int64 collectCycle = 5; - // whether be reported to the cloud - bool reportToCloud = 6; - // PushMethod represents the protocol used to push data, - PushMethod pushMethod = 7; -} - -// ProtocolConfig is the specific config of the protocol to access to the device. -message ProtocolConfig { - // the name of the customized protocol. - string protocolName = 1; - // the config data of the customized protocol. - CustomizedValue configData = 2; -} - -// the visitor to collect the properties of the device of customized protocol. -message VisitorConfig { - // the name of the customized protocol. - string protocolName = 1; - // the config data of the customized protocol. - CustomizedValue configData = 2; -} - -// CustomizedValue is the customized value for developers. -message CustomizedValue { - // data is the customized value and it can be any form. - map data = 1; -} - -message PushMethod { - PushMethodHTTP http = 1; - PushMethodMQTT mqtt = 2; - DBMethod dbMethod = 3; -} - -message PushMethodHTTP { - string hostname = 1; - int64 port = 2; - string requestpath = 3; - int64 timeout = 4; -} - -message PushMethodMQTT { - // broker address, like mqtt://127.0.0.1:1883 - string address = 1; - // publish topic for mqtt - string topic = 2; - // qos of mqtt publish param - int32 qos = 3; - // Is the message retained - bool retained = 4; -} - -message DBMethod{ - // the config of database . - DBMethodInfluxdb2 influxdb2 = 1; - DBMethodRedis redis = 2; - DBMethodTDEngine tdengine = 3; -} - -message DBMethodInfluxdb2{ - // the config of influx database. - Influxdb2ClientConfig influxdb2ClientConfig = 1; - Influxdb2DataConfig influxdb2DataConfig = 2; -} - -message Influxdb2DataConfig{ - // data config when push data to influx - string measurement = 1; - map tag = 2; - string fieldKey = 3; -} - -message Influxdb2ClientConfig{ - // influx database url - string url = 1; - // usr org in influx database - string org = 2; - // usr bucket in influx database - string bucket = 3; -} - -message DBMethodRedis{ - // data config when push data to redis - RedisClientConfig redisClientConfig = 1; -} - -message RedisClientConfig{ - // redis address - string addr = 1; - // number of redis db - int32 db = 2; - // number of redis poolsize - int32 poolsize = 3; - // number of redis minidleconns - int32 minIdleConns =4; -} - -message DBMethodTDEngine{ - // data config when push data to tdengine - TDEngineClientConfig tdEngineClientConfig = 1; -} - -message TDEngineClientConfig{ - // tdengine address,like 127.0.0.1:6041 - string addr = 1; - // tdengine database name - string dbname = 2; -} - -// MapperInfo is the information of mapper. -message MapperInfo { - // name of the mapper. - string name = 1; - // version of the mapper. - string version = 2; - // api version of the mapper. - string api_version = 3; - // the protocol of the mapper. - string protocol = 4; - // the address of the mapper. it is a unix domain socket of grpc. - bytes address = 5; - // the state of the mapper. - string state = 6; -} - -message ReportDeviceStatusRequest { - string deviceName = 1; - DeviceStatus reportedDevice = 2; -} - -// DeviceStatus is the status of the device. -message DeviceStatus { - // the device twins of the device. - repeated Twin twins = 1; -} - -// Twin is the digital model of a device. It contains a series of properties. -message Twin { - // the name of the property. - string propertyName = 1; - // the observedDesired value of the property configured by mapper. - TwinProperty observedDesired = 2; - // the reported value of the property from the real device. - TwinProperty reported = 3; -} - -// TwinProperty is the specification of the property. -message TwinProperty { - // the value of the property. - string value = 1; - // the metadata to describe this property. - map metadata = 2; -} - -message ReportDeviceStatusResponse {} - -message RegisterDeviceRequest { - Device device = 1; -} - -message RegisterDeviceResponse { - string deviceName = 1; -} - -message CreateDeviceModelRequest { - DeviceModel model = 1; -} - -message CreateDeviceModelResponse { - string deviceModelName = 1; -} - -message RemoveDeviceRequest { - string deviceName = 1; -} - -message RemoveDeviceResponse {} - -message RemoveDeviceModelRequest { - string modelName = 1; -} - -message RemoveDeviceModelResponse {} - -message UpdateDeviceRequest { - Device device = 1; -} - -message UpdateDeviceResponse {} - -message UpdateDeviceModelRequest { - DeviceModel model = 1; -} - -message UpdateDeviceModelResponse {} - -message GetDeviceRequest { - string deviceName = 1; -} - -message GetDeviceResponse { - Device device = 1; -} diff --git a/pkg/dmi-api/api_grpc.pb.go b/pkg/dmi-api/api_grpc.pb.go deleted file mode 100644 index 8d37c66..0000000 --- a/pkg/dmi-api/api_grpc.pb.go +++ /dev/null @@ -1,559 +0,0 @@ -// -//Copyright 2023 The KubeEdge Authors. -// -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. - -// To regenerate api.pb.go run hack/generate-dmi.sh - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.20.3 -// source: api.proto - -package v1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - DeviceManagerService_MapperRegister_FullMethodName = "/v1beta1.DeviceManagerService/MapperRegister" - DeviceManagerService_ReportDeviceStatus_FullMethodName = "/v1beta1.DeviceManagerService/ReportDeviceStatus" -) - -// DeviceManagerServiceClient is the client API for DeviceManagerService 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 DeviceManagerServiceClient interface { - // MapperRegister registers the information of the mapper to device manager - // when the mapper is online. Device manager returns the list of devices and device models which - // this mapper should manage. - MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error) - // ReportDeviceStatus reports the status of devices to device manager. - // When the mapper collects some properties of a device, it can make them a map of device twins - // and report it to the device manager through the interface of ReportDeviceStatus. - ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error) -} - -type deviceManagerServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDeviceManagerServiceClient(cc grpc.ClientConnInterface) DeviceManagerServiceClient { - return &deviceManagerServiceClient{cc} -} - -func (c *deviceManagerServiceClient) MapperRegister(ctx context.Context, in *MapperRegisterRequest, opts ...grpc.CallOption) (*MapperRegisterResponse, error) { - out := new(MapperRegisterResponse) - err := c.cc.Invoke(ctx, DeviceManagerService_MapperRegister_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceManagerServiceClient) ReportDeviceStatus(ctx context.Context, in *ReportDeviceStatusRequest, opts ...grpc.CallOption) (*ReportDeviceStatusResponse, error) { - out := new(ReportDeviceStatusResponse) - err := c.cc.Invoke(ctx, DeviceManagerService_ReportDeviceStatus_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DeviceManagerServiceServer is the server API for DeviceManagerService service. -// All implementations must embed UnimplementedDeviceManagerServiceServer -// for forward compatibility -type DeviceManagerServiceServer interface { - // MapperRegister registers the information of the mapper to device manager - // when the mapper is online. Device manager returns the list of devices and device models which - // this mapper should manage. - MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error) - // ReportDeviceStatus reports the status of devices to device manager. - // When the mapper collects some properties of a device, it can make them a map of device twins - // and report it to the device manager through the interface of ReportDeviceStatus. - ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error) - mustEmbedUnimplementedDeviceManagerServiceServer() -} - -// UnimplementedDeviceManagerServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDeviceManagerServiceServer struct { -} - -func (UnimplementedDeviceManagerServiceServer) MapperRegister(context.Context, *MapperRegisterRequest) (*MapperRegisterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MapperRegister not implemented") -} -func (UnimplementedDeviceManagerServiceServer) ReportDeviceStatus(context.Context, *ReportDeviceStatusRequest) (*ReportDeviceStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportDeviceStatus not implemented") -} -func (UnimplementedDeviceManagerServiceServer) mustEmbedUnimplementedDeviceManagerServiceServer() {} - -// UnsafeDeviceManagerServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DeviceManagerServiceServer will -// result in compilation errors. -type UnsafeDeviceManagerServiceServer interface { - mustEmbedUnimplementedDeviceManagerServiceServer() -} - -func RegisterDeviceManagerServiceServer(s grpc.ServiceRegistrar, srv DeviceManagerServiceServer) { - s.RegisterService(&DeviceManagerService_ServiceDesc, srv) -} - -func _DeviceManagerService_MapperRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MapperRegisterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceManagerServiceServer).MapperRegister(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceManagerService_MapperRegister_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceManagerServiceServer).MapperRegister(ctx, req.(*MapperRegisterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceManagerService_ReportDeviceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportDeviceStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceManagerService_ReportDeviceStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceManagerServiceServer).ReportDeviceStatus(ctx, req.(*ReportDeviceStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// DeviceManagerService_ServiceDesc is the grpc.ServiceDesc for DeviceManagerService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var DeviceManagerService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "v1beta1.DeviceManagerService", - HandlerType: (*DeviceManagerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "MapperRegister", - Handler: _DeviceManagerService_MapperRegister_Handler, - }, - { - MethodName: "ReportDeviceStatus", - Handler: _DeviceManagerService_ReportDeviceStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", -} - -const ( - DeviceMapperService_RegisterDevice_FullMethodName = "/v1beta1.DeviceMapperService/RegisterDevice" - DeviceMapperService_RemoveDevice_FullMethodName = "/v1beta1.DeviceMapperService/RemoveDevice" - DeviceMapperService_UpdateDevice_FullMethodName = "/v1beta1.DeviceMapperService/UpdateDevice" - DeviceMapperService_CreateDeviceModel_FullMethodName = "/v1beta1.DeviceMapperService/CreateDeviceModel" - DeviceMapperService_RemoveDeviceModel_FullMethodName = "/v1beta1.DeviceMapperService/RemoveDeviceModel" - DeviceMapperService_UpdateDeviceModel_FullMethodName = "/v1beta1.DeviceMapperService/UpdateDeviceModel" - DeviceMapperService_GetDevice_FullMethodName = "/v1beta1.DeviceMapperService/GetDevice" -) - -// DeviceMapperServiceClient is the client API for DeviceMapperService 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 DeviceMapperServiceClient interface { - // RegisterDevice registers a device to the device mapper. - // Device manager registers a device instance with the information of device - // to the mapper through the interface of RegisterDevice. - // When the mapper gets the request of register with device information, - // it should add the device to the device list and connect to the real physical device via the specific protocol. - RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error) - // RemoveDevice unregisters a device to the device mapper. - // Device manager unregisters a device instance with the name of device - // to the mapper through the interface of RemoveDevice. - // When the mapper gets the request of unregister with device name, - // it should remove the device from the device list and disconnect to the real physical device. - RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) - // UpdateDevice updates a device to the device mapper - // Device manager updates the information of a device used by the mapper - // through the interface of UpdateDevice. - // The information of a device includes the meta data and the status data of a device. - // When the mapper gets the request of updating with the information of a device, - // it should update the device of the device list and connect to the real physical device via the updated information. - UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error) - // CreateDeviceModel creates a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of CreateDeviceModel. - // When the mapper gets the request of creating with the information of device model, - // it should create a new device model to the list of device models. - CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error) - // RemoveDeviceModel remove a device model to the device mapper. - // Device manager sends the name of device model to the mapper - // through the interface of RemoveDeviceModel. - // When the mapper gets the request of removing with the name of device model, - // it should remove the device model to the list of device models. - RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error) - // UpdateDeviceModel update a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of UpdateDeviceModel. - // When the mapper gets the request of updating with the information of device model, - // it should update the device model to the list of device models. - UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error) - // GetDevice get the information of a device from the device mapper. - // Device sends the request of querying device information with the device name to the mapper - // through the interface of GetDevice. - // When the mapper gets the request of querying with the device name, - // it should return the device information. - GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) -} - -type deviceMapperServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDeviceMapperServiceClient(cc grpc.ClientConnInterface) DeviceMapperServiceClient { - return &deviceMapperServiceClient{cc} -} - -func (c *deviceMapperServiceClient) RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceResponse, error) { - out := new(RegisterDeviceResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_RegisterDevice_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) { - out := new(RemoveDeviceResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_RemoveDevice_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) UpdateDevice(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*UpdateDeviceResponse, error) { - out := new(UpdateDeviceResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_UpdateDevice_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) CreateDeviceModel(ctx context.Context, in *CreateDeviceModelRequest, opts ...grpc.CallOption) (*CreateDeviceModelResponse, error) { - out := new(CreateDeviceModelResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_CreateDeviceModel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) RemoveDeviceModel(ctx context.Context, in *RemoveDeviceModelRequest, opts ...grpc.CallOption) (*RemoveDeviceModelResponse, error) { - out := new(RemoveDeviceModelResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_RemoveDeviceModel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) UpdateDeviceModel(ctx context.Context, in *UpdateDeviceModelRequest, opts ...grpc.CallOption) (*UpdateDeviceModelResponse, error) { - out := new(UpdateDeviceModelResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_UpdateDeviceModel_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceMapperServiceClient) GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) { - out := new(GetDeviceResponse) - err := c.cc.Invoke(ctx, DeviceMapperService_GetDevice_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DeviceMapperServiceServer is the server API for DeviceMapperService service. -// All implementations must embed UnimplementedDeviceMapperServiceServer -// for forward compatibility -type DeviceMapperServiceServer interface { - // RegisterDevice registers a device to the device mapper. - // Device manager registers a device instance with the information of device - // to the mapper through the interface of RegisterDevice. - // When the mapper gets the request of register with device information, - // it should add the device to the device list and connect to the real physical device via the specific protocol. - RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error) - // RemoveDevice unregisters a device to the device mapper. - // Device manager unregisters a device instance with the name of device - // to the mapper through the interface of RemoveDevice. - // When the mapper gets the request of unregister with device name, - // it should remove the device from the device list and disconnect to the real physical device. - RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) - // UpdateDevice updates a device to the device mapper - // Device manager updates the information of a device used by the mapper - // through the interface of UpdateDevice. - // The information of a device includes the meta data and the status data of a device. - // When the mapper gets the request of updating with the information of a device, - // it should update the device of the device list and connect to the real physical device via the updated information. - UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error) - // CreateDeviceModel creates a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of CreateDeviceModel. - // When the mapper gets the request of creating with the information of device model, - // it should create a new device model to the list of device models. - CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error) - // RemoveDeviceModel remove a device model to the device mapper. - // Device manager sends the name of device model to the mapper - // through the interface of RemoveDeviceModel. - // When the mapper gets the request of removing with the name of device model, - // it should remove the device model to the list of device models. - RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error) - // UpdateDeviceModel update a device model to the device mapper. - // Device manager sends the information of device model to the mapper - // through the interface of UpdateDeviceModel. - // When the mapper gets the request of updating with the information of device model, - // it should update the device model to the list of device models. - UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error) - // GetDevice get the information of a device from the device mapper. - // Device sends the request of querying device information with the device name to the mapper - // through the interface of GetDevice. - // When the mapper gets the request of querying with the device name, - // it should return the device information. - GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error) - mustEmbedUnimplementedDeviceMapperServiceServer() -} - -// UnimplementedDeviceMapperServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDeviceMapperServiceServer struct { -} - -func (UnimplementedDeviceMapperServiceServer) RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterDevice not implemented") -} -func (UnimplementedDeviceMapperServiceServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented") -} -func (UnimplementedDeviceMapperServiceServer) UpdateDevice(context.Context, *UpdateDeviceRequest) (*UpdateDeviceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDevice not implemented") -} -func (UnimplementedDeviceMapperServiceServer) CreateDeviceModel(context.Context, *CreateDeviceModelRequest) (*CreateDeviceModelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceModel not implemented") -} -func (UnimplementedDeviceMapperServiceServer) RemoveDeviceModel(context.Context, *RemoveDeviceModelRequest) (*RemoveDeviceModelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveDeviceModel not implemented") -} -func (UnimplementedDeviceMapperServiceServer) UpdateDeviceModel(context.Context, *UpdateDeviceModelRequest) (*UpdateDeviceModelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDeviceModel not implemented") -} -func (UnimplementedDeviceMapperServiceServer) GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDevice not implemented") -} -func (UnimplementedDeviceMapperServiceServer) mustEmbedUnimplementedDeviceMapperServiceServer() {} - -// UnsafeDeviceMapperServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DeviceMapperServiceServer will -// result in compilation errors. -type UnsafeDeviceMapperServiceServer interface { - mustEmbedUnimplementedDeviceMapperServiceServer() -} - -func RegisterDeviceMapperServiceServer(s grpc.ServiceRegistrar, srv DeviceMapperServiceServer) { - s.RegisterService(&DeviceMapperService_ServiceDesc, srv) -} - -func _DeviceMapperService_RegisterDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_RegisterDevice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).RegisterDevice(ctx, req.(*RegisterDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_RemoveDevice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_UpdateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_UpdateDevice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).UpdateDevice(ctx, req.(*UpdateDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_CreateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDeviceModelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_CreateDeviceModel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).CreateDeviceModel(ctx, req.(*CreateDeviceModelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_RemoveDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveDeviceModelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_RemoveDeviceModel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).RemoveDeviceModel(ctx, req.(*RemoveDeviceModelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_UpdateDeviceModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateDeviceModelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_UpdateDeviceModel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).UpdateDeviceModel(ctx, req.(*UpdateDeviceModelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceMapperService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceMapperServiceServer).GetDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DeviceMapperService_GetDevice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceMapperServiceServer).GetDevice(ctx, req.(*GetDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// DeviceMapperService_ServiceDesc is the grpc.ServiceDesc for DeviceMapperService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var DeviceMapperService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "v1beta1.DeviceMapperService", - HandlerType: (*DeviceMapperServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterDevice", - Handler: _DeviceMapperService_RegisterDevice_Handler, - }, - { - MethodName: "RemoveDevice", - Handler: _DeviceMapperService_RemoveDevice_Handler, - }, - { - MethodName: "UpdateDevice", - Handler: _DeviceMapperService_UpdateDevice_Handler, - }, - { - MethodName: "CreateDeviceModel", - Handler: _DeviceMapperService_CreateDeviceModel_Handler, - }, - { - MethodName: "RemoveDeviceModel", - Handler: _DeviceMapperService_RemoveDeviceModel_Handler, - }, - { - MethodName: "UpdateDeviceModel", - Handler: _DeviceMapperService_UpdateDeviceModel_Handler, - }, - { - MethodName: "GetDevice", - Handler: _DeviceMapperService_GetDevice_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", -}