From 5089f9d6179ffa9d24b46a2a6fdb00cc057d184b Mon Sep 17 00:00:00 2001 From: Iliya Bezrukov Date: Fri, 4 Mar 2022 16:09:56 +0300 Subject: [PATCH 1/2] Add cloud/longrunning to protoc_opts and make grpc by protoc-gen-go-grpc --- golang/generate_protobuf.sh | 25 +- golang/go.mod | 7 +- golang/go.sum | 91 +- .../cloud/longrunning/v1/longrunning.pb.go | 1434 +++++++++++++++++ .../longrunning/v1/longrunning_grpc.pb.go | 328 ++++ golang/pkg/tinkoff/cloud/stt/v1/stt.pb.go | 231 +-- .../pkg/tinkoff/cloud/stt/v1/stt_grpc.pb.go | 211 +++ golang/pkg/tinkoff/cloud/tts/v1/tts.pb.go | 204 +-- .../pkg/tinkoff/cloud/tts/v1/tts_grpc.pb.go | 205 +++ 9 files changed, 2319 insertions(+), 417 deletions(-) create mode 100644 golang/pkg/tinkoff/cloud/longrunning/v1/longrunning.pb.go create mode 100644 golang/pkg/tinkoff/cloud/longrunning/v1/longrunning_grpc.pb.go create mode 100644 golang/pkg/tinkoff/cloud/stt/v1/stt_grpc.pb.go create mode 100644 golang/pkg/tinkoff/cloud/tts/v1/tts_grpc.pb.go diff --git a/golang/generate_protobuf.sh b/golang/generate_protobuf.sh index 9d1e6b6..3844640 100755 --- a/golang/generate_protobuf.sh +++ b/golang/generate_protobuf.sh @@ -3,22 +3,37 @@ set -e if ! [[ -x "$(command -v protoc-gen-go)" ]]; then - go get github.com/golang/protobuf/protoc-gen-go - go install github.com/golang/protobuf/protoc-gen-go + echo "kek" + go get -u google.golang.org/protobuf/cmd/protoc-gen-go + go install google.golang.org/protobuf/cmd/protoc-gen-go - if ! [[ -x "$(command -v protoc-gen-go)" ]]; then - echo "Failed to instal protoc-gen-go, check your GOPATH" +if ! [[ -x "$(command -v protoc-gen-go)" ]]; then + echo "Failed to install google.golang.org/protobuf/cmd/protoc-gen-go, check your GOPATH" + exit 1 + fi +fi + + +if ! [[ -x "$(command -v protoc-gen-go-grpc)" ]]; then + echo "lol" + go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc + +if ! [[ -x "$(command -v protoc-gen-go-grpc)" ]]; then + echo "Failed to install google.golang.org/protobuf/cmd/protoc-gen-go, check your GOPATH" exit 1 fi fi -PROTOC_OPTS="-I../third_party/googleapis/ -I../apis/ --go_out=plugins=grpc:temp" + +PROTOC_OPTS="-I../third_party/googleapis/ -I../apis/ --go_out=:temp --go-grpc_out=:temp" mkdir -p temp/ protoc $PROTOC_OPTS ../apis/tinkoff/cloud/stt/v1/*.proto protoc $PROTOC_OPTS ../apis/tinkoff/cloud/tts/v1/*.proto +protoc $PROTOC_OPTS ../apis/tinkoff/cloud/longrunning/v1/*.proto rm -rf pkg/tinkoff diff --git a/golang/go.mod b/golang/go.mod index 562523f..ca3efe5 100644 --- a/golang/go.mod +++ b/golang/go.mod @@ -8,10 +8,9 @@ require ( github.com/go-audio/audio v1.0.0 github.com/go-audio/wav v1.0.0 github.com/golang/protobuf v1.5.2 - github.com/stretchr/testify v1.4.0 // indirect github.com/tidwall/pretty v1.0.0 - golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 // indirect - google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6 - google.golang.org/grpc v1.24.0 + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 + google.golang.org/grpc v1.44.0 + google.golang.org/protobuf v1.26.0 gopkg.in/hraban/opus.v2 v2.0.0-20180426093920-0f2e0b4fc6cd ) diff --git a/golang/go.sum b/golang/go.sum index 786185e..92b9feb 100644 --- a/golang/go.sum +++ b/golang/go.sum @@ -1,56 +1,139 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/akamensky/argparse v0.0.0-20191006154803-1427fe674291 h1:EQ9p1v9+urDzbGQfAcBf9fGuDtYqFNE7YJHZ54TWPTk= github.com/akamensky/argparse v0.0.0-20191006154803-1427fe674291/go.mod h1:pdh+2piXurh466J9tqIqq39/9GO2Y8nZt6Cxzu18T9A= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-audio/audio v1.0.0 h1:zS9vebldgbQqktK4H0lUqWrG8P0NxCJVqcj7ZpNnwd4= github.com/go-audio/audio v1.0.0/go.mod h1:6uAu0+H2lHkwdGsAY+j2wHPNPpPoeg5AaEFh9FlA+Zs= +github.com/go-audio/riff v1.0.0 h1:d8iCGbDvox9BfLagY94fBynxSPHO80LmZCaOsmKxokA= github.com/go-audio/riff v1.0.0/go.mod h1:l3cQwc85y79NQFCRB7TiPoNiaijp6q8Z0Uv38rVG498= +github.com/go-audio/wav v1.0.0 h1:WdSGLhtyud6bof6XHL28xKeCQRzCV06pOFo3LZsFdyE= github.com/go-audio/wav v1.0.0/go.mod h1:3yoReyQOsiARkvPl3ERCi8JFjihzG6WhjYpZCf5zAWE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/hraban/opus.v2 v2.0.0-20180426093920-0f2e0b4fc6cd h1:oAcaGkUcXajq9yi+UKvzJMSKEb++XegVTSQjOlu3MVU= gopkg.in/hraban/opus.v2 v2.0.0-20180426093920-0f2e0b4fc6cd/go.mod h1:/L5E7a21VWl8DeuCPKxQBdVG5cy+L0MRZ08B1wnqt7g= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning.pb.go b/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning.pb.go new file mode 100644 index 0000000..5cb7046 --- /dev/null +++ b/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning.pb.go @@ -0,0 +1,1434 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: tinkoff/cloud/longrunning/v1/longrunning.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + 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 OperationState int32 + +const ( + // Operation enqueued by service + OperationState_ENQUEUED OperationState = 0 + // Processing started + OperationState_PROCESSING OperationState = 1 + // Operation finished successfully + OperationState_DONE OperationState = 2 + // Operation finished with error + OperationState_FAILED OperationState = 3 +) + +// Enum value maps for OperationState. +var ( + OperationState_name = map[int32]string{ + 0: "ENQUEUED", + 1: "PROCESSING", + 2: "DONE", + 3: "FAILED", + } + OperationState_value = map[string]int32{ + "ENQUEUED": 0, + "PROCESSING": 1, + "DONE": 2, + "FAILED": 3, + } +) + +func (x OperationState) Enum() *OperationState { + p := new(OperationState) + *p = x + return p +} + +func (x OperationState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperationState) Descriptor() protoreflect.EnumDescriptor { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_enumTypes[0].Descriptor() +} + +func (OperationState) Type() protoreflect.EnumType { + return &file_tinkoff_cloud_longrunning_v1_longrunning_proto_enumTypes[0] +} + +func (x OperationState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperationState.Descriptor instead. +func (OperationState) EnumDescriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{0} +} + +// A message that represents long-running operation and its state. This message also encapsulates any service-specific results of the operation and its metadata. +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation ID + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Operation group + Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + // Service-specific metadata associated with the operation. + Metadata *anypb.Any `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Operation state + State OperationState `protobuf:"varint,4,opt,name=state,proto3,enum=tinkoff.cloud.longrunning.v1.OperationState" json:"state,omitempty"` + // This can either be the result of finished operation or an error. + // + // Types that are assignable to Result: + // *Operation_Error + // *Operation_Response + Result isOperation_Result `protobuf_oneof:"result"` + // This field contains optional client request id, which can be passed via 'x-client-request-id' HTTP header to the method that created the operation (e.g. LongRunningRecognize). + XClientRequestId string `protobuf:"bytes,7,opt,name=x_client_request_id,json=xClientRequestId,proto3" json:"x_client_request_id,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{0} +} + +func (x *Operation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Operation) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *Operation) GetMetadata() *anypb.Any { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Operation) GetState() OperationState { + if x != nil { + return x.State + } + return OperationState_ENQUEUED +} + +func (m *Operation) GetResult() isOperation_Result { + if m != nil { + return m.Result + } + return nil +} + +func (x *Operation) GetError() *status.Status { + if x, ok := x.GetResult().(*Operation_Error); ok { + return x.Error + } + return nil +} + +func (x *Operation) GetResponse() *anypb.Any { + if x, ok := x.GetResult().(*Operation_Response); ok { + return x.Response + } + return nil +} + +func (x *Operation) GetXClientRequestId() string { + if x != nil { + return x.XClientRequestId + } + return "" +} + +type isOperation_Result interface { + isOperation_Result() +} + +type Operation_Error struct { + // Operation status if any error occurred + Error *status.Status `protobuf:"bytes,5,opt,name=error,proto3,oneof"` +} + +type Operation_Response struct { + // Operation response if the operation successfully finished + Response *anypb.Any `protobuf:"bytes,6,opt,name=response,proto3,oneof"` +} + +func (*Operation_Error) isOperation_Result() {} + +func (*Operation_Response) isOperation_Result() {} + +// OperationFilter message can be used to filter the long list of operations in the methods which support it. +type OperationFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Service ID filter. Use this field to filter the list of operations by service identifier. + // + // Types that are assignable to ServiceId: + // *OperationFilter_ExactServiceId + // *OperationFilter_AnyServiceId + ServiceId isOperationFilter_ServiceId `protobuf_oneof:"service_id"` + // Operation ID filter + // + // Types that are assignable to Id: + // *OperationFilter_ExactId + // *OperationFilter_AnyId + Id isOperationFilter_Id `protobuf_oneof:"id"` + // Operation group filer + // + // Types that are assignable to Group: + // *OperationFilter_ExactGroup + // *OperationFilter_AnyGroup + Group isOperationFilter_Group `protobuf_oneof:"group"` + // Operation state filter; all operations if empty + State []OperationState `protobuf:"varint,7,rep,packed,name=state,proto3,enum=tinkoff.cloud.longrunning.v1.OperationState" json:"state,omitempty"` +} + +func (x *OperationFilter) Reset() { + *x = OperationFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationFilter) ProtoMessage() {} + +func (x *OperationFilter) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 OperationFilter.ProtoReflect.Descriptor instead. +func (*OperationFilter) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{1} +} + +func (m *OperationFilter) GetServiceId() isOperationFilter_ServiceId { + if m != nil { + return m.ServiceId + } + return nil +} + +func (x *OperationFilter) GetExactServiceId() string { + if x, ok := x.GetServiceId().(*OperationFilter_ExactServiceId); ok { + return x.ExactServiceId + } + return "" +} + +func (x *OperationFilter) GetAnyServiceId() *emptypb.Empty { + if x, ok := x.GetServiceId().(*OperationFilter_AnyServiceId); ok { + return x.AnyServiceId + } + return nil +} + +func (m *OperationFilter) GetId() isOperationFilter_Id { + if m != nil { + return m.Id + } + return nil +} + +func (x *OperationFilter) GetExactId() string { + if x, ok := x.GetId().(*OperationFilter_ExactId); ok { + return x.ExactId + } + return "" +} + +func (x *OperationFilter) GetAnyId() *emptypb.Empty { + if x, ok := x.GetId().(*OperationFilter_AnyId); ok { + return x.AnyId + } + return nil +} + +func (m *OperationFilter) GetGroup() isOperationFilter_Group { + if m != nil { + return m.Group + } + return nil +} + +func (x *OperationFilter) GetExactGroup() string { + if x, ok := x.GetGroup().(*OperationFilter_ExactGroup); ok { + return x.ExactGroup + } + return "" +} + +func (x *OperationFilter) GetAnyGroup() *emptypb.Empty { + if x, ok := x.GetGroup().(*OperationFilter_AnyGroup); ok { + return x.AnyGroup + } + return nil +} + +func (x *OperationFilter) GetState() []OperationState { + if x != nil { + return x.State + } + return nil +} + +type isOperationFilter_ServiceId interface { + isOperationFilter_ServiceId() +} + +type OperationFilter_ExactServiceId struct { + // Set this field to get only those results which have service id equal to the string specified. + ExactServiceId string `protobuf:"bytes,1,opt,name=exact_service_id,json=exactServiceId,proto3,oneof"` +} + +type OperationFilter_AnyServiceId struct { + // Set this field to get results with any service id. + AnyServiceId *emptypb.Empty `protobuf:"bytes,2,opt,name=any_service_id,json=anyServiceId,proto3,oneof"` +} + +func (*OperationFilter_ExactServiceId) isOperationFilter_ServiceId() {} + +func (*OperationFilter_AnyServiceId) isOperationFilter_ServiceId() {} + +type isOperationFilter_Id interface { + isOperationFilter_Id() +} + +type OperationFilter_ExactId struct { + // For single specific value + ExactId string `protobuf:"bytes,3,opt,name=exact_id,json=exactId,proto3,oneof"` +} + +type OperationFilter_AnyId struct { + // For any value + AnyId *emptypb.Empty `protobuf:"bytes,4,opt,name=any_id,json=anyId,proto3,oneof"` +} + +func (*OperationFilter_ExactId) isOperationFilter_Id() {} + +func (*OperationFilter_AnyId) isOperationFilter_Id() {} + +type isOperationFilter_Group interface { + isOperationFilter_Group() +} + +type OperationFilter_ExactGroup struct { + // For single specific value + ExactGroup string `protobuf:"bytes,5,opt,name=exact_group,json=exactGroup,proto3,oneof"` +} + +type OperationFilter_AnyGroup struct { + // For any value + AnyGroup *emptypb.Empty `protobuf:"bytes,6,opt,name=any_group,json=anyGroup,proto3,oneof"` +} + +func (*OperationFilter_ExactGroup) isOperationFilter_Group() {} + +func (*OperationFilter_AnyGroup) isOperationFilter_Group() {} + +type GetOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation ID + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetOperationRequest) Reset() { + *x = GetOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperationRequest) ProtoMessage() {} + +func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 GetOperationRequest.ProtoReflect.Descriptor instead. +func (*GetOperationRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{2} +} + +func (x *GetOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type WaitOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation ID + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. + Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *WaitOperationRequest) Reset() { + *x = WaitOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WaitOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WaitOperationRequest) ProtoMessage() {} + +func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 WaitOperationRequest.ProtoReflect.Descriptor instead. +func (*WaitOperationRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{3} +} + +func (x *WaitOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WaitOperationRequest) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +type ListOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation filter + Filter *OperationFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // Page size + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListOperationsRequest) Reset() { + *x = ListOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsRequest) ProtoMessage() {} + +func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 ListOperationsRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{4} +} + +func (x *ListOperationsRequest) GetFilter() *OperationFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ListOperationsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListOperationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operations for current page + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` + // Next page token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListOperationsResponse) Reset() { + *x = ListOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsResponse) ProtoMessage() {} + +func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 ListOperationsResponse.ProtoReflect.Descriptor instead. +func (*ListOperationsResponse) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{5} +} + +func (x *ListOperationsResponse) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +func (x *ListOperationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation filter + Filter *OperationFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *DeleteOperationRequest) Reset() { + *x = DeleteOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOperationRequest) ProtoMessage() {} + +func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 DeleteOperationRequest.ProtoReflect.Descriptor instead. +func (*DeleteOperationRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteOperationRequest) GetFilter() *OperationFilter { + if x != nil { + return x.Filter + } + return nil +} + +type CancelOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation filter + Filter *OperationFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *CancelOperationRequest) Reset() { + *x = CancelOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelOperationRequest) ProtoMessage() {} + +func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 CancelOperationRequest.ProtoReflect.Descriptor instead. +func (*CancelOperationRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{7} +} + +func (x *CancelOperationRequest) GetFilter() *OperationFilter { + if x != nil { + return x.Filter + } + return nil +} + +type WatchOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation filter + Filter *OperationFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // Flag to enable keeping gRPC stream and listening for updates + ListenForUpdates bool `protobuf:"varint,2,opt,name=listen_for_updates,json=listenForUpdates,proto3" json:"listen_for_updates,omitempty"` +} + +func (x *WatchOperationsRequest) Reset() { + *x = WatchOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WatchOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WatchOperationsRequest) ProtoMessage() {} + +func (x *WatchOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 WatchOperationsRequest.ProtoReflect.Descriptor instead. +func (*WatchOperationsRequest) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{8} +} + +func (x *WatchOperationsRequest) GetFilter() *OperationFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *WatchOperationsRequest) GetListenForUpdates() bool { + if x != nil { + return x.ListenForUpdates + } + return false +} + +type OperationsInitialState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operations + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *OperationsInitialState) Reset() { + *x = OperationsInitialState{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationsInitialState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationsInitialState) ProtoMessage() {} + +func (x *OperationsInitialState) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 OperationsInitialState.ProtoReflect.Descriptor instead. +func (*OperationsInitialState) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{9} +} + +func (x *OperationsInitialState) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +type OperationsUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operations + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *OperationsUpdate) Reset() { + *x = OperationsUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationsUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationsUpdate) ProtoMessage() {} + +func (x *OperationsUpdate) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 OperationsUpdate.ProtoReflect.Descriptor instead. +func (*OperationsUpdate) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{10} +} + +func (x *OperationsUpdate) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +type WatchOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Operations: + // *WatchOperationsResponse_InitialState + // *WatchOperationsResponse_InitFinished + // *WatchOperationsResponse_Update + Operations isWatchOperationsResponse_Operations `protobuf_oneof:"operations"` +} + +func (x *WatchOperationsResponse) Reset() { + *x = WatchOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WatchOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WatchOperationsResponse) ProtoMessage() {} + +func (x *WatchOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_tinkoff_cloud_longrunning_v1_longrunning_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 WatchOperationsResponse.ProtoReflect.Descriptor instead. +func (*WatchOperationsResponse) Descriptor() ([]byte, []int) { + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP(), []int{11} +} + +func (m *WatchOperationsResponse) GetOperations() isWatchOperationsResponse_Operations { + if m != nil { + return m.Operations + } + return nil +} + +func (x *WatchOperationsResponse) GetInitialState() *OperationsInitialState { + if x, ok := x.GetOperations().(*WatchOperationsResponse_InitialState); ok { + return x.InitialState + } + return nil +} + +func (x *WatchOperationsResponse) GetInitFinished() *emptypb.Empty { + if x, ok := x.GetOperations().(*WatchOperationsResponse_InitFinished); ok { + return x.InitFinished + } + return nil +} + +func (x *WatchOperationsResponse) GetUpdate() *OperationsUpdate { + if x, ok := x.GetOperations().(*WatchOperationsResponse_Update); ok { + return x.Update + } + return nil +} + +type isWatchOperationsResponse_Operations interface { + isWatchOperationsResponse_Operations() +} + +type WatchOperationsResponse_InitialState struct { + // Initial state + InitialState *OperationsInitialState `protobuf:"bytes,1,opt,name=initial_state,json=initialState,proto3,oneof"` +} + +type WatchOperationsResponse_InitFinished struct { + // Init finished + InitFinished *emptypb.Empty `protobuf:"bytes,2,opt,name=init_finished,json=initFinished,proto3,oneof"` +} + +type WatchOperationsResponse_Update struct { + // Update + Update *OperationsUpdate `protobuf:"bytes,3,opt,name=update,proto3,oneof"` +} + +func (*WatchOperationsResponse_InitialState) isWatchOperationsResponse_Operations() {} + +func (*WatchOperationsResponse_InitFinished) isWatchOperationsResponse_Operations() {} + +func (*WatchOperationsResponse_Update) isWatchOperationsResponse_Operations() {} + +var File_tinkoff_cloud_longrunning_v1_longrunning_proto protoreflect.FileDescriptor + +var file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1c, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x06, 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, 0x48, 0x00, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x78, 0x5f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x78, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x86, 0x03, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0e, 0x65, 0x78, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x3e, 0x0a, 0x0e, 0x61, 0x6e, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x65, 0x78, 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, + 0x06, 0x61, 0x6e, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x01, 0x52, 0x05, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x21, + 0x0a, 0x0b, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x02, 0x52, 0x08, + 0x61, 0x6e, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x42, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, + 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0c, 0x0a, 0x0a, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, + 0x42, 0x07, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x5b, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x9a, 0x01, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, + 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x69, 0x6e, 0x6b, + 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5f, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x5f, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x16, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x46, 0x6f, + 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x61, 0x0a, 0x16, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5b, 0x0a, 0x10, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x47, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x17, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x69, + 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x3d, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x12, 0x48, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x44, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, + 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, + 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0xbf, + 0x06, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x87, 0x01, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6c, 0x0a, 0x0d, 0x57, 0x61, 0x69, 0x74, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, + 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x74, + 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x93, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, + 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x34, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x57, + 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x89, + 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0f, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x65, 0x78, 0x61, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x3a, 0x01, 0x2a, + 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2f, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x6b, 0x69, 0x74, 0x2d, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescOnce sync.Once + file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescData = file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDesc +) + +func file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescGZIP() []byte { + file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescOnce.Do(func() { + file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescData = protoimpl.X.CompressGZIP(file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescData) + }) + return file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDescData +} + +var file_tinkoff_cloud_longrunning_v1_longrunning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_tinkoff_cloud_longrunning_v1_longrunning_proto_goTypes = []interface{}{ + (OperationState)(0), // 0: tinkoff.cloud.longrunning.v1.OperationState + (*Operation)(nil), // 1: tinkoff.cloud.longrunning.v1.Operation + (*OperationFilter)(nil), // 2: tinkoff.cloud.longrunning.v1.OperationFilter + (*GetOperationRequest)(nil), // 3: tinkoff.cloud.longrunning.v1.GetOperationRequest + (*WaitOperationRequest)(nil), // 4: tinkoff.cloud.longrunning.v1.WaitOperationRequest + (*ListOperationsRequest)(nil), // 5: tinkoff.cloud.longrunning.v1.ListOperationsRequest + (*ListOperationsResponse)(nil), // 6: tinkoff.cloud.longrunning.v1.ListOperationsResponse + (*DeleteOperationRequest)(nil), // 7: tinkoff.cloud.longrunning.v1.DeleteOperationRequest + (*CancelOperationRequest)(nil), // 8: tinkoff.cloud.longrunning.v1.CancelOperationRequest + (*WatchOperationsRequest)(nil), // 9: tinkoff.cloud.longrunning.v1.WatchOperationsRequest + (*OperationsInitialState)(nil), // 10: tinkoff.cloud.longrunning.v1.OperationsInitialState + (*OperationsUpdate)(nil), // 11: tinkoff.cloud.longrunning.v1.OperationsUpdate + (*WatchOperationsResponse)(nil), // 12: tinkoff.cloud.longrunning.v1.WatchOperationsResponse + (*anypb.Any)(nil), // 13: google.protobuf.Any + (*status.Status)(nil), // 14: google.rpc.Status + (*emptypb.Empty)(nil), // 15: google.protobuf.Empty + (*durationpb.Duration)(nil), // 16: google.protobuf.Duration +} +var file_tinkoff_cloud_longrunning_v1_longrunning_proto_depIdxs = []int32{ + 13, // 0: tinkoff.cloud.longrunning.v1.Operation.metadata:type_name -> google.protobuf.Any + 0, // 1: tinkoff.cloud.longrunning.v1.Operation.state:type_name -> tinkoff.cloud.longrunning.v1.OperationState + 14, // 2: tinkoff.cloud.longrunning.v1.Operation.error:type_name -> google.rpc.Status + 13, // 3: tinkoff.cloud.longrunning.v1.Operation.response:type_name -> google.protobuf.Any + 15, // 4: tinkoff.cloud.longrunning.v1.OperationFilter.any_service_id:type_name -> google.protobuf.Empty + 15, // 5: tinkoff.cloud.longrunning.v1.OperationFilter.any_id:type_name -> google.protobuf.Empty + 15, // 6: tinkoff.cloud.longrunning.v1.OperationFilter.any_group:type_name -> google.protobuf.Empty + 0, // 7: tinkoff.cloud.longrunning.v1.OperationFilter.state:type_name -> tinkoff.cloud.longrunning.v1.OperationState + 16, // 8: tinkoff.cloud.longrunning.v1.WaitOperationRequest.timeout:type_name -> google.protobuf.Duration + 2, // 9: tinkoff.cloud.longrunning.v1.ListOperationsRequest.filter:type_name -> tinkoff.cloud.longrunning.v1.OperationFilter + 1, // 10: tinkoff.cloud.longrunning.v1.ListOperationsResponse.operations:type_name -> tinkoff.cloud.longrunning.v1.Operation + 2, // 11: tinkoff.cloud.longrunning.v1.DeleteOperationRequest.filter:type_name -> tinkoff.cloud.longrunning.v1.OperationFilter + 2, // 12: tinkoff.cloud.longrunning.v1.CancelOperationRequest.filter:type_name -> tinkoff.cloud.longrunning.v1.OperationFilter + 2, // 13: tinkoff.cloud.longrunning.v1.WatchOperationsRequest.filter:type_name -> tinkoff.cloud.longrunning.v1.OperationFilter + 1, // 14: tinkoff.cloud.longrunning.v1.OperationsInitialState.operations:type_name -> tinkoff.cloud.longrunning.v1.Operation + 1, // 15: tinkoff.cloud.longrunning.v1.OperationsUpdate.operations:type_name -> tinkoff.cloud.longrunning.v1.Operation + 10, // 16: tinkoff.cloud.longrunning.v1.WatchOperationsResponse.initial_state:type_name -> tinkoff.cloud.longrunning.v1.OperationsInitialState + 15, // 17: tinkoff.cloud.longrunning.v1.WatchOperationsResponse.init_finished:type_name -> google.protobuf.Empty + 11, // 18: tinkoff.cloud.longrunning.v1.WatchOperationsResponse.update:type_name -> tinkoff.cloud.longrunning.v1.OperationsUpdate + 3, // 19: tinkoff.cloud.longrunning.v1.Operations.GetOperation:input_type -> tinkoff.cloud.longrunning.v1.GetOperationRequest + 4, // 20: tinkoff.cloud.longrunning.v1.Operations.WaitOperation:input_type -> tinkoff.cloud.longrunning.v1.WaitOperationRequest + 5, // 21: tinkoff.cloud.longrunning.v1.Operations.ListOperations:input_type -> tinkoff.cloud.longrunning.v1.ListOperationsRequest + 9, // 22: tinkoff.cloud.longrunning.v1.Operations.WatchOperations:input_type -> tinkoff.cloud.longrunning.v1.WatchOperationsRequest + 7, // 23: tinkoff.cloud.longrunning.v1.Operations.DeleteOperation:input_type -> tinkoff.cloud.longrunning.v1.DeleteOperationRequest + 8, // 24: tinkoff.cloud.longrunning.v1.Operations.CancelOperation:input_type -> tinkoff.cloud.longrunning.v1.CancelOperationRequest + 1, // 25: tinkoff.cloud.longrunning.v1.Operations.GetOperation:output_type -> tinkoff.cloud.longrunning.v1.Operation + 1, // 26: tinkoff.cloud.longrunning.v1.Operations.WaitOperation:output_type -> tinkoff.cloud.longrunning.v1.Operation + 6, // 27: tinkoff.cloud.longrunning.v1.Operations.ListOperations:output_type -> tinkoff.cloud.longrunning.v1.ListOperationsResponse + 12, // 28: tinkoff.cloud.longrunning.v1.Operations.WatchOperations:output_type -> tinkoff.cloud.longrunning.v1.WatchOperationsResponse + 15, // 29: tinkoff.cloud.longrunning.v1.Operations.DeleteOperation:output_type -> google.protobuf.Empty + 15, // 30: tinkoff.cloud.longrunning.v1.Operations.CancelOperation:output_type -> google.protobuf.Empty + 25, // [25:31] is the sub-list for method output_type + 19, // [19:25] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_tinkoff_cloud_longrunning_v1_longrunning_proto_init() } +func file_tinkoff_cloud_longrunning_v1_longrunning_proto_init() { + if File_tinkoff_cloud_longrunning_v1_longrunning_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WaitOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationsInitialState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationsUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Operation_Error)(nil), + (*Operation_Response)(nil), + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*OperationFilter_ExactServiceId)(nil), + (*OperationFilter_AnyServiceId)(nil), + (*OperationFilter_ExactId)(nil), + (*OperationFilter_AnyId)(nil), + (*OperationFilter_ExactGroup)(nil), + (*OperationFilter_AnyGroup)(nil), + } + file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*WatchOperationsResponse_InitialState)(nil), + (*WatchOperationsResponse_InitFinished)(nil), + (*WatchOperationsResponse_Update)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tinkoff_cloud_longrunning_v1_longrunning_proto_goTypes, + DependencyIndexes: file_tinkoff_cloud_longrunning_v1_longrunning_proto_depIdxs, + EnumInfos: file_tinkoff_cloud_longrunning_v1_longrunning_proto_enumTypes, + MessageInfos: file_tinkoff_cloud_longrunning_v1_longrunning_proto_msgTypes, + }.Build() + File_tinkoff_cloud_longrunning_v1_longrunning_proto = out.File + file_tinkoff_cloud_longrunning_v1_longrunning_proto_rawDesc = nil + file_tinkoff_cloud_longrunning_v1_longrunning_proto_goTypes = nil + file_tinkoff_cloud_longrunning_v1_longrunning_proto_depIdxs = nil +} diff --git a/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning_grpc.pb.go b/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning_grpc.pb.go new file mode 100644 index 0000000..382ff14 --- /dev/null +++ b/golang/pkg/tinkoff/cloud/longrunning/v1/longrunning_grpc.pb.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: tinkoff/cloud/longrunning/v1/longrunning.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// 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 + +// OperationsClient is the client API for Operations 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 OperationsClient interface { + // Starts polling for operation statuses + // Returns operation status + GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) + // Wait for operation update + WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) + // List operations + ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) + // Watch operations + WatchOperations(ctx context.Context, in *WatchOperationsRequest, opts ...grpc.CallOption) (Operations_WatchOperationsClient, error) + // Deletes specified operations + DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Cancels specified operations + CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type operationsClient struct { + cc grpc.ClientConnInterface +} + +func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient { + return &operationsClient{cc} +} + +func (c *operationsClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.longrunning.v1.Operations/GetOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.longrunning.v1.Operations/WaitOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { + out := new(ListOperationsResponse) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.longrunning.v1.Operations/ListOperations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) WatchOperations(ctx context.Context, in *WatchOperationsRequest, opts ...grpc.CallOption) (Operations_WatchOperationsClient, error) { + stream, err := c.cc.NewStream(ctx, &Operations_ServiceDesc.Streams[0], "/tinkoff.cloud.longrunning.v1.Operations/WatchOperations", opts...) + if err != nil { + return nil, err + } + x := &operationsWatchOperationsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Operations_WatchOperationsClient interface { + Recv() (*WatchOperationsResponse, error) + grpc.ClientStream +} + +type operationsWatchOperationsClient struct { + grpc.ClientStream +} + +func (x *operationsWatchOperationsClient) Recv() (*WatchOperationsResponse, error) { + m := new(WatchOperationsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *operationsClient) DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.longrunning.v1.Operations/DeleteOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.longrunning.v1.Operations/CancelOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperationsServer is the server API for Operations service. +// All implementations must embed UnimplementedOperationsServer +// for forward compatibility +type OperationsServer interface { + // Starts polling for operation statuses + // Returns operation status + GetOperation(context.Context, *GetOperationRequest) (*Operation, error) + // Wait for operation update + WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) + // List operations + ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) + // Watch operations + WatchOperations(*WatchOperationsRequest, Operations_WatchOperationsServer) error + // Deletes specified operations + DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) + // Cancels specified operations + CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedOperationsServer() +} + +// UnimplementedOperationsServer must be embedded to have forward compatible implementations. +type UnimplementedOperationsServer struct { +} + +func (UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperation not implemented") +} +func (UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method WaitOperation not implemented") +} +func (UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented") +} +func (UnimplementedOperationsServer) WatchOperations(*WatchOperationsRequest, Operations_WatchOperationsServer) error { + return status.Errorf(codes.Unimplemented, "method WatchOperations not implemented") +} +func (UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOperation not implemented") +} +func (UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelOperation not implemented") +} +func (UnimplementedOperationsServer) mustEmbedUnimplementedOperationsServer() {} + +// UnsafeOperationsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperationsServer will +// result in compilation errors. +type UnsafeOperationsServer interface { + mustEmbedUnimplementedOperationsServer() +} + +func RegisterOperationsServer(s grpc.ServiceRegistrar, srv OperationsServer) { + s.RegisterService(&Operations_ServiceDesc, srv) +} + +func _Operations_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).GetOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.longrunning.v1.Operations/GetOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).GetOperation(ctx, req.(*GetOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_WaitOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WaitOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).WaitOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.longrunning.v1.Operations/WaitOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).WaitOperation(ctx, req.(*WaitOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).ListOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.longrunning.v1.Operations/ListOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).ListOperations(ctx, req.(*ListOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_WatchOperations_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(WatchOperationsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(OperationsServer).WatchOperations(m, &operationsWatchOperationsServer{stream}) +} + +type Operations_WatchOperationsServer interface { + Send(*WatchOperationsResponse) error + grpc.ServerStream +} + +type operationsWatchOperationsServer struct { + grpc.ServerStream +} + +func (x *operationsWatchOperationsServer) Send(m *WatchOperationsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Operations_DeleteOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).DeleteOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.longrunning.v1.Operations/DeleteOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).DeleteOperation(ctx, req.(*DeleteOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).CancelOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.longrunning.v1.Operations/CancelOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).CancelOperation(ctx, req.(*CancelOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Operations_ServiceDesc is the grpc.ServiceDesc for Operations service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Operations_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tinkoff.cloud.longrunning.v1.Operations", + HandlerType: (*OperationsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetOperation", + Handler: _Operations_GetOperation_Handler, + }, + { + MethodName: "WaitOperation", + Handler: _Operations_WaitOperation_Handler, + }, + { + MethodName: "ListOperations", + Handler: _Operations_ListOperations_Handler, + }, + { + MethodName: "DeleteOperation", + Handler: _Operations_DeleteOperation_Handler, + }, + { + MethodName: "CancelOperation", + Handler: _Operations_CancelOperation_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "WatchOperations", + Handler: _Operations_WatchOperations_Handler, + ServerStreams: true, + }, + }, + Metadata: "tinkoff/cloud/longrunning/v1/longrunning.proto", +} diff --git a/golang/pkg/tinkoff/cloud/stt/v1/stt.pb.go b/golang/pkg/tinkoff/cloud/stt/v1/stt.pb.go index 2dbd482..11955a0 100644 --- a/golang/pkg/tinkoff/cloud/stt/v1/stt.pb.go +++ b/golang/pkg/tinkoff/cloud/stt/v1/stt.pb.go @@ -1,21 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.6.1 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: tinkoff/cloud/stt/v1/stt.proto package v1 import ( - context "context" v1 "github.com/Tinkoff/voicekit-examples/golang/pkg/tinkoff/cloud/longrunning/v1" - duration "github.com/golang/protobuf/ptypes/duration" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -272,10 +268,10 @@ type WordInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartTime *duration.Duration `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Word start time inside input audiostream. - EndTime *duration.Duration `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Word end time inside input audiostream. - Word string `protobuf:"bytes,3,opt,name=word,proto3" json:"word,omitempty"` // Word inside phrase. - Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"` // Relative confidence factor (relative to other words of the phrase and to words of other alternatives for requests configuration with max_alternatives > 1). Value may be negative. + StartTime *durationpb.Duration `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Word start time inside input audiostream. + EndTime *durationpb.Duration `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Word end time inside input audiostream. + Word string `protobuf:"bytes,3,opt,name=word,proto3" json:"word,omitempty"` // Word inside phrase. + Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"` // Relative confidence factor (relative to other words of the phrase and to words of other alternatives for requests configuration with max_alternatives > 1). Value may be negative. } func (x *WordInfo) Reset() { @@ -310,14 +306,14 @@ func (*WordInfo) Descriptor() ([]byte, []int) { return file_tinkoff_cloud_stt_v1_stt_proto_rawDescGZIP(), []int{3} } -func (x *WordInfo) GetStartTime() *duration.Duration { +func (x *WordInfo) GetStartTime() *durationpb.Duration { if x != nil { return x.StartTime } return nil } -func (x *WordInfo) GetEndTime() *duration.Duration { +func (x *WordInfo) GetEndTime() *durationpb.Duration { if x != nil { return x.EndTime } @@ -828,8 +824,8 @@ type SpeechRecognitionResult struct { Alternatives []*SpeechRecognitionAlternative `protobuf:"bytes,1,rep,name=alternatives,proto3" json:"alternatives,omitempty"` // Array of phrase alternatives sorted by confidence in descending order. Channel int32 `protobuf:"varint,2,opt,name=channel,proto3" json:"channel,omitempty"` // Channel where phrase alternative relates to (starting from 0). - StartTime *duration.Duration `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Phrase start time inside input audiostream. - EndTime *duration.Duration `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Phrase end time inside input audiostream. + StartTime *durationpb.Duration `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Phrase start time inside input audiostream. + EndTime *durationpb.Duration `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Phrase end time inside input audiostream. SentimentAnalysisResult *SpeechSentimentAnalysisResult `protobuf:"bytes,5,opt,name=sentiment_analysis_result,json=sentimentAnalysisResult,proto3" json:"sentiment_analysis_result,omitempty"` // Sentiment analysis results. GenderIdentificationResult *SpeechGenderIdentificationResult `protobuf:"bytes,6,opt,name=gender_identification_result,json=genderIdentificationResult,proto3" json:"gender_identification_result,omitempty"` // Gender identification results. } @@ -880,14 +876,14 @@ func (x *SpeechRecognitionResult) GetChannel() int32 { return 0 } -func (x *SpeechRecognitionResult) GetStartTime() *duration.Duration { +func (x *SpeechRecognitionResult) GetStartTime() *durationpb.Duration { if x != nil { return x.StartTime } return nil } -func (x *SpeechRecognitionResult) GetEndTime() *duration.Duration { +func (x *SpeechRecognitionResult) GetEndTime() *durationpb.Duration { if x != nil { return x.EndTime } @@ -1610,13 +1606,13 @@ var file_tinkoff_cloud_stt_v1_stt_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x74, 0x3a, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x63, - 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x5b, 0x5a, 0x51, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x43, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x76, 0x6f, 0x69, - 0x63, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, - 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x74, 0x74, 0x2f, 0x76, 0x31, 0xa2, 0x02, - 0x05, 0x54, 0x56, 0x4b, 0x53, 0x52, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x4e, 0x5a, 0x44, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2f, + 0x76, 0x6f, 0x69, 0x63, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6e, + 0x6b, 0x6f, 0x66, 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x74, 0x74, 0x2f, 0x76, + 0x31, 0xa2, 0x02, 0x05, 0x54, 0x56, 0x4b, 0x53, 0x52, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1653,7 +1649,7 @@ var file_tinkoff_cloud_stt_v1_stt_proto_goTypes = []interface{}{ (*StreamingRecognizeRequest)(nil), // 16: tinkoff.cloud.stt.v1.StreamingRecognizeRequest (*StreamingRecognitionResult)(nil), // 17: tinkoff.cloud.stt.v1.StreamingRecognitionResult (*StreamingRecognizeResponse)(nil), // 18: tinkoff.cloud.stt.v1.StreamingRecognizeResponse - (*duration.Duration)(nil), // 19: google.protobuf.Duration + (*durationpb.Duration)(nil), // 19: google.protobuf.Duration (*v1.Operation)(nil), // 20: tinkoff.cloud.longrunning.v1.Operation } var file_tinkoff_cloud_stt_v1_stt_proto_depIdxs = []int32{ @@ -1947,188 +1943,3 @@ func file_tinkoff_cloud_stt_v1_stt_proto_init() { file_tinkoff_cloud_stt_v1_stt_proto_goTypes = nil file_tinkoff_cloud_stt_v1_stt_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SpeechToTextClient is the client API for SpeechToText service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SpeechToTextClient interface { - Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) - StreamingRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingRecognizeClient, error) - LongRunningRecognize(ctx context.Context, in *LongRunningRecognizeRequest, opts ...grpc.CallOption) (*v1.Operation, error) -} - -type speechToTextClient struct { - cc grpc.ClientConnInterface -} - -func NewSpeechToTextClient(cc grpc.ClientConnInterface) SpeechToTextClient { - return &speechToTextClient{cc} -} - -func (c *speechToTextClient) Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) { - out := new(RecognizeResponse) - err := c.cc.Invoke(ctx, "/tinkoff.cloud.stt.v1.SpeechToText/Recognize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *speechToTextClient) StreamingRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingRecognizeClient, error) { - stream, err := c.cc.NewStream(ctx, &_SpeechToText_serviceDesc.Streams[0], "/tinkoff.cloud.stt.v1.SpeechToText/StreamingRecognize", opts...) - if err != nil { - return nil, err - } - x := &speechToTextStreamingRecognizeClient{stream} - return x, nil -} - -type SpeechToText_StreamingRecognizeClient interface { - Send(*StreamingRecognizeRequest) error - Recv() (*StreamingRecognizeResponse, error) - grpc.ClientStream -} - -type speechToTextStreamingRecognizeClient struct { - grpc.ClientStream -} - -func (x *speechToTextStreamingRecognizeClient) Send(m *StreamingRecognizeRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *speechToTextStreamingRecognizeClient) Recv() (*StreamingRecognizeResponse, error) { - m := new(StreamingRecognizeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *speechToTextClient) LongRunningRecognize(ctx context.Context, in *LongRunningRecognizeRequest, opts ...grpc.CallOption) (*v1.Operation, error) { - out := new(v1.Operation) - err := c.cc.Invoke(ctx, "/tinkoff.cloud.stt.v1.SpeechToText/LongRunningRecognize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SpeechToTextServer is the server API for SpeechToText service. -type SpeechToTextServer interface { - Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) - StreamingRecognize(SpeechToText_StreamingRecognizeServer) error - LongRunningRecognize(context.Context, *LongRunningRecognizeRequest) (*v1.Operation, error) -} - -// UnimplementedSpeechToTextServer can be embedded to have forward compatible implementations. -type UnimplementedSpeechToTextServer struct { -} - -func (*UnimplementedSpeechToTextServer) Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Recognize not implemented") -} -func (*UnimplementedSpeechToTextServer) StreamingRecognize(SpeechToText_StreamingRecognizeServer) error { - return status.Errorf(codes.Unimplemented, "method StreamingRecognize not implemented") -} -func (*UnimplementedSpeechToTextServer) LongRunningRecognize(context.Context, *LongRunningRecognizeRequest) (*v1.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method LongRunningRecognize not implemented") -} - -func RegisterSpeechToTextServer(s *grpc.Server, srv SpeechToTextServer) { - s.RegisterService(&_SpeechToText_serviceDesc, srv) -} - -func _SpeechToText_Recognize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecognizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SpeechToTextServer).Recognize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tinkoff.cloud.stt.v1.SpeechToText/Recognize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpeechToTextServer).Recognize(ctx, req.(*RecognizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SpeechToText_StreamingRecognize_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SpeechToTextServer).StreamingRecognize(&speechToTextStreamingRecognizeServer{stream}) -} - -type SpeechToText_StreamingRecognizeServer interface { - Send(*StreamingRecognizeResponse) error - Recv() (*StreamingRecognizeRequest, error) - grpc.ServerStream -} - -type speechToTextStreamingRecognizeServer struct { - grpc.ServerStream -} - -func (x *speechToTextStreamingRecognizeServer) Send(m *StreamingRecognizeResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *speechToTextStreamingRecognizeServer) Recv() (*StreamingRecognizeRequest, error) { - m := new(StreamingRecognizeRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _SpeechToText_LongRunningRecognize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LongRunningRecognizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SpeechToTextServer).LongRunningRecognize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tinkoff.cloud.stt.v1.SpeechToText/LongRunningRecognize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpeechToTextServer).LongRunningRecognize(ctx, req.(*LongRunningRecognizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SpeechToText_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tinkoff.cloud.stt.v1.SpeechToText", - HandlerType: (*SpeechToTextServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Recognize", - Handler: _SpeechToText_Recognize_Handler, - }, - { - MethodName: "LongRunningRecognize", - Handler: _SpeechToText_LongRunningRecognize_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamingRecognize", - Handler: _SpeechToText_StreamingRecognize_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "tinkoff/cloud/stt/v1/stt.proto", -} diff --git a/golang/pkg/tinkoff/cloud/stt/v1/stt_grpc.pb.go b/golang/pkg/tinkoff/cloud/stt/v1/stt_grpc.pb.go new file mode 100644 index 0000000..1fb416b --- /dev/null +++ b/golang/pkg/tinkoff/cloud/stt/v1/stt_grpc.pb.go @@ -0,0 +1,211 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: tinkoff/cloud/stt/v1/stt.proto + +package v1 + +import ( + context "context" + v1 "github.com/Tinkoff/voicekit-examples/golang/pkg/tinkoff/cloud/longrunning/v1" + 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 + +// SpeechToTextClient is the client API for SpeechToText 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 SpeechToTextClient interface { + Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) + StreamingRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingRecognizeClient, error) + LongRunningRecognize(ctx context.Context, in *LongRunningRecognizeRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type speechToTextClient struct { + cc grpc.ClientConnInterface +} + +func NewSpeechToTextClient(cc grpc.ClientConnInterface) SpeechToTextClient { + return &speechToTextClient{cc} +} + +func (c *speechToTextClient) Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) { + out := new(RecognizeResponse) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.stt.v1.SpeechToText/Recognize", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *speechToTextClient) StreamingRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingRecognizeClient, error) { + stream, err := c.cc.NewStream(ctx, &SpeechToText_ServiceDesc.Streams[0], "/tinkoff.cloud.stt.v1.SpeechToText/StreamingRecognize", opts...) + if err != nil { + return nil, err + } + x := &speechToTextStreamingRecognizeClient{stream} + return x, nil +} + +type SpeechToText_StreamingRecognizeClient interface { + Send(*StreamingRecognizeRequest) error + Recv() (*StreamingRecognizeResponse, error) + grpc.ClientStream +} + +type speechToTextStreamingRecognizeClient struct { + grpc.ClientStream +} + +func (x *speechToTextStreamingRecognizeClient) Send(m *StreamingRecognizeRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *speechToTextStreamingRecognizeClient) Recv() (*StreamingRecognizeResponse, error) { + m := new(StreamingRecognizeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *speechToTextClient) LongRunningRecognize(ctx context.Context, in *LongRunningRecognizeRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.stt.v1.SpeechToText/LongRunningRecognize", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SpeechToTextServer is the server API for SpeechToText service. +// All implementations must embed UnimplementedSpeechToTextServer +// for forward compatibility +type SpeechToTextServer interface { + Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) + StreamingRecognize(SpeechToText_StreamingRecognizeServer) error + LongRunningRecognize(context.Context, *LongRunningRecognizeRequest) (*v1.Operation, error) + mustEmbedUnimplementedSpeechToTextServer() +} + +// UnimplementedSpeechToTextServer must be embedded to have forward compatible implementations. +type UnimplementedSpeechToTextServer struct { +} + +func (UnimplementedSpeechToTextServer) Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Recognize not implemented") +} +func (UnimplementedSpeechToTextServer) StreamingRecognize(SpeechToText_StreamingRecognizeServer) error { + return status.Errorf(codes.Unimplemented, "method StreamingRecognize not implemented") +} +func (UnimplementedSpeechToTextServer) LongRunningRecognize(context.Context, *LongRunningRecognizeRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method LongRunningRecognize not implemented") +} +func (UnimplementedSpeechToTextServer) mustEmbedUnimplementedSpeechToTextServer() {} + +// UnsafeSpeechToTextServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SpeechToTextServer will +// result in compilation errors. +type UnsafeSpeechToTextServer interface { + mustEmbedUnimplementedSpeechToTextServer() +} + +func RegisterSpeechToTextServer(s grpc.ServiceRegistrar, srv SpeechToTextServer) { + s.RegisterService(&SpeechToText_ServiceDesc, srv) +} + +func _SpeechToText_Recognize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecognizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SpeechToTextServer).Recognize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.stt.v1.SpeechToText/Recognize", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SpeechToTextServer).Recognize(ctx, req.(*RecognizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SpeechToText_StreamingRecognize_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(SpeechToTextServer).StreamingRecognize(&speechToTextStreamingRecognizeServer{stream}) +} + +type SpeechToText_StreamingRecognizeServer interface { + Send(*StreamingRecognizeResponse) error + Recv() (*StreamingRecognizeRequest, error) + grpc.ServerStream +} + +type speechToTextStreamingRecognizeServer struct { + grpc.ServerStream +} + +func (x *speechToTextStreamingRecognizeServer) Send(m *StreamingRecognizeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *speechToTextStreamingRecognizeServer) Recv() (*StreamingRecognizeRequest, error) { + m := new(StreamingRecognizeRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _SpeechToText_LongRunningRecognize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LongRunningRecognizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SpeechToTextServer).LongRunningRecognize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.stt.v1.SpeechToText/LongRunningRecognize", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SpeechToTextServer).LongRunningRecognize(ctx, req.(*LongRunningRecognizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SpeechToText_ServiceDesc is the grpc.ServiceDesc for SpeechToText service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SpeechToText_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tinkoff.cloud.stt.v1.SpeechToText", + HandlerType: (*SpeechToTextServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Recognize", + Handler: _SpeechToText_Recognize_Handler, + }, + { + MethodName: "LongRunningRecognize", + Handler: _SpeechToText_LongRunningRecognize_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamingRecognize", + Handler: _SpeechToText_StreamingRecognize_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "tinkoff/cloud/stt/v1/stt.proto", +} diff --git a/golang/pkg/tinkoff/cloud/tts/v1/tts.pb.go b/golang/pkg/tinkoff/cloud/tts/v1/tts.pb.go index d5d37ef..07b0e77 100644 --- a/golang/pkg/tinkoff/cloud/tts/v1/tts.pb.go +++ b/golang/pkg/tinkoff/cloud/tts/v1/tts.pb.go @@ -1,17 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.6.1 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: tinkoff/cloud/tts/v1/tts.proto package v1 import ( - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -28,7 +24,7 @@ const ( type AudioEncoding int32 const ( - AudioEncoding_ENCODING_UNSPECIFIED AudioEncoding = 0 // Unspecified - invalid value. Used as default value to avoid accidental errors. + AudioEncoding_ENCODING_UNSPECIFIED AudioEncoding = 0 // Invalid value. AudioEncoding_LINEAR16 AudioEncoding = 1 // Raw PCM with signed integer 16-bit linear audio samples. AudioEncoding_ALAW AudioEncoding = 8 // Raw PCM with A-law mapped 8-bit audio samples (aka PCMA). AudioEncoding_RAW_OPUS AudioEncoding = 11 // Opus frames packed into Protobuf messages.
NOTE: each Opus frame is packed into separate message with `audio_content` field. I. e., you can't just concatenate encoded Opus frames and push it as a single chunk into Opus decoder. Also although Opus is sample rate agnostic, estimated duration of synthesized audio is calculated in samples of specified sample rate.
NOTE: Not supported in the Synthesize method. @@ -317,7 +313,7 @@ type AudioConfig struct { unknownFields protoimpl.UnknownFields AudioEncoding AudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=tinkoff.cloud.tts.v1.AudioEncoding" json:"audio_encoding,omitempty"` // Audio encoding. Specifies both container and codec. Must be specified explicitly. - SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // Sample rate of generated audio in Hertz. Must be specified explicitly. + SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // Sample rate of generated audio in Hertz. Must be specified explicitly. Only sample rates in inclusive range from 1000 Hz to 48000 Hz are supported. } func (x *AudioConfig) Reset() { @@ -628,13 +624,13 @@ var file_tinkoff_cloud_tts_v1_tts_proto_rawDesc = []byte{ 0x1a, 0x37, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x5b, 0x5a, 0x51, 0x67, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x4e, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x69, 0x6e, 0x6b, 0x6f, 0x66, - 0x66, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x76, - 0x6f, 0x69, 0x63, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, - 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6e, 0x6b, - 0x6f, 0x66, 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x74, 0x73, 0x2f, 0x76, 0x31, - 0xa2, 0x02, 0x05, 0x54, 0x56, 0x4b, 0x53, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2f, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, + 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x74, 0x73, + 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x05, 0x54, 0x56, 0x4b, 0x53, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -817,183 +813,3 @@ func file_tinkoff_cloud_tts_v1_tts_proto_init() { file_tinkoff_cloud_tts_v1_tts_proto_goTypes = nil file_tinkoff_cloud_tts_v1_tts_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TextToSpeechClient is the client API for TextToSpeech service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TextToSpeechClient interface { - ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponses, error) - Synthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) - StreamingSynthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (TextToSpeech_StreamingSynthesizeClient, error) -} - -type textToSpeechClient struct { - cc grpc.ClientConnInterface -} - -func NewTextToSpeechClient(cc grpc.ClientConnInterface) TextToSpeechClient { - return &textToSpeechClient{cc} -} - -func (c *textToSpeechClient) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponses, error) { - out := new(ListVoicesResponses) - err := c.cc.Invoke(ctx, "/tinkoff.cloud.tts.v1.TextToSpeech/ListVoices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *textToSpeechClient) Synthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) { - out := new(SynthesizeSpeechResponse) - err := c.cc.Invoke(ctx, "/tinkoff.cloud.tts.v1.TextToSpeech/Synthesize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *textToSpeechClient) StreamingSynthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (TextToSpeech_StreamingSynthesizeClient, error) { - stream, err := c.cc.NewStream(ctx, &_TextToSpeech_serviceDesc.Streams[0], "/tinkoff.cloud.tts.v1.TextToSpeech/StreamingSynthesize", opts...) - if err != nil { - return nil, err - } - x := &textToSpeechStreamingSynthesizeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type TextToSpeech_StreamingSynthesizeClient interface { - Recv() (*StreamingSynthesizeSpeechResponse, error) - grpc.ClientStream -} - -type textToSpeechStreamingSynthesizeClient struct { - grpc.ClientStream -} - -func (x *textToSpeechStreamingSynthesizeClient) Recv() (*StreamingSynthesizeSpeechResponse, error) { - m := new(StreamingSynthesizeSpeechResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// TextToSpeechServer is the server API for TextToSpeech service. -type TextToSpeechServer interface { - ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error) - Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error) - StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error -} - -// UnimplementedTextToSpeechServer can be embedded to have forward compatible implementations. -type UnimplementedTextToSpeechServer struct { -} - -func (*UnimplementedTextToSpeechServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListVoices not implemented") -} -func (*UnimplementedTextToSpeechServer) Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Synthesize not implemented") -} -func (*UnimplementedTextToSpeechServer) StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error { - return status.Errorf(codes.Unimplemented, "method StreamingSynthesize not implemented") -} - -func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer) { - s.RegisterService(&_TextToSpeech_serviceDesc, srv) -} - -func _TextToSpeech_ListVoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListVoicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TextToSpeechServer).ListVoices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tinkoff.cloud.tts.v1.TextToSpeech/ListVoices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TextToSpeechServer).ListVoices(ctx, req.(*ListVoicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TextToSpeech_Synthesize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SynthesizeSpeechRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TextToSpeechServer).Synthesize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tinkoff.cloud.tts.v1.TextToSpeech/Synthesize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TextToSpeechServer).Synthesize(ctx, req.(*SynthesizeSpeechRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TextToSpeech_StreamingSynthesize_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SynthesizeSpeechRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(TextToSpeechServer).StreamingSynthesize(m, &textToSpeechStreamingSynthesizeServer{stream}) -} - -type TextToSpeech_StreamingSynthesizeServer interface { - Send(*StreamingSynthesizeSpeechResponse) error - grpc.ServerStream -} - -type textToSpeechStreamingSynthesizeServer struct { - grpc.ServerStream -} - -func (x *textToSpeechStreamingSynthesizeServer) Send(m *StreamingSynthesizeSpeechResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _TextToSpeech_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tinkoff.cloud.tts.v1.TextToSpeech", - HandlerType: (*TextToSpeechServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListVoices", - Handler: _TextToSpeech_ListVoices_Handler, - }, - { - MethodName: "Synthesize", - Handler: _TextToSpeech_Synthesize_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamingSynthesize", - Handler: _TextToSpeech_StreamingSynthesize_Handler, - ServerStreams: true, - }, - }, - Metadata: "tinkoff/cloud/tts/v1/tts.proto", -} diff --git a/golang/pkg/tinkoff/cloud/tts/v1/tts_grpc.pb.go b/golang/pkg/tinkoff/cloud/tts/v1/tts_grpc.pb.go new file mode 100644 index 0000000..feab135 --- /dev/null +++ b/golang/pkg/tinkoff/cloud/tts/v1/tts_grpc.pb.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: tinkoff/cloud/tts/v1/tts.proto + +package v1 + +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 + +// TextToSpeechClient is the client API for TextToSpeech 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 TextToSpeechClient interface { + ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponses, error) + Synthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) + StreamingSynthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (TextToSpeech_StreamingSynthesizeClient, error) +} + +type textToSpeechClient struct { + cc grpc.ClientConnInterface +} + +func NewTextToSpeechClient(cc grpc.ClientConnInterface) TextToSpeechClient { + return &textToSpeechClient{cc} +} + +func (c *textToSpeechClient) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponses, error) { + out := new(ListVoicesResponses) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.tts.v1.TextToSpeech/ListVoices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *textToSpeechClient) Synthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) { + out := new(SynthesizeSpeechResponse) + err := c.cc.Invoke(ctx, "/tinkoff.cloud.tts.v1.TextToSpeech/Synthesize", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *textToSpeechClient) StreamingSynthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (TextToSpeech_StreamingSynthesizeClient, error) { + stream, err := c.cc.NewStream(ctx, &TextToSpeech_ServiceDesc.Streams[0], "/tinkoff.cloud.tts.v1.TextToSpeech/StreamingSynthesize", opts...) + if err != nil { + return nil, err + } + x := &textToSpeechStreamingSynthesizeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type TextToSpeech_StreamingSynthesizeClient interface { + Recv() (*StreamingSynthesizeSpeechResponse, error) + grpc.ClientStream +} + +type textToSpeechStreamingSynthesizeClient struct { + grpc.ClientStream +} + +func (x *textToSpeechStreamingSynthesizeClient) Recv() (*StreamingSynthesizeSpeechResponse, error) { + m := new(StreamingSynthesizeSpeechResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TextToSpeechServer is the server API for TextToSpeech service. +// All implementations must embed UnimplementedTextToSpeechServer +// for forward compatibility +type TextToSpeechServer interface { + ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error) + Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error) + StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error + mustEmbedUnimplementedTextToSpeechServer() +} + +// UnimplementedTextToSpeechServer must be embedded to have forward compatible implementations. +type UnimplementedTextToSpeechServer struct { +} + +func (UnimplementedTextToSpeechServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVoices not implemented") +} +func (UnimplementedTextToSpeechServer) Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Synthesize not implemented") +} +func (UnimplementedTextToSpeechServer) StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error { + return status.Errorf(codes.Unimplemented, "method StreamingSynthesize not implemented") +} +func (UnimplementedTextToSpeechServer) mustEmbedUnimplementedTextToSpeechServer() {} + +// UnsafeTextToSpeechServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TextToSpeechServer will +// result in compilation errors. +type UnsafeTextToSpeechServer interface { + mustEmbedUnimplementedTextToSpeechServer() +} + +func RegisterTextToSpeechServer(s grpc.ServiceRegistrar, srv TextToSpeechServer) { + s.RegisterService(&TextToSpeech_ServiceDesc, srv) +} + +func _TextToSpeech_ListVoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVoicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TextToSpeechServer).ListVoices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.tts.v1.TextToSpeech/ListVoices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TextToSpeechServer).ListVoices(ctx, req.(*ListVoicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TextToSpeech_Synthesize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SynthesizeSpeechRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TextToSpeechServer).Synthesize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tinkoff.cloud.tts.v1.TextToSpeech/Synthesize", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TextToSpeechServer).Synthesize(ctx, req.(*SynthesizeSpeechRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TextToSpeech_StreamingSynthesize_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SynthesizeSpeechRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TextToSpeechServer).StreamingSynthesize(m, &textToSpeechStreamingSynthesizeServer{stream}) +} + +type TextToSpeech_StreamingSynthesizeServer interface { + Send(*StreamingSynthesizeSpeechResponse) error + grpc.ServerStream +} + +type textToSpeechStreamingSynthesizeServer struct { + grpc.ServerStream +} + +func (x *textToSpeechStreamingSynthesizeServer) Send(m *StreamingSynthesizeSpeechResponse) error { + return x.ServerStream.SendMsg(m) +} + +// TextToSpeech_ServiceDesc is the grpc.ServiceDesc for TextToSpeech service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TextToSpeech_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tinkoff.cloud.tts.v1.TextToSpeech", + HandlerType: (*TextToSpeechServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListVoices", + Handler: _TextToSpeech_ListVoices_Handler, + }, + { + MethodName: "Synthesize", + Handler: _TextToSpeech_Synthesize_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamingSynthesize", + Handler: _TextToSpeech_StreamingSynthesize_Handler, + ServerStreams: true, + }, + }, + Metadata: "tinkoff/cloud/tts/v1/tts.proto", +} From 273a63e4cf11841339108cdcdf8b485b7c96298a Mon Sep 17 00:00:00 2001 From: Bezrukov Ilya <31384675+qwertBR@users.noreply.github.com> Date: Fri, 4 Mar 2022 16:14:47 +0300 Subject: [PATCH 2/2] delete some logs in generate file delete echo logs --- golang/generate_protobuf.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/golang/generate_protobuf.sh b/golang/generate_protobuf.sh index 3844640..2529a18 100755 --- a/golang/generate_protobuf.sh +++ b/golang/generate_protobuf.sh @@ -3,7 +3,6 @@ set -e if ! [[ -x "$(command -v protoc-gen-go)" ]]; then - echo "kek" go get -u google.golang.org/protobuf/cmd/protoc-gen-go go install google.golang.org/protobuf/cmd/protoc-gen-go @@ -15,7 +14,6 @@ fi if ! [[ -x "$(command -v protoc-gen-go-grpc)" ]]; then - echo "lol" go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc go install google.golang.org/grpc/cmd/protoc-gen-go-grpc @@ -39,4 +37,4 @@ rm -rf pkg/tinkoff mv temp/github.com/Tinkoff/voicekit-examples/golang/pkg/* pkg -rm -rf temp/ \ No newline at end of file +rm -rf temp/