diff --git a/client/auxiliary.go b/client/auxiliary.go new file mode 100644 index 000000000..59b3f5238 --- /dev/null +++ b/client/auxiliary.go @@ -0,0 +1,586 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package client + +import ( + "context" + "time" + + "cloud.google.com/go/longrunning" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + genprotopb "github.com/googleapis/gapic-showcase/server/genproto" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// SearchBlurbsOperation manages a long-running operation from SearchBlurbs. +type SearchBlurbsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *SearchBlurbsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp genprotopb.SearchBlurbsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *SearchBlurbsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp genprotopb.SearchBlurbsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *SearchBlurbsOperation) Metadata() (*genprotopb.SearchBlurbsMetadata, error) { + var meta genprotopb.SearchBlurbsMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *SearchBlurbsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *SearchBlurbsOperation) Name() string { + return op.lro.Name() +} + +// WaitOperation manages a long-running operation from Wait. +type WaitOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *WaitOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp genprotopb.WaitResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *WaitOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp genprotopb.WaitResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *WaitOperation) Metadata() (*genprotopb.WaitMetadata, error) { + var meta genprotopb.WaitMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *WaitOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *WaitOperation) Name() string { + return op.lro.Name() +} + +// BlurbIterator manages a stream of *genprotopb.Blurb. +type BlurbIterator struct { + items []*genprotopb.Blurb + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Blurb, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *BlurbIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *BlurbIterator) Next() (*genprotopb.Blurb, error) { + var item *genprotopb.Blurb + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *BlurbIterator) bufLen() int { + return len(it.items) +} + +func (it *BlurbIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// EchoResponseIterator manages a stream of *genprotopb.EchoResponse. +type EchoResponseIterator struct { + items []*genprotopb.EchoResponse + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.EchoResponse, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *EchoResponseIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *EchoResponseIterator) Next() (*genprotopb.EchoResponse, error) { + var item *genprotopb.EchoResponse + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *EchoResponseIterator) bufLen() int { + return len(it.items) +} + +func (it *EchoResponseIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// PagedExpandResponseListPair is a holder type for string/*genprotopb.PagedExpandResponseList map entries +type PagedExpandResponseListPair struct { + Key string + Value *genprotopb.PagedExpandResponseList +} + +// PagedExpandResponseListPairIterator manages a stream of PagedExpandResponseListPair. +type PagedExpandResponseListPairIterator struct { + items []PagedExpandResponseListPair + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []PagedExpandResponseListPair, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *PagedExpandResponseListPairIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *PagedExpandResponseListPairIterator) Next() (PagedExpandResponseListPair, error) { + var item PagedExpandResponseListPair + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *PagedExpandResponseListPairIterator) bufLen() int { + return len(it.items) +} + +func (it *PagedExpandResponseListPairIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// RoomIterator manages a stream of *genprotopb.Room. +type RoomIterator struct { + items []*genprotopb.Room + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Room, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *RoomIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *RoomIterator) Next() (*genprotopb.Room, error) { + var item *genprotopb.Room + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *RoomIterator) bufLen() int { + return len(it.items) +} + +func (it *RoomIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// SessionIterator manages a stream of *genprotopb.Session. +type SessionIterator struct { + items []*genprotopb.Session + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Session, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SessionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *SessionIterator) Next() (*genprotopb.Session, error) { + var item *genprotopb.Session + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SessionIterator) bufLen() int { + return len(it.items) +} + +func (it *SessionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TestIterator manages a stream of *genprotopb.Test. +type TestIterator struct { + items []*genprotopb.Test + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Test, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TestIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *TestIterator) Next() (*genprotopb.Test, error) { + var item *genprotopb.Test + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TestIterator) bufLen() int { + return len(it.items) +} + +func (it *TestIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// UserIterator manages a stream of *genprotopb.User. +type UserIterator struct { + items []*genprotopb.User + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.User, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *UserIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *UserIterator) Next() (*genprotopb.User, error) { + var item *genprotopb.User + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *UserIterator) bufLen() int { + return len(it.items) +} + +func (it *UserIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/client/compliance_client.go b/client/compliance_client.go index 2cdfecedb..b57957d6b 100644 --- a/client/compliance_client.go +++ b/client/compliance_client.go @@ -2719,97 +2719,3 @@ func (c *complianceRESTClient) CancelOperation(ctx context.Context, req *longrun return googleapi.CheckResponse(httpRsp) }, opts...) } - -// LocationIterator manages a stream of *locationpb.Location. -type LocationIterator struct { - items []*locationpb.Location - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *LocationIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *LocationIterator) Next() (*locationpb.Location, error) { - var item *locationpb.Location - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *LocationIterator) bufLen() int { - return len(it.items) -} - -func (it *LocationIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// OperationIterator manages a stream of *longrunningpb.Operation. -type OperationIterator struct { - items []*longrunningpb.Operation - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *OperationIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { - var item *longrunningpb.Operation - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *OperationIterator) bufLen() int { - return len(it.items) -} - -func (it *OperationIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/client/compliance_client_example_test.go b/client/compliance_client_example_test.go index 518dbdddb..ff73d151a 100644 --- a/client/compliance_client_example_test.go +++ b/client/compliance_client_example_test.go @@ -61,7 +61,7 @@ func ExampleNewComplianceRESTClient() { _ = c } -func ExampleComplianceClient_RepeatDataBody() { +func ExampleComplianceClient_GetEnum() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -74,11 +74,11 @@ func ExampleComplianceClient_RepeatDataBody() { } defer c.Close() - req := &genprotopb.RepeatRequest{ + req := &genprotopb.EnumRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumRequest. } - resp, err := c.RepeatDataBody(ctx, req) + resp, err := c.GetEnum(ctx, req) if err != nil { // TODO: Handle error. } @@ -86,7 +86,7 @@ func ExampleComplianceClient_RepeatDataBody() { _ = resp } -func ExampleComplianceClient_RepeatDataBodyInfo() { +func ExampleComplianceClient_RepeatDataBody() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -103,7 +103,7 @@ func ExampleComplianceClient_RepeatDataBodyInfo() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataBodyInfo(ctx, req) + resp, err := c.RepeatDataBody(ctx, req) if err != nil { // TODO: Handle error. } @@ -111,7 +111,7 @@ func ExampleComplianceClient_RepeatDataBodyInfo() { _ = resp } -func ExampleComplianceClient_RepeatDataQuery() { +func ExampleComplianceClient_RepeatDataBodyInfo() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -128,7 +128,7 @@ func ExampleComplianceClient_RepeatDataQuery() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataQuery(ctx, req) + resp, err := c.RepeatDataBodyInfo(ctx, req) if err != nil { // TODO: Handle error. } @@ -136,7 +136,7 @@ func ExampleComplianceClient_RepeatDataQuery() { _ = resp } -func ExampleComplianceClient_RepeatDataSimplePath() { +func ExampleComplianceClient_RepeatDataBodyPatch() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -153,7 +153,7 @@ func ExampleComplianceClient_RepeatDataSimplePath() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataSimplePath(ctx, req) + resp, err := c.RepeatDataBodyPatch(ctx, req) if err != nil { // TODO: Handle error. } @@ -161,7 +161,7 @@ func ExampleComplianceClient_RepeatDataSimplePath() { _ = resp } -func ExampleComplianceClient_RepeatDataPathResource() { +func ExampleComplianceClient_RepeatDataBodyPut() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -178,7 +178,7 @@ func ExampleComplianceClient_RepeatDataPathResource() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataPathResource(ctx, req) + resp, err := c.RepeatDataBodyPut(ctx, req) if err != nil { // TODO: Handle error. } @@ -186,7 +186,7 @@ func ExampleComplianceClient_RepeatDataPathResource() { _ = resp } -func ExampleComplianceClient_RepeatDataPathTrailingResource() { +func ExampleComplianceClient_RepeatDataPathResource() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -203,7 +203,7 @@ func ExampleComplianceClient_RepeatDataPathTrailingResource() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataPathTrailingResource(ctx, req) + resp, err := c.RepeatDataPathResource(ctx, req) if err != nil { // TODO: Handle error. } @@ -211,7 +211,7 @@ func ExampleComplianceClient_RepeatDataPathTrailingResource() { _ = resp } -func ExampleComplianceClient_RepeatDataBodyPut() { +func ExampleComplianceClient_RepeatDataPathTrailingResource() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -228,7 +228,7 @@ func ExampleComplianceClient_RepeatDataBodyPut() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataBodyPut(ctx, req) + resp, err := c.RepeatDataPathTrailingResource(ctx, req) if err != nil { // TODO: Handle error. } @@ -236,7 +236,7 @@ func ExampleComplianceClient_RepeatDataBodyPut() { _ = resp } -func ExampleComplianceClient_RepeatDataBodyPatch() { +func ExampleComplianceClient_RepeatDataQuery() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -253,7 +253,7 @@ func ExampleComplianceClient_RepeatDataBodyPatch() { // TODO: Fill request struct fields. // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.RepeatDataBodyPatch(ctx, req) + resp, err := c.RepeatDataQuery(ctx, req) if err != nil { // TODO: Handle error. } @@ -261,7 +261,7 @@ func ExampleComplianceClient_RepeatDataBodyPatch() { _ = resp } -func ExampleComplianceClient_GetEnum() { +func ExampleComplianceClient_RepeatDataSimplePath() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -274,11 +274,11 @@ func ExampleComplianceClient_GetEnum() { } defer c.Close() - req := &genprotopb.EnumRequest{ + req := &genprotopb.RepeatRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. } - resp, err := c.GetEnum(ctx, req) + resp, err := c.RepeatDataSimplePath(ctx, req) if err != nil { // TODO: Handle error. } diff --git a/client/doc.go b/client/doc.go index 7a0268833..8afb7466c 100644 --- a/client/doc.go +++ b/client/doc.go @@ -68,11 +68,11 @@ // } // defer c.Close() // -// req := &genprotopb.RepeatRequest{ +// req := &genprotopb.EnumRequest{ // // TODO: Fill request struct fields. -// // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#RepeatRequest. +// // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EnumRequest. // } -// resp, err := c.RepeatDataBody(ctx, req) +// resp, err := c.GetEnum(ctx, req) // if err != nil { // // TODO: Handle error. // } diff --git a/client/echo_client.go b/client/echo_client.go index ee34034db..7c734dbad 100644 --- a/client/echo_client.go +++ b/client/echo_client.go @@ -54,6 +54,7 @@ var newEchoClientHook clientHook // EchoCallOptions contains the retry settings for each method of EchoClient. type EchoCallOptions struct { Echo []gax.CallOption + EchoErrorDetails []gax.CallOption Expand []gax.CallOption Collect []gax.CallOption Chat []gax.CallOption @@ -100,6 +101,9 @@ func defaultEchoCallOptions() *EchoCallOptions { }) }), }, + EchoErrorDetails: []gax.CallOption{ + gax.WithTimeout(5000 * time.Millisecond), + }, Expand: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -165,6 +169,9 @@ func defaultEchoRESTCallOptions() *EchoCallOptions { http.StatusInternalServerError) }), }, + EchoErrorDetails: []gax.CallOption{ + gax.WithTimeout(5000 * time.Millisecond), + }, Expand: []gax.CallOption{ gax.WithTimeout(10000 * time.Millisecond), gax.WithRetry(func() gax.Retryer { @@ -225,6 +232,7 @@ type internalEchoClient interface { setGoogleClientInfo(...string) Connection() *grpc.ClientConn Echo(context.Context, *genprotopb.EchoRequest, ...gax.CallOption) (*genprotopb.EchoResponse, error) + EchoErrorDetails(context.Context, *genprotopb.EchoErrorDetailsRequest, ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) Expand(context.Context, *genprotopb.ExpandRequest, ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) Collect(context.Context, ...gax.CallOption) (genprotopb.Echo_CollectClient, error) Chat(context.Context, ...gax.CallOption) (genprotopb.Echo_ChatClient, error) @@ -296,6 +304,16 @@ func (c *EchoClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, opts return c.internalClient.Echo(ctx, req, opts...) } +// EchoErrorDetails this method returns error details in a repeated “google.protobuf.Any” +// field. This method showcases handling errors thus encoded, particularly +// over REST transport. Note that GAPICs only allow the type +// “google.protobuf.Any” for field paths ending in “error.details”, and, at +// run-time, the actual types for these fields must be one of the types in +// google/rpc/error_details.proto. +func (c *EchoClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) { + return c.internalClient.EchoErrorDetails(ctx, req, opts...) +} + // Expand this method splits the given content into words and will pass each word back // through the stream. This method showcases server-side streaming RPCs. func (c *EchoClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) { @@ -646,6 +664,21 @@ func (c *echoGRPCClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, return resp, nil } +func (c *echoGRPCClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) { + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + opts = append((*c.CallOptions).EchoErrorDetails[0:len((*c.CallOptions).EchoErrorDetails):len((*c.CallOptions).EchoErrorDetails)], opts...) + var resp *genprotopb.EchoErrorDetailsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.echoClient.EchoErrorDetails(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *echoGRPCClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) { ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) opts = append((*c.CallOptions).Expand[0:len((*c.CallOptions).Expand):len((*c.CallOptions).Expand)], opts...) @@ -1157,6 +1190,69 @@ func (c *echoRESTClient) Echo(ctx context.Context, req *genprotopb.EchoRequest, return resp, nil } +// EchoErrorDetails this method returns error details in a repeated “google.protobuf.Any” +// field. This method showcases handling errors thus encoded, particularly +// over REST transport. Note that GAPICs only allow the type +// “google.protobuf.Any” for field paths ending in “error.details”, and, at +// run-time, the actual types for these fields must be one of the types in +// google/rpc/error_details.proto. +func (c *echoRESTClient) EchoErrorDetails(ctx context.Context, req *genprotopb.EchoErrorDetailsRequest, opts ...gax.CallOption) (*genprotopb.EchoErrorDetailsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/echo:error-details") + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).EchoErrorDetails[0:len((*c.CallOptions).EchoErrorDetails):len((*c.CallOptions).EchoErrorDetails)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &genprotopb.EchoErrorDetailsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // Expand this method splits the given content into words and will pass each word back // through the stream. This method showcases server-side streaming RPCs. func (c *echoRESTClient) Expand(ctx context.Context, req *genprotopb.ExpandRequest, opts ...gax.CallOption) (genprotopb.Echo_ExpandClient, error) { @@ -2216,12 +2312,6 @@ func (c *echoRESTClient) CancelOperation(ctx context.Context, req *longrunningpb }, opts...) } -// WaitOperation manages a long-running operation from Wait. -type WaitOperation struct { - lro *longrunning.Operation - pollPath string -} - // WaitOperation returns a new WaitOperation from a given name. // The name must be that of a previously created WaitOperation, possibly from a different process. func (c *echoGRPCClient) WaitOperation(name string) *WaitOperation { @@ -2239,161 +2329,3 @@ func (c *echoRESTClient) WaitOperation(name string) *WaitOperation { pollPath: override, } } - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *WaitOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp genprotopb.WaitResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *WaitOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.WaitResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp genprotopb.WaitResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *WaitOperation) Metadata() (*genprotopb.WaitMetadata, error) { - var meta genprotopb.WaitMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *WaitOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *WaitOperation) Name() string { - return op.lro.Name() -} - -// EchoResponseIterator manages a stream of *genprotopb.EchoResponse. -type EchoResponseIterator struct { - items []*genprotopb.EchoResponse - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.EchoResponse, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *EchoResponseIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *EchoResponseIterator) Next() (*genprotopb.EchoResponse, error) { - var item *genprotopb.EchoResponse - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *EchoResponseIterator) bufLen() int { - return len(it.items) -} - -func (it *EchoResponseIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// PagedExpandResponseListPair is a holder type for string/*genprotopb.PagedExpandResponseList map entries -type PagedExpandResponseListPair struct { - Key string - Value *genprotopb.PagedExpandResponseList -} - -// PagedExpandResponseListPairIterator manages a stream of PagedExpandResponseListPair. -type PagedExpandResponseListPairIterator struct { - items []PagedExpandResponseListPair - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []PagedExpandResponseListPair, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *PagedExpandResponseListPairIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *PagedExpandResponseListPairIterator) Next() (PagedExpandResponseListPair, error) { - var item PagedExpandResponseListPair - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *PagedExpandResponseListPairIterator) bufLen() int { - return len(it.items) -} - -func (it *PagedExpandResponseListPairIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/client/echo_client_example_test.go b/client/echo_client_example_test.go index 4537828be..14bff1e53 100644 --- a/client/echo_client_example_test.go +++ b/client/echo_client_example_test.go @@ -62,7 +62,7 @@ func ExampleNewEchoRESTClient() { _ = c } -func ExampleEchoClient_Echo() { +func ExampleEchoClient_Block() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -75,11 +75,11 @@ func ExampleEchoClient_Echo() { } defer c.Close() - req := &genprotopb.EchoRequest{ + req := &genprotopb.BlockRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EchoRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#BlockRequest. } - resp, err := c.Echo(ctx, req) + resp, err := c.Block(ctx, req) if err != nil { // TODO: Handle error. } @@ -127,6 +127,56 @@ func ExampleEchoClient_Chat() { } } +func ExampleEchoClient_Echo() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := client.NewEchoClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &genprotopb.EchoRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EchoRequest. + } + resp, err := c.Echo(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEchoClient_EchoErrorDetails() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := client.NewEchoClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &genprotopb.EchoErrorDetailsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#EchoErrorDetailsRequest. + } + resp, err := c.EchoErrorDetails(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleEchoClient_PagedExpand() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. @@ -250,31 +300,6 @@ func ExampleEchoClient_Wait() { _ = resp } -func ExampleEchoClient_Block() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := client.NewEchoClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &genprotopb.BlockRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#BlockRequest. - } - resp, err := c.Block(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - func ExampleEchoClient_ListLocations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. diff --git a/client/gapic_metadata.json b/client/gapic_metadata.json index 9b27da6a1..45420439f 100644 --- a/client/gapic_metadata.json +++ b/client/gapic_metadata.json @@ -244,6 +244,11 @@ "Echo" ] }, + "EchoErrorDetails": { + "methods": [ + "EchoErrorDetails" + ] + }, "Expand": { "methods": [ "Expand" @@ -339,6 +344,11 @@ "Echo" ] }, + "EchoErrorDetails": { + "methods": [ + "EchoErrorDetails" + ] + }, "Expand": { "methods": [ "Expand" diff --git a/client/identity_client.go b/client/identity_client.go index ef08e8f75..c4e869d3f 100644 --- a/client/identity_client.go +++ b/client/identity_client.go @@ -1612,50 +1612,3 @@ func (c *identityRESTClient) CancelOperation(ctx context.Context, req *longrunni return googleapi.CheckResponse(httpRsp) }, opts...) } - -// UserIterator manages a stream of *genprotopb.User. -type UserIterator struct { - items []*genprotopb.User - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.User, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *UserIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *UserIterator) Next() (*genprotopb.User, error) { - var item *genprotopb.User - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *UserIterator) bufLen() int { - return len(it.items) -} - -func (it *UserIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/client/identity_client_example_test.go b/client/identity_client_example_test.go index 7bcb64d1d..f99bbf91e 100644 --- a/client/identity_client_example_test.go +++ b/client/identity_client_example_test.go @@ -86,7 +86,7 @@ func ExampleIdentityClient_CreateUser() { _ = resp } -func ExampleIdentityClient_GetUser() { +func ExampleIdentityClient_DeleteUser() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -99,19 +99,17 @@ func ExampleIdentityClient_GetUser() { } defer c.Close() - req := &genprotopb.GetUserRequest{ + req := &genprotopb.DeleteUserRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetUserRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteUserRequest. } - resp, err := c.GetUser(ctx, req) + err = c.DeleteUser(ctx, req) if err != nil { // TODO: Handle error. } - // TODO: Use resp. - _ = resp } -func ExampleIdentityClient_UpdateUser() { +func ExampleIdentityClient_GetUser() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -124,11 +122,11 @@ func ExampleIdentityClient_UpdateUser() { } defer c.Close() - req := &genprotopb.UpdateUserRequest{ + req := &genprotopb.GetUserRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateUserRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetUserRequest. } - resp, err := c.UpdateUser(ctx, req) + resp, err := c.GetUser(ctx, req) if err != nil { // TODO: Handle error. } @@ -136,7 +134,7 @@ func ExampleIdentityClient_UpdateUser() { _ = resp } -func ExampleIdentityClient_DeleteUser() { +func ExampleIdentityClient_ListUsers() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -149,17 +147,25 @@ func ExampleIdentityClient_DeleteUser() { } defer c.Close() - req := &genprotopb.DeleteUserRequest{ + req := &genprotopb.ListUsersRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteUserRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListUsersRequest. } - err = c.DeleteUser(ctx, req) - if err != nil { - // TODO: Handle error. + it := c.ListUsers(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp } } -func ExampleIdentityClient_ListUsers() { +func ExampleIdentityClient_UpdateUser() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -172,22 +178,16 @@ func ExampleIdentityClient_ListUsers() { } defer c.Close() - req := &genprotopb.ListUsersRequest{ + req := &genprotopb.UpdateUserRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListUsersRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateUserRequest. } - it := c.ListUsers(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp + resp, err := c.UpdateUser(ctx, req) + if err != nil { + // TODO: Handle error. } + // TODO: Use resp. + _ = resp } func ExampleIdentityClient_ListLocations() { diff --git a/client/messaging_client.go b/client/messaging_client.go index 0dc64e9e6..48223212b 100644 --- a/client/messaging_client.go +++ b/client/messaging_client.go @@ -2568,12 +2568,6 @@ func (c *messagingRESTClient) CancelOperation(ctx context.Context, req *longrunn }, opts...) } -// SearchBlurbsOperation manages a long-running operation from SearchBlurbs. -type SearchBlurbsOperation struct { - lro *longrunning.Operation - pollPath string -} - // SearchBlurbsOperation returns a new SearchBlurbsOperation from a given name. // The name must be that of a previously created SearchBlurbsOperation, possibly from a different process. func (c *messagingGRPCClient) SearchBlurbsOperation(name string) *SearchBlurbsOperation { @@ -2591,155 +2585,3 @@ func (c *messagingRESTClient) SearchBlurbsOperation(name string) *SearchBlurbsOp pollPath: override, } } - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *SearchBlurbsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp genprotopb.SearchBlurbsResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *SearchBlurbsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*genprotopb.SearchBlurbsResponse, error) { - opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) - var resp genprotopb.SearchBlurbsResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } - return &resp, nil -} - -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *SearchBlurbsOperation) Metadata() (*genprotopb.SearchBlurbsMetadata, error) { - var meta genprotopb.SearchBlurbsMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} - -// Done reports whether the long-running operation has completed. -func (op *SearchBlurbsOperation) Done() bool { - return op.lro.Done() -} - -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *SearchBlurbsOperation) Name() string { - return op.lro.Name() -} - -// BlurbIterator manages a stream of *genprotopb.Blurb. -type BlurbIterator struct { - items []*genprotopb.Blurb - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Blurb, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *BlurbIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *BlurbIterator) Next() (*genprotopb.Blurb, error) { - var item *genprotopb.Blurb - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *BlurbIterator) bufLen() int { - return len(it.items) -} - -func (it *BlurbIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// RoomIterator manages a stream of *genprotopb.Room. -type RoomIterator struct { - items []*genprotopb.Room - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Room, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *RoomIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *RoomIterator) Next() (*genprotopb.Room, error) { - var item *genprotopb.Room - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *RoomIterator) bufLen() int { - return len(it.items) -} - -func (it *RoomIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/client/messaging_client_example_test.go b/client/messaging_client_example_test.go index 5cfb0b74d..9472c5a0e 100644 --- a/client/messaging_client_example_test.go +++ b/client/messaging_client_example_test.go @@ -62,7 +62,7 @@ func ExampleNewMessagingRESTClient() { _ = c } -func ExampleMessagingClient_CreateRoom() { +func ExampleMessagingClient_Connect() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -74,20 +74,35 @@ func ExampleMessagingClient_CreateRoom() { // TODO: Handle error. } defer c.Close() - - req := &genprotopb.CreateRoomRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateRoomRequest. - } - resp, err := c.CreateRoom(ctx, req) + stream, err := c.Connect(ctx) if err != nil { // TODO: Handle error. } - // TODO: Use resp. - _ = resp + go func() { + reqs := []*genprotopb.ConnectRequest{ + // TODO: Create requests. + } + for _, req := range reqs { + if err := stream.Send(req); err != nil { + // TODO: Handle error. + } + } + stream.CloseSend() + }() + for { + resp, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + // TODO: handle error. + } + // TODO: Use resp. + _ = resp + } } -func ExampleMessagingClient_GetRoom() { +func ExampleMessagingClient_CreateBlurb() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -100,11 +115,11 @@ func ExampleMessagingClient_GetRoom() { } defer c.Close() - req := &genprotopb.GetRoomRequest{ + req := &genprotopb.CreateBlurbRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetRoomRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateBlurbRequest. } - resp, err := c.GetRoom(ctx, req) + resp, err := c.CreateBlurb(ctx, req) if err != nil { // TODO: Handle error. } @@ -112,7 +127,7 @@ func ExampleMessagingClient_GetRoom() { _ = resp } -func ExampleMessagingClient_UpdateRoom() { +func ExampleMessagingClient_CreateRoom() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -125,11 +140,11 @@ func ExampleMessagingClient_UpdateRoom() { } defer c.Close() - req := &genprotopb.UpdateRoomRequest{ + req := &genprotopb.CreateRoomRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateRoomRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateRoomRequest. } - resp, err := c.UpdateRoom(ctx, req) + resp, err := c.CreateRoom(ctx, req) if err != nil { // TODO: Handle error. } @@ -137,7 +152,7 @@ func ExampleMessagingClient_UpdateRoom() { _ = resp } -func ExampleMessagingClient_DeleteRoom() { +func ExampleMessagingClient_DeleteBlurb() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -150,48 +165,17 @@ func ExampleMessagingClient_DeleteRoom() { } defer c.Close() - req := &genprotopb.DeleteRoomRequest{ + req := &genprotopb.DeleteBlurbRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteRoomRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteBlurbRequest. } - err = c.DeleteRoom(ctx, req) + err = c.DeleteBlurb(ctx, req) if err != nil { // TODO: Handle error. } } -func ExampleMessagingClient_ListRooms() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := client.NewMessagingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &genprotopb.ListRoomsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListRoomsRequest. - } - it := c.ListRooms(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -func ExampleMessagingClient_CreateBlurb() { +func ExampleMessagingClient_DeleteRoom() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -204,16 +188,14 @@ func ExampleMessagingClient_CreateBlurb() { } defer c.Close() - req := &genprotopb.CreateBlurbRequest{ + req := &genprotopb.DeleteRoomRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateBlurbRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteRoomRequest. } - resp, err := c.CreateBlurb(ctx, req) + err = c.DeleteRoom(ctx, req) if err != nil { // TODO: Handle error. } - // TODO: Use resp. - _ = resp } func ExampleMessagingClient_GetBlurb() { @@ -241,7 +223,7 @@ func ExampleMessagingClient_GetBlurb() { _ = resp } -func ExampleMessagingClient_UpdateBlurb() { +func ExampleMessagingClient_GetRoom() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -254,11 +236,11 @@ func ExampleMessagingClient_UpdateBlurb() { } defer c.Close() - req := &genprotopb.UpdateBlurbRequest{ + req := &genprotopb.GetRoomRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateBlurbRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetRoomRequest. } - resp, err := c.UpdateBlurb(ctx, req) + resp, err := c.GetRoom(ctx, req) if err != nil { // TODO: Handle error. } @@ -266,7 +248,7 @@ func ExampleMessagingClient_UpdateBlurb() { _ = resp } -func ExampleMessagingClient_DeleteBlurb() { +func ExampleMessagingClient_ListBlurbs() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -279,17 +261,25 @@ func ExampleMessagingClient_DeleteBlurb() { } defer c.Close() - req := &genprotopb.DeleteBlurbRequest{ + req := &genprotopb.ListBlurbsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteBlurbRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListBlurbsRequest. } - err = c.DeleteBlurb(ctx, req) - if err != nil { - // TODO: Handle error. + it := c.ListBlurbs(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp } } -func ExampleMessagingClient_ListBlurbs() { +func ExampleMessagingClient_ListRooms() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -302,11 +292,11 @@ func ExampleMessagingClient_ListBlurbs() { } defer c.Close() - req := &genprotopb.ListBlurbsRequest{ + req := &genprotopb.ListRoomsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListBlurbsRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListRoomsRequest. } - it := c.ListBlurbs(ctx, req) + it := c.ListRooms(ctx, req) for { resp, err := it.Next() if err == iterator.Done { @@ -350,7 +340,7 @@ func ExampleMessagingClient_SearchBlurbs() { _ = resp } -func ExampleMessagingClient_Connect() { +func ExampleMessagingClient_UpdateBlurb() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -362,32 +352,42 @@ func ExampleMessagingClient_Connect() { // TODO: Handle error. } defer c.Close() - stream, err := c.Connect(ctx) + + req := &genprotopb.UpdateBlurbRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateBlurbRequest. + } + resp, err := c.UpdateBlurb(ctx, req) if err != nil { // TODO: Handle error. } - go func() { - reqs := []*genprotopb.ConnectRequest{ - // TODO: Create requests. - } - for _, req := range reqs { - if err := stream.Send(req); err != nil { - // TODO: Handle error. - } - } - stream.CloseSend() - }() - for { - resp, err := stream.Recv() - if err == io.EOF { - break - } - if err != nil { - // TODO: handle error. - } - // TODO: Use resp. - _ = resp + // TODO: Use resp. + _ = resp +} + +func ExampleMessagingClient_UpdateRoom() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := client.NewMessagingClient(ctx) + if err != nil { + // TODO: Handle error. } + defer c.Close() + + req := &genprotopb.UpdateRoomRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#UpdateRoomRequest. + } + resp, err := c.UpdateRoom(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp } func ExampleMessagingClient_ListLocations() { diff --git a/client/sequence_client_example_test.go b/client/sequence_client_example_test.go index b5e985929..ba5635c48 100644 --- a/client/sequence_client_example_test.go +++ b/client/sequence_client_example_test.go @@ -61,7 +61,7 @@ func ExampleNewSequenceRESTClient() { _ = c } -func ExampleSequenceClient_CreateSequence() { +func ExampleSequenceClient_AttemptSequence() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -74,19 +74,17 @@ func ExampleSequenceClient_CreateSequence() { } defer c.Close() - req := &genprotopb.CreateSequenceRequest{ + req := &genprotopb.AttemptSequenceRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateSequenceRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#AttemptSequenceRequest. } - resp, err := c.CreateSequence(ctx, req) + err = c.AttemptSequence(ctx, req) if err != nil { // TODO: Handle error. } - // TODO: Use resp. - _ = resp } -func ExampleSequenceClient_CreateStreamingSequence() { +func ExampleSequenceClient_CreateSequence() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -99,11 +97,11 @@ func ExampleSequenceClient_CreateStreamingSequence() { } defer c.Close() - req := &genprotopb.CreateStreamingSequenceRequest{ + req := &genprotopb.CreateSequenceRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateStreamingSequenceRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateSequenceRequest. } - resp, err := c.CreateStreamingSequence(ctx, req) + resp, err := c.CreateSequence(ctx, req) if err != nil { // TODO: Handle error. } @@ -111,7 +109,7 @@ func ExampleSequenceClient_CreateStreamingSequence() { _ = resp } -func ExampleSequenceClient_GetSequenceReport() { +func ExampleSequenceClient_CreateStreamingSequence() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -124,11 +122,11 @@ func ExampleSequenceClient_GetSequenceReport() { } defer c.Close() - req := &genprotopb.GetSequenceReportRequest{ + req := &genprotopb.CreateStreamingSequenceRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSequenceReportRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#CreateStreamingSequenceRequest. } - resp, err := c.GetSequenceReport(ctx, req) + resp, err := c.CreateStreamingSequence(ctx, req) if err != nil { // TODO: Handle error. } @@ -136,7 +134,7 @@ func ExampleSequenceClient_GetSequenceReport() { _ = resp } -func ExampleSequenceClient_GetStreamingSequenceReport() { +func ExampleSequenceClient_GetSequenceReport() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -149,11 +147,11 @@ func ExampleSequenceClient_GetStreamingSequenceReport() { } defer c.Close() - req := &genprotopb.GetStreamingSequenceReportRequest{ + req := &genprotopb.GetSequenceReportRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetStreamingSequenceReportRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSequenceReportRequest. } - resp, err := c.GetStreamingSequenceReport(ctx, req) + resp, err := c.GetSequenceReport(ctx, req) if err != nil { // TODO: Handle error. } @@ -161,7 +159,7 @@ func ExampleSequenceClient_GetStreamingSequenceReport() { _ = resp } -func ExampleSequenceClient_AttemptSequence() { +func ExampleSequenceClient_GetStreamingSequenceReport() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -174,14 +172,16 @@ func ExampleSequenceClient_AttemptSequence() { } defer c.Close() - req := &genprotopb.AttemptSequenceRequest{ + req := &genprotopb.GetStreamingSequenceReportRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#AttemptSequenceRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetStreamingSequenceReportRequest. } - err = c.AttemptSequence(ctx, req) + resp, err := c.GetStreamingSequenceReport(ctx, req) if err != nil { // TODO: Handle error. } + // TODO: Use resp. + _ = resp } func ExampleSequenceClient_ListLocations() { diff --git a/client/testing_client.go b/client/testing_client.go index 734c5dbd2..73854d629 100644 --- a/client/testing_client.go +++ b/client/testing_client.go @@ -1867,97 +1867,3 @@ func (c *testingRESTClient) CancelOperation(ctx context.Context, req *longrunnin return googleapi.CheckResponse(httpRsp) }, opts...) } - -// SessionIterator manages a stream of *genprotopb.Session. -type SessionIterator struct { - items []*genprotopb.Session - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Session, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *SessionIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *SessionIterator) Next() (*genprotopb.Session, error) { - var item *genprotopb.Session - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *SessionIterator) bufLen() int { - return len(it.items) -} - -func (it *SessionIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} - -// TestIterator manages a stream of *genprotopb.Test. -type TestIterator struct { - items []*genprotopb.Test - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*genprotopb.Test, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *TestIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TestIterator) Next() (*genprotopb.Test, error) { - var item *genprotopb.Test - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TestIterator) bufLen() int { - return len(it.items) -} - -func (it *TestIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/client/testing_client_example_test.go b/client/testing_client_example_test.go index 2689510dc..733dfed48 100644 --- a/client/testing_client_example_test.go +++ b/client/testing_client_example_test.go @@ -86,7 +86,7 @@ func ExampleTestingClient_CreateSession() { _ = resp } -func ExampleTestingClient_GetSession() { +func ExampleTestingClient_DeleteSession() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -99,19 +99,17 @@ func ExampleTestingClient_GetSession() { } defer c.Close() - req := &genprotopb.GetSessionRequest{ + req := &genprotopb.DeleteSessionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSessionRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteSessionRequest. } - resp, err := c.GetSession(ctx, req) + err = c.DeleteSession(ctx, req) if err != nil { // TODO: Handle error. } - // TODO: Use resp. - _ = resp } -func ExampleTestingClient_ListSessions() { +func ExampleTestingClient_DeleteTest() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -124,25 +122,17 @@ func ExampleTestingClient_ListSessions() { } defer c.Close() - req := &genprotopb.ListSessionsRequest{ + req := &genprotopb.DeleteTestRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListSessionsRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteTestRequest. } - it := c.ListSessions(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp + err = c.DeleteTest(ctx, req) + if err != nil { + // TODO: Handle error. } } -func ExampleTestingClient_DeleteSession() { +func ExampleTestingClient_GetSession() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -155,17 +145,19 @@ func ExampleTestingClient_DeleteSession() { } defer c.Close() - req := &genprotopb.DeleteSessionRequest{ + req := &genprotopb.GetSessionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteSessionRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#GetSessionRequest. } - err = c.DeleteSession(ctx, req) + resp, err := c.GetSession(ctx, req) if err != nil { // TODO: Handle error. } + // TODO: Use resp. + _ = resp } -func ExampleTestingClient_ReportSession() { +func ExampleTestingClient_ListSessions() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -178,16 +170,22 @@ func ExampleTestingClient_ReportSession() { } defer c.Close() - req := &genprotopb.ReportSessionRequest{ + req := &genprotopb.ListSessionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ReportSessionRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ListSessionsRequest. } - resp, err := c.ReportSession(ctx, req) - if err != nil { - // TODO: Handle error. + it := c.ListSessions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp } - // TODO: Use resp. - _ = resp } func ExampleTestingClient_ListTests() { @@ -221,7 +219,7 @@ func ExampleTestingClient_ListTests() { } } -func ExampleTestingClient_DeleteTest() { +func ExampleTestingClient_ReportSession() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: @@ -234,14 +232,16 @@ func ExampleTestingClient_DeleteTest() { } defer c.Close() - req := &genprotopb.DeleteTestRequest{ + req := &genprotopb.ReportSessionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#DeleteTestRequest. + // See https://pkg.go.dev/github.com/googleapis/gapic-showcase/server/genproto#ReportSessionRequest. } - err = c.DeleteTest(ctx, req) + resp, err := c.ReportSession(ctx, req) if err != nil { // TODO: Handle error. } + // TODO: Use resp. + _ = resp } func ExampleTestingClient_VerifyTest() { diff --git a/cmd/gapic-showcase/echo-error-details.go b/cmd/gapic-showcase/echo-error-details.go new file mode 100644 index 000000000..958316840 --- /dev/null +++ b/cmd/gapic-showcase/echo-error-details.go @@ -0,0 +1,75 @@ +// Code generated. DO NOT EDIT. + +package main + +import ( + "github.com/spf13/cobra" + + "fmt" + + genprotopb "github.com/googleapis/gapic-showcase/server/genproto" + + "github.com/golang/protobuf/jsonpb" + + "os" +) + +var EchoErrorDetailsInput genprotopb.EchoErrorDetailsRequest + +var EchoErrorDetailsFromFile string + +func init() { + EchoServiceCmd.AddCommand(EchoErrorDetailsCmd) + + EchoErrorDetailsCmd.Flags().StringVar(&EchoErrorDetailsInput.SingleDetailText, "single_detail_text", "", "Content to return in a singular `*.error.details`...") + + EchoErrorDetailsCmd.Flags().StringSliceVar(&EchoErrorDetailsInput.MultiDetailText, "multi_detail_text", []string{}, "Content to return in a repeated `*.error.details`...") + + EchoErrorDetailsCmd.Flags().StringVar(&EchoErrorDetailsFromFile, "from_file", "", "Absolute path to JSON file containing request payload") + +} + +var EchoErrorDetailsCmd = &cobra.Command{ + Use: "echo-error-details", + Short: "This method returns error details in a repeated...", + Long: "This method returns error details in a repeated 'google.protobuf.Any' field. This method showcases handling errors thus encoded, particularly over...", + PreRun: func(cmd *cobra.Command, args []string) { + + if EchoErrorDetailsFromFile == "" { + + } + + }, + RunE: func(cmd *cobra.Command, args []string) (err error) { + + in := os.Stdin + if EchoErrorDetailsFromFile != "" { + in, err = os.Open(EchoErrorDetailsFromFile) + if err != nil { + return err + } + defer in.Close() + + err = jsonpb.Unmarshal(in, &EchoErrorDetailsInput) + if err != nil { + return err + } + + } + + if Verbose { + printVerboseInput("Echo", "EchoErrorDetails", &EchoErrorDetailsInput) + } + resp, err := EchoClient.EchoErrorDetails(ctx, &EchoErrorDetailsInput) + if err != nil { + return err + } + + if Verbose { + fmt.Print("Output: ") + } + printMessage(resp) + + return err + }, +} diff --git a/cmd/gapic-showcase/echo_service.go b/cmd/gapic-showcase/echo_service.go index 638c8b563..020f33725 100644 --- a/cmd/gapic-showcase/echo_service.go +++ b/cmd/gapic-showcase/echo_service.go @@ -18,6 +18,7 @@ var EchoConfig *viper.Viper var EchoClient *gapic.EchoClient var EchoSubCommands []string = []string{ "echo", + "echo-error-details", "expand", "collect", "chat", diff --git a/server/genproto/echo.pb.go b/server/genproto/echo.pb.go index 75acda158..674c79980 100644 --- a/server/genproto/echo.pb.go +++ b/server/genproto/echo.pb.go @@ -30,6 +30,7 @@ import ( status1 "google.golang.org/grpc/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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" @@ -268,6 +269,216 @@ func (x *EchoResponse) GetSeverity() Severity { return Severity_UNNECESSARY } +// The request message used for the EchoErrorDetails method. +type EchoErrorDetailsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Content to return in a singular `*.error.details` field of type + // `google.protobuf.Any` + SingleDetailText string `protobuf:"bytes,1,opt,name=single_detail_text,json=singleDetailText,proto3" json:"single_detail_text,omitempty"` + // Content to return in a repeated `*.error.details` field of type + // `google.protobuf.Any` + MultiDetailText []string `protobuf:"bytes,2,rep,name=multi_detail_text,json=multiDetailText,proto3" json:"multi_detail_text,omitempty"` +} + +func (x *EchoErrorDetailsRequest) Reset() { + *x = EchoErrorDetailsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoErrorDetailsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoErrorDetailsRequest) ProtoMessage() {} + +func (x *EchoErrorDetailsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_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 EchoErrorDetailsRequest.ProtoReflect.Descriptor instead. +func (*EchoErrorDetailsRequest) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{2} +} + +func (x *EchoErrorDetailsRequest) GetSingleDetailText() string { + if x != nil { + return x.SingleDetailText + } + return "" +} + +func (x *EchoErrorDetailsRequest) GetMultiDetailText() []string { + if x != nil { + return x.MultiDetailText + } + return nil +} + +// The response message used for the EchoErrorDetails method. +type EchoErrorDetailsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SingleDetail *EchoErrorDetailsResponse_SingleDetail `protobuf:"bytes,1,opt,name=single_detail,json=singleDetail,proto3" json:"single_detail,omitempty"` + MultipleDetails *EchoErrorDetailsResponse_MultipleDetails `protobuf:"bytes,2,opt,name=multiple_details,json=multipleDetails,proto3" json:"multiple_details,omitempty"` +} + +func (x *EchoErrorDetailsResponse) Reset() { + *x = EchoErrorDetailsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoErrorDetailsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoErrorDetailsResponse) ProtoMessage() {} + +func (x *EchoErrorDetailsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_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 EchoErrorDetailsResponse.ProtoReflect.Descriptor instead. +func (*EchoErrorDetailsResponse) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3} +} + +func (x *EchoErrorDetailsResponse) GetSingleDetail() *EchoErrorDetailsResponse_SingleDetail { + if x != nil { + return x.SingleDetail + } + return nil +} + +func (x *EchoErrorDetailsResponse) GetMultipleDetails() *EchoErrorDetailsResponse_MultipleDetails { + if x != nil { + return x.MultipleDetails + } + return nil +} + +type ErrorWithSingleDetail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Details *anypb.Any `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *ErrorWithSingleDetail) Reset() { + *x = ErrorWithSingleDetail{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorWithSingleDetail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorWithSingleDetail) ProtoMessage() {} + +func (x *ErrorWithSingleDetail) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_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 ErrorWithSingleDetail.ProtoReflect.Descriptor instead. +func (*ErrorWithSingleDetail) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{4} +} + +func (x *ErrorWithSingleDetail) GetDetails() *anypb.Any { + if x != nil { + return x.Details + } + return nil +} + +type ErrorWithMultipleDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Details []*anypb.Any `protobuf:"bytes,1,rep,name=details,proto3" json:"details,omitempty"` +} + +func (x *ErrorWithMultipleDetails) Reset() { + *x = ErrorWithMultipleDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorWithMultipleDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorWithMultipleDetails) ProtoMessage() {} + +func (x *ErrorWithMultipleDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_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 ErrorWithMultipleDetails.ProtoReflect.Descriptor instead. +func (*ErrorWithMultipleDetails) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{5} +} + +func (x *ErrorWithMultipleDetails) GetDetails() []*anypb.Any { + if x != nil { + return x.Details + } + return nil +} + // The request message for the Expand method. type ExpandRequest struct { state protoimpl.MessageState @@ -285,7 +496,7 @@ type ExpandRequest struct { func (x *ExpandRequest) Reset() { *x = ExpandRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[2] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -298,7 +509,7 @@ func (x *ExpandRequest) String() string { func (*ExpandRequest) ProtoMessage() {} func (x *ExpandRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[2] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -311,7 +522,7 @@ func (x *ExpandRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpandRequest.ProtoReflect.Descriptor instead. func (*ExpandRequest) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{2} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{6} } func (x *ExpandRequest) GetContent() string { @@ -352,7 +563,7 @@ type PagedExpandRequest struct { func (x *PagedExpandRequest) Reset() { *x = PagedExpandRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[3] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -365,7 +576,7 @@ func (x *PagedExpandRequest) String() string { func (*PagedExpandRequest) ProtoMessage() {} func (x *PagedExpandRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[3] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -378,7 +589,7 @@ func (x *PagedExpandRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PagedExpandRequest.ProtoReflect.Descriptor instead. func (*PagedExpandRequest) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{7} } func (x *PagedExpandRequest) GetContent() string { @@ -424,7 +635,7 @@ type PagedExpandLegacyRequest struct { func (x *PagedExpandLegacyRequest) Reset() { *x = PagedExpandLegacyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[4] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -437,7 +648,7 @@ func (x *PagedExpandLegacyRequest) String() string { func (*PagedExpandLegacyRequest) ProtoMessage() {} func (x *PagedExpandLegacyRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[4] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -450,7 +661,7 @@ func (x *PagedExpandLegacyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PagedExpandLegacyRequest.ProtoReflect.Descriptor instead. func (*PagedExpandLegacyRequest) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{4} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{8} } func (x *PagedExpandLegacyRequest) GetContent() string { @@ -489,7 +700,7 @@ type PagedExpandResponse struct { func (x *PagedExpandResponse) Reset() { *x = PagedExpandResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[5] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +713,7 @@ func (x *PagedExpandResponse) String() string { func (*PagedExpandResponse) ProtoMessage() {} func (x *PagedExpandResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[5] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +726,7 @@ func (x *PagedExpandResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PagedExpandResponse.ProtoReflect.Descriptor instead. func (*PagedExpandResponse) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{5} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{9} } func (x *PagedExpandResponse) GetResponses() []*EchoResponse { @@ -544,7 +755,7 @@ type PagedExpandResponseList struct { func (x *PagedExpandResponseList) Reset() { *x = PagedExpandResponseList{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -557,7 +768,7 @@ func (x *PagedExpandResponseList) String() string { func (*PagedExpandResponseList) ProtoMessage() {} func (x *PagedExpandResponseList) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[6] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -570,7 +781,7 @@ func (x *PagedExpandResponseList) ProtoReflect() protoreflect.Message { // Deprecated: Use PagedExpandResponseList.ProtoReflect.Descriptor instead. func (*PagedExpandResponseList) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{6} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{10} } func (x *PagedExpandResponseList) GetWords() []string { @@ -597,7 +808,7 @@ type PagedExpandLegacyMappedResponse struct { func (x *PagedExpandLegacyMappedResponse) Reset() { *x = PagedExpandLegacyMappedResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -610,7 +821,7 @@ func (x *PagedExpandLegacyMappedResponse) String() string { func (*PagedExpandLegacyMappedResponse) ProtoMessage() {} func (x *PagedExpandLegacyMappedResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[7] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -623,7 +834,7 @@ func (x *PagedExpandLegacyMappedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PagedExpandLegacyMappedResponse.ProtoReflect.Descriptor instead. func (*PagedExpandLegacyMappedResponse) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{7} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{11} } func (x *PagedExpandLegacyMappedResponse) GetAlphabetized() map[string]*PagedExpandResponseList { @@ -661,7 +872,7 @@ type WaitRequest struct { func (x *WaitRequest) Reset() { *x = WaitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -674,7 +885,7 @@ func (x *WaitRequest) String() string { func (*WaitRequest) ProtoMessage() {} func (x *WaitRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[8] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -687,7 +898,7 @@ func (x *WaitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WaitRequest.ProtoReflect.Descriptor instead. func (*WaitRequest) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{8} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{12} } func (m *WaitRequest) GetEnd() isWaitRequest_End { @@ -782,7 +993,7 @@ type WaitResponse struct { func (x *WaitResponse) Reset() { *x = WaitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -795,7 +1006,7 @@ func (x *WaitResponse) String() string { func (*WaitResponse) ProtoMessage() {} func (x *WaitResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[9] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -808,7 +1019,7 @@ func (x *WaitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WaitResponse.ProtoReflect.Descriptor instead. func (*WaitResponse) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{9} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{13} } func (x *WaitResponse) GetContent() string { @@ -831,7 +1042,7 @@ type WaitMetadata struct { func (x *WaitMetadata) Reset() { *x = WaitMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -844,7 +1055,7 @@ func (x *WaitMetadata) String() string { func (*WaitMetadata) ProtoMessage() {} func (x *WaitMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[10] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -857,7 +1068,7 @@ func (x *WaitMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use WaitMetadata.ProtoReflect.Descriptor instead. func (*WaitMetadata) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{10} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{14} } func (x *WaitMetadata) GetEndTime() *timestamppb.Timestamp { @@ -885,7 +1096,7 @@ type BlockRequest struct { func (x *BlockRequest) Reset() { *x = BlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -898,7 +1109,7 @@ func (x *BlockRequest) String() string { func (*BlockRequest) ProtoMessage() {} func (x *BlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[11] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -911,7 +1122,7 @@ func (x *BlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead. func (*BlockRequest) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{11} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{15} } func (x *BlockRequest) GetResponseDelay() *durationpb.Duration { @@ -975,7 +1186,7 @@ type BlockResponse struct { func (x *BlockResponse) Reset() { *x = BlockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -988,7 +1199,7 @@ func (x *BlockResponse) String() string { func (*BlockResponse) ProtoMessage() {} func (x *BlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[12] + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1001,7 +1212,7 @@ func (x *BlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead. func (*BlockResponse) Descriptor() ([]byte, []int) { - return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{12} + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{16} } func (x *BlockResponse) GetContent() string { @@ -1011,6 +1222,100 @@ func (x *BlockResponse) GetContent() string { return "" } +type EchoErrorDetailsResponse_SingleDetail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *ErrorWithSingleDetail `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *EchoErrorDetailsResponse_SingleDetail) Reset() { + *x = EchoErrorDetailsResponse_SingleDetail{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoErrorDetailsResponse_SingleDetail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoErrorDetailsResponse_SingleDetail) ProtoMessage() {} + +func (x *EchoErrorDetailsResponse_SingleDetail) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EchoErrorDetailsResponse_SingleDetail.ProtoReflect.Descriptor instead. +func (*EchoErrorDetailsResponse_SingleDetail) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *EchoErrorDetailsResponse_SingleDetail) GetError() *ErrorWithSingleDetail { + if x != nil { + return x.Error + } + return nil +} + +type EchoErrorDetailsResponse_MultipleDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *ErrorWithMultipleDetails `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *EchoErrorDetailsResponse_MultipleDetails) Reset() { + *x = EchoErrorDetailsResponse_MultipleDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoErrorDetailsResponse_MultipleDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoErrorDetailsResponse_MultipleDetails) ProtoMessage() {} + +func (x *EchoErrorDetailsResponse_MultipleDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_showcase_v1beta1_echo_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EchoErrorDetailsResponse_MultipleDetails.ProtoReflect.Descriptor instead. +func (*EchoErrorDetailsResponse_MultipleDetails) Descriptor() ([]byte, []int) { + return file_google_showcase_v1beta1_echo_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *EchoErrorDetailsResponse_MultipleDetails) GetError() *ErrorWithMultipleDetails { + if x != nil { + return x.Error + } + return nil +} + var File_google_showcase_v1beta1_echo_proto protoreflect.FileDescriptor var file_google_showcase_v1beta1_echo_proto_rawDesc = []byte{ @@ -1027,234 +1332,289 @@ var file_google_showcase_v1beta1_echo_proto_rawDesc = []byte{ 0x69, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0xdb, - 0x01, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x02, 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, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x0c, - 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0x98, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 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, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0xdb, 0x01, 0x0a, 0x0b, 0x45, 0x63, + 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, + 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, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, + 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x03, 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, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x6f, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 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, 0x79, 0x0a, 0x18, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, + 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x73, 0x0a, 0x17, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x54, 0x65, 0x78, 0x74, 0x22, 0x9f, 0x03, 0x0a, 0x18, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x6c, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x54, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x44, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, + 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x5a, 0x0a, 0x0f, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x47, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, + 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x15, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 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, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x22, 0x4a, 0x0a, 0x18, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 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, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x98, 0x01, 0x0a, + 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x61, 0x69, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 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, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, + 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x6f, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x65, 0x64, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 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, 0x82, 0x01, 0x0a, - 0x13, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x2f, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x77, 0x6f, 0x72, - 0x64, 0x73, 0x22, 0xac, 0x02, 0x0a, 0x1f, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, - 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, - 0x7a, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, - 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 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, 0x1a, 0x71, - 0x0a, 0x11, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, - 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x37, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, - 0x00, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x74, - 0x6c, 0x18, 0x04, 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, 0x48, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x02, 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, 0x01, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x01, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x42, - 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x57, - 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xcc, 0x01, 0x0a, - 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, - 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, - 0x01, 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, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, - 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 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, 0x42, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, - 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x44, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x4e, 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, - 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x52, 0x47, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0c, - 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x32, 0xff, 0x0b, 0x0a, - 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x94, 0x03, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x24, + 0xe0, 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 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, 0x79, 0x0a, 0x18, 0x50, 0x61, 0x67, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 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, 0x82, 0x01, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, - 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, - 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbe, 0x02, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, - 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x01, 0x2a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x9a, 0x02, 0x12, 0x08, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x7b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x21, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x2f, 0x2a, - 0x2f, 0x2a, 0x2a, 0x7d, 0x12, 0x22, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, - 0x7b, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x30, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x26, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x2a, 0x2a, 0x7d, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, - 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x3d, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x18, 0x0a, - 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x08, 0x7b, - 0x62, 0x61, 0x7a, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, 0x7b, 0x71, 0x75, 0x78, 0x3d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x8a, 0x01, 0x0a, - 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x78, - 0x70, 0x61, 0x6e, 0x64, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x2c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x07, 0x43, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, - 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, - 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x2f, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xac, 0x02, 0x0a, 0x1f, 0x50, 0x61, + 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, + 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, + 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x7a, 0x65, 0x64, 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, 0x1a, 0x71, 0x0a, 0x11, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, + 0x74, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x0b, 0x57, 0x61, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 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, 0x48, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, + 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 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, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, + 0x05, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x0c, + 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 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, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 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, 0x42, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, + 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x44, 0x0a, + 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x4e, + 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x45, + 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x52, 0x47, + 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, + 0x4c, 0x10, 0x03, 0x32, 0xa1, 0x0d, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x94, 0x03, 0x0a, + 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xbe, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x63, 0x68, 0x6f, 0x3a, + 0x01, 0x2a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x9a, 0x02, 0x12, 0x08, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x7b, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2b, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x2a, 0x2a, 0x7d, 0x12, 0x22, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x7b, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, + 0x30, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x7b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x2a, 0x2a, + 0x7d, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x18, 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x08, 0x7b, 0x62, 0x61, 0x7a, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x23, + 0x0a, 0x0c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, + 0x7b, 0x71, 0x75, 0x78, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x2a, 0x2a, 0x12, 0x9f, 0x01, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x12, 0x57, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x24, 0x2e, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2d, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, + 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x3a, 0x01, 0x2a, + 0xda, 0x41, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, - 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8e, - 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x2b, + 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, + 0x6f, 0x3a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x12, 0x57, + 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, + 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x64, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x67, + 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, - 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, - 0x3a, 0x70, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x3a, 0x01, 0x2a, 0x12, - 0xa0, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, + 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, 0x1f, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61, - 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x3a, - 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x2b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, - 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x25, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61, 0x67, - 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, - 0x70, 0x70, 0x65, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, - 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x77, 0x61, 0x69, - 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x1c, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x76, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x2e, 0x67, + 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, + 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x3a, 0x01, 0x2a, + 0x12, 0x89, 0x01, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x77, 0x61, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x1c, + 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0c, + 0x57, 0x61, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x76, 0x0a, 0x05, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, - 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, - 0x68, 0x6f, 0x3a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x01, 0x2a, 0x1a, 0x11, 0xca, 0x41, 0x0e, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x37, 0x34, 0x36, 0x39, 0x42, 0x71, - 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, - 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, - 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, - 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, - 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x3a, 0x01, 0x2a, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, + 0x73, 0x74, 0x3a, 0x37, 0x34, 0x36, 0x39, 0x42, 0x71, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x63, 0x2d, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, + 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, + 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1270,68 +1630,83 @@ func file_google_showcase_v1beta1_echo_proto_rawDescGZIP() []byte { } var file_google_showcase_v1beta1_echo_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_showcase_v1beta1_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_showcase_v1beta1_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_google_showcase_v1beta1_echo_proto_goTypes = []interface{}{ - (Severity)(0), // 0: google.showcase.v1beta1.Severity - (*EchoRequest)(nil), // 1: google.showcase.v1beta1.EchoRequest - (*EchoResponse)(nil), // 2: google.showcase.v1beta1.EchoResponse - (*ExpandRequest)(nil), // 3: google.showcase.v1beta1.ExpandRequest - (*PagedExpandRequest)(nil), // 4: google.showcase.v1beta1.PagedExpandRequest - (*PagedExpandLegacyRequest)(nil), // 5: google.showcase.v1beta1.PagedExpandLegacyRequest - (*PagedExpandResponse)(nil), // 6: google.showcase.v1beta1.PagedExpandResponse - (*PagedExpandResponseList)(nil), // 7: google.showcase.v1beta1.PagedExpandResponseList - (*PagedExpandLegacyMappedResponse)(nil), // 8: google.showcase.v1beta1.PagedExpandLegacyMappedResponse - (*WaitRequest)(nil), // 9: google.showcase.v1beta1.WaitRequest - (*WaitResponse)(nil), // 10: google.showcase.v1beta1.WaitResponse - (*WaitMetadata)(nil), // 11: google.showcase.v1beta1.WaitMetadata - (*BlockRequest)(nil), // 12: google.showcase.v1beta1.BlockRequest - (*BlockResponse)(nil), // 13: google.showcase.v1beta1.BlockResponse - nil, // 14: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry - (*status.Status)(nil), // 15: google.rpc.Status - (*durationpb.Duration)(nil), // 16: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (*longrunning.Operation)(nil), // 18: google.longrunning.Operation + (Severity)(0), // 0: google.showcase.v1beta1.Severity + (*EchoRequest)(nil), // 1: google.showcase.v1beta1.EchoRequest + (*EchoResponse)(nil), // 2: google.showcase.v1beta1.EchoResponse + (*EchoErrorDetailsRequest)(nil), // 3: google.showcase.v1beta1.EchoErrorDetailsRequest + (*EchoErrorDetailsResponse)(nil), // 4: google.showcase.v1beta1.EchoErrorDetailsResponse + (*ErrorWithSingleDetail)(nil), // 5: google.showcase.v1beta1.ErrorWithSingleDetail + (*ErrorWithMultipleDetails)(nil), // 6: google.showcase.v1beta1.ErrorWithMultipleDetails + (*ExpandRequest)(nil), // 7: google.showcase.v1beta1.ExpandRequest + (*PagedExpandRequest)(nil), // 8: google.showcase.v1beta1.PagedExpandRequest + (*PagedExpandLegacyRequest)(nil), // 9: google.showcase.v1beta1.PagedExpandLegacyRequest + (*PagedExpandResponse)(nil), // 10: google.showcase.v1beta1.PagedExpandResponse + (*PagedExpandResponseList)(nil), // 11: google.showcase.v1beta1.PagedExpandResponseList + (*PagedExpandLegacyMappedResponse)(nil), // 12: google.showcase.v1beta1.PagedExpandLegacyMappedResponse + (*WaitRequest)(nil), // 13: google.showcase.v1beta1.WaitRequest + (*WaitResponse)(nil), // 14: google.showcase.v1beta1.WaitResponse + (*WaitMetadata)(nil), // 15: google.showcase.v1beta1.WaitMetadata + (*BlockRequest)(nil), // 16: google.showcase.v1beta1.BlockRequest + (*BlockResponse)(nil), // 17: google.showcase.v1beta1.BlockResponse + (*EchoErrorDetailsResponse_SingleDetail)(nil), // 18: google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail + (*EchoErrorDetailsResponse_MultipleDetails)(nil), // 19: google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails + nil, // 20: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry + (*status.Status)(nil), // 21: google.rpc.Status + (*anypb.Any)(nil), // 22: google.protobuf.Any + (*durationpb.Duration)(nil), // 23: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*longrunning.Operation)(nil), // 25: google.longrunning.Operation } var file_google_showcase_v1beta1_echo_proto_depIdxs = []int32{ - 15, // 0: google.showcase.v1beta1.EchoRequest.error:type_name -> google.rpc.Status + 21, // 0: google.showcase.v1beta1.EchoRequest.error:type_name -> google.rpc.Status 0, // 1: google.showcase.v1beta1.EchoRequest.severity:type_name -> google.showcase.v1beta1.Severity 0, // 2: google.showcase.v1beta1.EchoResponse.severity:type_name -> google.showcase.v1beta1.Severity - 15, // 3: google.showcase.v1beta1.ExpandRequest.error:type_name -> google.rpc.Status - 16, // 4: google.showcase.v1beta1.ExpandRequest.stream_wait_time:type_name -> google.protobuf.Duration - 2, // 5: google.showcase.v1beta1.PagedExpandResponse.responses:type_name -> google.showcase.v1beta1.EchoResponse - 14, // 6: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.alphabetized:type_name -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry - 17, // 7: google.showcase.v1beta1.WaitRequest.end_time:type_name -> google.protobuf.Timestamp - 16, // 8: google.showcase.v1beta1.WaitRequest.ttl:type_name -> google.protobuf.Duration - 15, // 9: google.showcase.v1beta1.WaitRequest.error:type_name -> google.rpc.Status - 10, // 10: google.showcase.v1beta1.WaitRequest.success:type_name -> google.showcase.v1beta1.WaitResponse - 17, // 11: google.showcase.v1beta1.WaitMetadata.end_time:type_name -> google.protobuf.Timestamp - 16, // 12: google.showcase.v1beta1.BlockRequest.response_delay:type_name -> google.protobuf.Duration - 15, // 13: google.showcase.v1beta1.BlockRequest.error:type_name -> google.rpc.Status - 13, // 14: google.showcase.v1beta1.BlockRequest.success:type_name -> google.showcase.v1beta1.BlockResponse - 7, // 15: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry.value:type_name -> google.showcase.v1beta1.PagedExpandResponseList - 1, // 16: google.showcase.v1beta1.Echo.Echo:input_type -> google.showcase.v1beta1.EchoRequest - 3, // 17: google.showcase.v1beta1.Echo.Expand:input_type -> google.showcase.v1beta1.ExpandRequest - 1, // 18: google.showcase.v1beta1.Echo.Collect:input_type -> google.showcase.v1beta1.EchoRequest - 1, // 19: google.showcase.v1beta1.Echo.Chat:input_type -> google.showcase.v1beta1.EchoRequest - 4, // 20: google.showcase.v1beta1.Echo.PagedExpand:input_type -> google.showcase.v1beta1.PagedExpandRequest - 5, // 21: google.showcase.v1beta1.Echo.PagedExpandLegacy:input_type -> google.showcase.v1beta1.PagedExpandLegacyRequest - 4, // 22: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:input_type -> google.showcase.v1beta1.PagedExpandRequest - 9, // 23: google.showcase.v1beta1.Echo.Wait:input_type -> google.showcase.v1beta1.WaitRequest - 12, // 24: google.showcase.v1beta1.Echo.Block:input_type -> google.showcase.v1beta1.BlockRequest - 2, // 25: google.showcase.v1beta1.Echo.Echo:output_type -> google.showcase.v1beta1.EchoResponse - 2, // 26: google.showcase.v1beta1.Echo.Expand:output_type -> google.showcase.v1beta1.EchoResponse - 2, // 27: google.showcase.v1beta1.Echo.Collect:output_type -> google.showcase.v1beta1.EchoResponse - 2, // 28: google.showcase.v1beta1.Echo.Chat:output_type -> google.showcase.v1beta1.EchoResponse - 6, // 29: google.showcase.v1beta1.Echo.PagedExpand:output_type -> google.showcase.v1beta1.PagedExpandResponse - 6, // 30: google.showcase.v1beta1.Echo.PagedExpandLegacy:output_type -> google.showcase.v1beta1.PagedExpandResponse - 8, // 31: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:output_type -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse - 18, // 32: google.showcase.v1beta1.Echo.Wait:output_type -> google.longrunning.Operation - 13, // 33: google.showcase.v1beta1.Echo.Block:output_type -> google.showcase.v1beta1.BlockResponse - 25, // [25:34] is the sub-list for method output_type - 16, // [16:25] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 18, // 3: google.showcase.v1beta1.EchoErrorDetailsResponse.single_detail:type_name -> google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail + 19, // 4: google.showcase.v1beta1.EchoErrorDetailsResponse.multiple_details:type_name -> google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails + 22, // 5: google.showcase.v1beta1.ErrorWithSingleDetail.details:type_name -> google.protobuf.Any + 22, // 6: google.showcase.v1beta1.ErrorWithMultipleDetails.details:type_name -> google.protobuf.Any + 21, // 7: google.showcase.v1beta1.ExpandRequest.error:type_name -> google.rpc.Status + 23, // 8: google.showcase.v1beta1.ExpandRequest.stream_wait_time:type_name -> google.protobuf.Duration + 2, // 9: google.showcase.v1beta1.PagedExpandResponse.responses:type_name -> google.showcase.v1beta1.EchoResponse + 20, // 10: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.alphabetized:type_name -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry + 24, // 11: google.showcase.v1beta1.WaitRequest.end_time:type_name -> google.protobuf.Timestamp + 23, // 12: google.showcase.v1beta1.WaitRequest.ttl:type_name -> google.protobuf.Duration + 21, // 13: google.showcase.v1beta1.WaitRequest.error:type_name -> google.rpc.Status + 14, // 14: google.showcase.v1beta1.WaitRequest.success:type_name -> google.showcase.v1beta1.WaitResponse + 24, // 15: google.showcase.v1beta1.WaitMetadata.end_time:type_name -> google.protobuf.Timestamp + 23, // 16: google.showcase.v1beta1.BlockRequest.response_delay:type_name -> google.protobuf.Duration + 21, // 17: google.showcase.v1beta1.BlockRequest.error:type_name -> google.rpc.Status + 17, // 18: google.showcase.v1beta1.BlockRequest.success:type_name -> google.showcase.v1beta1.BlockResponse + 5, // 19: google.showcase.v1beta1.EchoErrorDetailsResponse.SingleDetail.error:type_name -> google.showcase.v1beta1.ErrorWithSingleDetail + 6, // 20: google.showcase.v1beta1.EchoErrorDetailsResponse.MultipleDetails.error:type_name -> google.showcase.v1beta1.ErrorWithMultipleDetails + 11, // 21: google.showcase.v1beta1.PagedExpandLegacyMappedResponse.AlphabetizedEntry.value:type_name -> google.showcase.v1beta1.PagedExpandResponseList + 1, // 22: google.showcase.v1beta1.Echo.Echo:input_type -> google.showcase.v1beta1.EchoRequest + 3, // 23: google.showcase.v1beta1.Echo.EchoErrorDetails:input_type -> google.showcase.v1beta1.EchoErrorDetailsRequest + 7, // 24: google.showcase.v1beta1.Echo.Expand:input_type -> google.showcase.v1beta1.ExpandRequest + 1, // 25: google.showcase.v1beta1.Echo.Collect:input_type -> google.showcase.v1beta1.EchoRequest + 1, // 26: google.showcase.v1beta1.Echo.Chat:input_type -> google.showcase.v1beta1.EchoRequest + 8, // 27: google.showcase.v1beta1.Echo.PagedExpand:input_type -> google.showcase.v1beta1.PagedExpandRequest + 9, // 28: google.showcase.v1beta1.Echo.PagedExpandLegacy:input_type -> google.showcase.v1beta1.PagedExpandLegacyRequest + 8, // 29: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:input_type -> google.showcase.v1beta1.PagedExpandRequest + 13, // 30: google.showcase.v1beta1.Echo.Wait:input_type -> google.showcase.v1beta1.WaitRequest + 16, // 31: google.showcase.v1beta1.Echo.Block:input_type -> google.showcase.v1beta1.BlockRequest + 2, // 32: google.showcase.v1beta1.Echo.Echo:output_type -> google.showcase.v1beta1.EchoResponse + 4, // 33: google.showcase.v1beta1.Echo.EchoErrorDetails:output_type -> google.showcase.v1beta1.EchoErrorDetailsResponse + 2, // 34: google.showcase.v1beta1.Echo.Expand:output_type -> google.showcase.v1beta1.EchoResponse + 2, // 35: google.showcase.v1beta1.Echo.Collect:output_type -> google.showcase.v1beta1.EchoResponse + 2, // 36: google.showcase.v1beta1.Echo.Chat:output_type -> google.showcase.v1beta1.EchoResponse + 10, // 37: google.showcase.v1beta1.Echo.PagedExpand:output_type -> google.showcase.v1beta1.PagedExpandResponse + 10, // 38: google.showcase.v1beta1.Echo.PagedExpandLegacy:output_type -> google.showcase.v1beta1.PagedExpandResponse + 12, // 39: google.showcase.v1beta1.Echo.PagedExpandLegacyMapped:output_type -> google.showcase.v1beta1.PagedExpandLegacyMappedResponse + 25, // 40: google.showcase.v1beta1.Echo.Wait:output_type -> google.longrunning.Operation + 17, // 41: google.showcase.v1beta1.Echo.Block:output_type -> google.showcase.v1beta1.BlockResponse + 32, // [32:42] is the sub-list for method output_type + 22, // [22:32] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_google_showcase_v1beta1_echo_proto_init() } @@ -1365,7 +1740,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpandRequest); i { + switch v := v.(*EchoErrorDetailsRequest); i { case 0: return &v.state case 1: @@ -1377,7 +1752,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PagedExpandRequest); i { + switch v := v.(*EchoErrorDetailsResponse); i { case 0: return &v.state case 1: @@ -1389,7 +1764,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PagedExpandLegacyRequest); i { + switch v := v.(*ErrorWithSingleDetail); i { case 0: return &v.state case 1: @@ -1401,7 +1776,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PagedExpandResponse); i { + switch v := v.(*ErrorWithMultipleDetails); i { case 0: return &v.state case 1: @@ -1413,7 +1788,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PagedExpandResponseList); i { + switch v := v.(*ExpandRequest); i { case 0: return &v.state case 1: @@ -1425,7 +1800,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PagedExpandLegacyMappedResponse); i { + switch v := v.(*PagedExpandRequest); i { case 0: return &v.state case 1: @@ -1437,7 +1812,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WaitRequest); i { + switch v := v.(*PagedExpandLegacyRequest); i { case 0: return &v.state case 1: @@ -1449,7 +1824,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WaitResponse); i { + switch v := v.(*PagedExpandResponse); i { case 0: return &v.state case 1: @@ -1461,7 +1836,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WaitMetadata); i { + switch v := v.(*PagedExpandResponseList); i { case 0: return &v.state case 1: @@ -1473,7 +1848,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockRequest); i { + switch v := v.(*PagedExpandLegacyMappedResponse); i { case 0: return &v.state case 1: @@ -1485,6 +1860,54 @@ func file_google_showcase_v1beta1_echo_proto_init() { } } file_google_showcase_v1beta1_echo_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WaitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_showcase_v1beta1_echo_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WaitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_showcase_v1beta1_echo_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WaitMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_showcase_v1beta1_echo_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_showcase_v1beta1_echo_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockResponse); i { case 0: return &v.state @@ -1496,18 +1919,42 @@ func file_google_showcase_v1beta1_echo_proto_init() { return nil } } + file_google_showcase_v1beta1_echo_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoErrorDetailsResponse_SingleDetail); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_showcase_v1beta1_echo_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoErrorDetailsResponse_MultipleDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_google_showcase_v1beta1_echo_proto_msgTypes[0].OneofWrappers = []interface{}{ (*EchoRequest_Content)(nil), (*EchoRequest_Error)(nil), } - file_google_showcase_v1beta1_echo_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_google_showcase_v1beta1_echo_proto_msgTypes[12].OneofWrappers = []interface{}{ (*WaitRequest_EndTime)(nil), (*WaitRequest_Ttl)(nil), (*WaitRequest_Error)(nil), (*WaitRequest_Success)(nil), } - file_google_showcase_v1beta1_echo_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_google_showcase_v1beta1_echo_proto_msgTypes[15].OneofWrappers = []interface{}{ (*BlockRequest_Error)(nil), (*BlockRequest_Success)(nil), } @@ -1517,7 +1964,7 @@ func file_google_showcase_v1beta1_echo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_showcase_v1beta1_echo_proto_rawDesc, NumEnums: 1, - NumMessages: 14, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, @@ -1546,6 +1993,13 @@ const _ = grpc.SupportPackageIsVersion6 type EchoClient interface { // This method simply echoes the request. This method showcases unary RPCs. Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) + // This method returns error details in a repeated "google.protobuf.Any" + // field. This method showcases handling errors thus encoded, particularly + // over REST transport. Note that GAPICs only allow the type + // "google.protobuf.Any" for field paths ending in "error.details", and, at + // run-time, the actual types for these fields must be one of the types in + // google/rpc/error_details.proto. + EchoErrorDetails(ctx context.Context, in *EchoErrorDetailsRequest, opts ...grpc.CallOption) (*EchoErrorDetailsResponse, error) // This method splits the given content into words and will pass each word back // through the stream. This method showcases server-side streaming RPCs. Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (Echo_ExpandClient, error) @@ -1596,6 +2050,15 @@ func (c *echoClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.Cal return out, nil } +func (c *echoClient) EchoErrorDetails(ctx context.Context, in *EchoErrorDetailsRequest, opts ...grpc.CallOption) (*EchoErrorDetailsResponse, error) { + out := new(EchoErrorDetailsResponse) + err := c.cc.Invoke(ctx, "/google.showcase.v1beta1.Echo/EchoErrorDetails", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *echoClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (Echo_ExpandClient, error) { stream, err := c.cc.NewStream(ctx, &_Echo_serviceDesc.Streams[0], "/google.showcase.v1beta1.Echo/Expand", opts...) if err != nil { @@ -1742,6 +2205,13 @@ func (c *echoClient) Block(ctx context.Context, in *BlockRequest, opts ...grpc.C type EchoServer interface { // This method simply echoes the request. This method showcases unary RPCs. Echo(context.Context, *EchoRequest) (*EchoResponse, error) + // This method returns error details in a repeated "google.protobuf.Any" + // field. This method showcases handling errors thus encoded, particularly + // over REST transport. Note that GAPICs only allow the type + // "google.protobuf.Any" for field paths ending in "error.details", and, at + // run-time, the actual types for these fields must be one of the types in + // google/rpc/error_details.proto. + EchoErrorDetails(context.Context, *EchoErrorDetailsRequest) (*EchoErrorDetailsResponse, error) // This method splits the given content into words and will pass each word back // through the stream. This method showcases server-side streaming RPCs. Expand(*ExpandRequest, Echo_ExpandServer) error @@ -1782,6 +2252,9 @@ type UnimplementedEchoServer struct { func (*UnimplementedEchoServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { return nil, status1.Errorf(codes.Unimplemented, "method Echo not implemented") } +func (*UnimplementedEchoServer) EchoErrorDetails(context.Context, *EchoErrorDetailsRequest) (*EchoErrorDetailsResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method EchoErrorDetails not implemented") +} func (*UnimplementedEchoServer) Expand(*ExpandRequest, Echo_ExpandServer) error { return status1.Errorf(codes.Unimplemented, "method Expand not implemented") } @@ -1829,6 +2302,24 @@ func _Echo_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } +func _Echo_EchoErrorDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoErrorDetailsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EchoServer).EchoErrorDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.showcase.v1beta1.Echo/EchoErrorDetails", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EchoServer).EchoErrorDetails(ctx, req.(*EchoErrorDetailsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Echo_Expand_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ExpandRequest) if err := stream.RecvMsg(m); err != nil { @@ -2000,6 +2491,10 @@ var _Echo_serviceDesc = grpc.ServiceDesc{ MethodName: "Echo", Handler: _Echo_Echo_Handler, }, + { + MethodName: "EchoErrorDetails", + Handler: _Echo_EchoErrorDetails_Handler, + }, { MethodName: "PagedExpand", Handler: _Echo_PagedExpand_Handler, diff --git a/server/genrest/echo.go b/server/genrest/echo.go index 7f23dc871..4f8429fa5 100644 --- a/server/genrest/echo.go +++ b/server/genrest/echo.go @@ -98,6 +98,77 @@ func (backend *RESTBackend) HandleEcho(w http.ResponseWriter, r *http.Request) { w.Write(json) } +// HandleEchoErrorDetails translates REST requests/responses on the wire to internal proto messages for EchoErrorDetails +// +// Generated for HTTP binding pattern: POST "/v1beta1/echo:error-details" +func (backend *RESTBackend) HandleEchoErrorDetails(w http.ResponseWriter, r *http.Request) { + urlPathParams := gmux.Vars(r) + numUrlPathParams := len(urlPathParams) + + backend.StdLog.Printf("Received %s request matching '/v1beta1/echo:error-details': %q", r.Method, r.URL) + backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) + + if numUrlPathParams != 0 { + backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) + return + } + + systemParameters, queryParams, err := resttools.GetSystemParameters(r) + if err != nil { + backend.Error(w, http.StatusBadRequest, "error in query string: %s", err) + return + } + + request := &genprotopb.EchoErrorDetailsRequest{} + // Intentional: Field values in the URL path override those set in the body. + var jsonReader bytes.Buffer + bodyReader := io.TeeReader(r.Body, &jsonReader) + rBytes := make([]byte, r.ContentLength) + if _, err := bodyReader.Read(rBytes); err != nil && err != io.EOF { + backend.Error(w, http.StatusBadRequest, "error reading body content: %s", err) + return + } + + if err := resttools.FromJSON().Unmarshal(rBytes, request); err != nil { + backend.Error(w, http.StatusBadRequest, "error reading body params '*': %s", err) + return + } + + if err := resttools.CheckRequestFormat(&jsonReader, r, request.ProtoReflect()); err != nil { + backend.Error(w, http.StatusBadRequest, "REST request failed format check: %s", err) + return + } + + if len(queryParams) > 0 { + backend.Error(w, http.StatusBadRequest, "encountered unexpected query params: %v", queryParams) + return + } + if err := resttools.PopulateSingularFields(request, urlPathParams); err != nil { + backend.Error(w, http.StatusBadRequest, "error reading URL path params: %s", err) + return + } + + marshaler := resttools.ToJSON() + marshaler.UseEnumNumbers = systemParameters.EnumEncodingAsInt + requestJSON, _ := marshaler.Marshal(request) + backend.StdLog.Printf(" request: %s", requestJSON) + + ctx := context.WithValue(r.Context(), resttools.BindingURIKey, "/v1beta1/echo:error-details") + response, err := backend.EchoServer.EchoErrorDetails(ctx, request) + if err != nil { + backend.ReportGRPCError(w, err) + return + } + + json, err := marshaler.Marshal(response) + if err != nil { + backend.Error(w, http.StatusInternalServerError, "error json-encoding response: %s", err.Error()) + return + } + + w.Write(json) +} + // HandleExpand translates REST requests/responses on the wire to internal proto messages for Expand // // Generated for HTTP binding pattern: POST "/v1beta1/echo:expand" diff --git a/server/genrest/genrest.go b/server/genrest/genrest.go index 6f852ca53..c1ba13339 100644 --- a/server/genrest/genrest.go +++ b/server/genrest/genrest.go @@ -45,6 +45,7 @@ func RegisterHandlers(router *gmux.Router, backend *services.Backend) { router.HandleFunc("/v1beta1/compliance/enum", rest.HandleGetEnum).Methods("GET") router.HandleFunc("/v1beta1/compliance/enum", rest.HandleVerifyEnum).Methods("POST") router.HandleFunc("/v1beta1/echo:echo", rest.HandleEcho).Methods("POST") + router.HandleFunc("/v1beta1/echo:error-details", rest.HandleEchoErrorDetails).Methods("POST") router.HandleFunc("/v1beta1/echo:expand", rest.HandleExpand).Methods("POST") router.HandleFunc("/v1beta1/echo:collect", rest.HandleCollect).Methods("POST") router.HandleFunc("/v1beta1/echo:pagedExpand", rest.HandlePagedExpand).Methods("POST") diff --git a/server/genrest/showcase-rest-sample-response.txt b/server/genrest/showcase-rest-sample-response.txt index 40104e55e..a39071fb2 100644 --- a/server/genrest/showcase-rest-sample-response.txt +++ b/server/genrest/showcase-rest-sample-response.txt @@ -23,6 +23,7 @@ Compliance (.google.showcase.v1beta1.Compliance): Echo (.google.showcase.v1beta1.Echo): .google.showcase.v1beta1.Echo.Echo[0] : POST: "/v1beta1/echo:echo" + .google.showcase.v1beta1.Echo.EchoErrorDetails[0] : POST: "/v1beta1/echo:error-details" .google.showcase.v1beta1.Echo.Expand[0] : POST: "/v1beta1/echo:expand" .google.showcase.v1beta1.Echo.Collect[0] : POST: "/v1beta1/echo:collect" .google.showcase.v1beta1.Echo.PagedExpand[0] : POST: "/v1beta1/echo:pagedExpand" @@ -149,7 +150,7 @@ Shim "Echo" (.google.showcase.v1beta1.Echo) Imports: genprotopb: "github.com/googleapis/gapic-showcase/server/genproto" "github.com/googleapis/gapic-showcase/server/genproto" longrunningpbpb: "cloud.google.com/go/longrunning/autogen/longrunningpb" "cloud.google.com/go/longrunning/autogen/longrunningpb" - Handlers (8): + Handlers (9): POST /v1beta1/echo:echo func Echo(request genprotopb.EchoRequest) (response genprotopb.EchoResponse) {} ["/" "v1beta1" "/" "echo" ":" "echo"] @@ -168,6 +169,9 @@ Shim "Echo" (.google.showcase.v1beta1.Echo) POST /v1beta1/echo:pagedExpand func PagedExpand(request genprotopb.PagedExpandRequest) (response genprotopb.PagedExpandResponse) {} ["/" "v1beta1" "/" "echo" ":" "pagedExpand"] + POST /v1beta1/echo:error-details func EchoErrorDetails(request genprotopb.EchoErrorDetailsRequest) (response genprotopb.EchoErrorDetailsResponse) {} +["/" "v1beta1" "/" "echo" ":" "error-details"] + POST /v1beta1/echo:pagedExpandLegacy func PagedExpandLegacy(request genprotopb.PagedExpandLegacyRequest) (response genprotopb.PagedExpandResponse) {} ["/" "v1beta1" "/" "echo" ":" "pagedExpandLegacy"]