diff --git a/aiplatform/apiv1/dataset_client.go b/aiplatform/apiv1/dataset_client.go index 4df8a276248a..51b6a7a5383a 100644 --- a/aiplatform/apiv1/dataset_client.go +++ b/aiplatform/apiv1/dataset_client.go @@ -51,6 +51,7 @@ type DatasetCallOptions struct { ImportData []gax.CallOption ExportData []gax.CallOption ListDataItems []gax.CallOption + ListSavedQueries []gax.CallOption GetAnnotationSpec []gax.CallOption ListAnnotations []gax.CallOption GetLocation []gax.CallOption @@ -87,6 +88,7 @@ func defaultDatasetCallOptions() *DatasetCallOptions { ImportData: []gax.CallOption{}, ExportData: []gax.CallOption{}, ListDataItems: []gax.CallOption{}, + ListSavedQueries: []gax.CallOption{}, GetAnnotationSpec: []gax.CallOption{}, ListAnnotations: []gax.CallOption{}, GetLocation: []gax.CallOption{}, @@ -119,6 +121,7 @@ type internalDatasetClient interface { ExportData(context.Context, *aiplatformpb.ExportDataRequest, ...gax.CallOption) (*ExportDataOperation, error) ExportDataOperation(name string) *ExportDataOperation ListDataItems(context.Context, *aiplatformpb.ListDataItemsRequest, ...gax.CallOption) *DataItemIterator + ListSavedQueries(context.Context, *aiplatformpb.ListSavedQueriesRequest, ...gax.CallOption) *SavedQueryIterator GetAnnotationSpec(context.Context, *aiplatformpb.GetAnnotationSpecRequest, ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) ListAnnotations(context.Context, *aiplatformpb.ListAnnotationsRequest, ...gax.CallOption) *AnnotationIterator GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) @@ -237,6 +240,11 @@ func (c *DatasetClient) ListDataItems(ctx context.Context, req *aiplatformpb.Lis return c.internalClient.ListDataItems(ctx, req, opts...) } +// ListSavedQueries lists SavedQueries in a Dataset. +func (c *DatasetClient) ListSavedQueries(ctx context.Context, req *aiplatformpb.ListSavedQueriesRequest, opts ...gax.CallOption) *SavedQueryIterator { + return c.internalClient.ListSavedQueries(ctx, req, opts...) +} + // GetAnnotationSpec gets an AnnotationSpec. func (c *DatasetClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) { return c.internalClient.GetAnnotationSpec(ctx, req, opts...) @@ -614,6 +622,51 @@ func (c *datasetGRPCClient) ListDataItems(ctx context.Context, req *aiplatformpb return it } +func (c *datasetGRPCClient) ListSavedQueries(ctx context.Context, req *aiplatformpb.ListSavedQueriesRequest, opts ...gax.CallOption) *SavedQueryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListSavedQueries[0:len((*c.CallOptions).ListSavedQueries):len((*c.CallOptions).ListSavedQueries)], opts...) + it := &SavedQueryIterator{} + req = proto.Clone(req).(*aiplatformpb.ListSavedQueriesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.SavedQuery, string, error) { + resp := &aiplatformpb.ListSavedQueriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.datasetClient.ListSavedQueries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSavedQueries(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + func (c *datasetGRPCClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) @@ -1393,3 +1446,50 @@ func (it *OperationIterator) takeBuf() interface{} { it.items = nil return b } + +// SavedQueryIterator manages a stream of *aiplatformpb.SavedQuery. +type SavedQueryIterator struct { + items []*aiplatformpb.SavedQuery + 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 []*aiplatformpb.SavedQuery, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SavedQueryIterator) 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 *SavedQueryIterator) Next() (*aiplatformpb.SavedQuery, error) { + var item *aiplatformpb.SavedQuery + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SavedQueryIterator) bufLen() int { + return len(it.items) +} + +func (it *SavedQueryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/aiplatform/apiv1/dataset_client_example_test.go b/aiplatform/apiv1/dataset_client_example_test.go index b355f7e6f54b..b94f366c3f28 100644 --- a/aiplatform/apiv1/dataset_client_example_test.go +++ b/aiplatform/apiv1/dataset_client_example_test.go @@ -229,6 +229,32 @@ func ExampleDatasetClient_ListDataItems() { } } +func ExampleDatasetClient_ListSavedQueries() { + ctx := context.Background() + c, err := aiplatform.NewDatasetClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListSavedQueriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListSavedQueriesRequest. + } + it := c.ListSavedQueries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + func ExampleDatasetClient_GetAnnotationSpec() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) diff --git a/aiplatform/apiv1/gapic_metadata.json b/aiplatform/apiv1/gapic_metadata.json index e415d2449cd5..14d14b7b5e09 100644 --- a/aiplatform/apiv1/gapic_metadata.json +++ b/aiplatform/apiv1/gapic_metadata.json @@ -90,6 +90,11 @@ "ListOperations" ] }, + "ListSavedQueries": { + "methods": [ + "ListSavedQueries" + ] + }, "SetIamPolicy": { "methods": [ "SetIamPolicy" diff --git a/aiplatform/apiv1beta1/dataset_client.go b/aiplatform/apiv1beta1/dataset_client.go index a051d11372d0..2c50f31b4d65 100644 --- a/aiplatform/apiv1beta1/dataset_client.go +++ b/aiplatform/apiv1beta1/dataset_client.go @@ -51,6 +51,7 @@ type DatasetCallOptions struct { ImportData []gax.CallOption ExportData []gax.CallOption ListDataItems []gax.CallOption + ListSavedQueries []gax.CallOption GetAnnotationSpec []gax.CallOption ListAnnotations []gax.CallOption GetLocation []gax.CallOption @@ -87,6 +88,7 @@ func defaultDatasetCallOptions() *DatasetCallOptions { ImportData: []gax.CallOption{}, ExportData: []gax.CallOption{}, ListDataItems: []gax.CallOption{}, + ListSavedQueries: []gax.CallOption{}, GetAnnotationSpec: []gax.CallOption{}, ListAnnotations: []gax.CallOption{}, GetLocation: []gax.CallOption{}, @@ -119,6 +121,7 @@ type internalDatasetClient interface { ExportData(context.Context, *aiplatformpb.ExportDataRequest, ...gax.CallOption) (*ExportDataOperation, error) ExportDataOperation(name string) *ExportDataOperation ListDataItems(context.Context, *aiplatformpb.ListDataItemsRequest, ...gax.CallOption) *DataItemIterator + ListSavedQueries(context.Context, *aiplatformpb.ListSavedQueriesRequest, ...gax.CallOption) *SavedQueryIterator GetAnnotationSpec(context.Context, *aiplatformpb.GetAnnotationSpecRequest, ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) ListAnnotations(context.Context, *aiplatformpb.ListAnnotationsRequest, ...gax.CallOption) *AnnotationIterator GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) @@ -237,6 +240,11 @@ func (c *DatasetClient) ListDataItems(ctx context.Context, req *aiplatformpb.Lis return c.internalClient.ListDataItems(ctx, req, opts...) } +// ListSavedQueries lists SavedQueries in a Dataset. +func (c *DatasetClient) ListSavedQueries(ctx context.Context, req *aiplatformpb.ListSavedQueriesRequest, opts ...gax.CallOption) *SavedQueryIterator { + return c.internalClient.ListSavedQueries(ctx, req, opts...) +} + // GetAnnotationSpec gets an AnnotationSpec. func (c *DatasetClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) { return c.internalClient.GetAnnotationSpec(ctx, req, opts...) @@ -644,6 +652,51 @@ func (c *datasetGRPCClient) ListDataItems(ctx context.Context, req *aiplatformpb return it } +func (c *datasetGRPCClient) ListSavedQueries(ctx context.Context, req *aiplatformpb.ListSavedQueriesRequest, opts ...gax.CallOption) *SavedQueryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListSavedQueries[0:len((*c.CallOptions).ListSavedQueries):len((*c.CallOptions).ListSavedQueries)], opts...) + it := &SavedQueryIterator{} + req = proto.Clone(req).(*aiplatformpb.ListSavedQueriesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.SavedQuery, string, error) { + resp := &aiplatformpb.ListSavedQueriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.datasetClient.ListSavedQueries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSavedQueries(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + func (c *datasetGRPCClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1428,3 +1481,50 @@ func (it *OperationIterator) takeBuf() interface{} { it.items = nil return b } + +// SavedQueryIterator manages a stream of *aiplatformpb.SavedQuery. +type SavedQueryIterator struct { + items []*aiplatformpb.SavedQuery + 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 []*aiplatformpb.SavedQuery, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SavedQueryIterator) 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 *SavedQueryIterator) Next() (*aiplatformpb.SavedQuery, error) { + var item *aiplatformpb.SavedQuery + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SavedQueryIterator) bufLen() int { + return len(it.items) +} + +func (it *SavedQueryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/aiplatform/apiv1beta1/dataset_client_example_test.go b/aiplatform/apiv1beta1/dataset_client_example_test.go index abf4d57271e3..eae682694885 100644 --- a/aiplatform/apiv1beta1/dataset_client_example_test.go +++ b/aiplatform/apiv1beta1/dataset_client_example_test.go @@ -229,6 +229,32 @@ func ExampleDatasetClient_ListDataItems() { } } +func ExampleDatasetClient_ListSavedQueries() { + ctx := context.Background() + c, err := aiplatform.NewDatasetClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListSavedQueriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#ListSavedQueriesRequest. + } + it := c.ListSavedQueries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + func ExampleDatasetClient_GetAnnotationSpec() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index dfda25146008..548d1d8e554c 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -90,6 +90,11 @@ "ListOperations" ] }, + "ListSavedQueries": { + "methods": [ + "ListSavedQueries" + ] + }, "SetIamPolicy": { "methods": [ "SetIamPolicy" diff --git a/aiplatform/go.mod b/aiplatform/go.mod index 93274a71fa76..f1baab475284 100644 --- a/aiplatform/go.mod +++ b/aiplatform/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/aiplatform/go.sum b/aiplatform/go.sum index ece2e0dfe308..cc18f1ad14b3 100644 --- a/aiplatform/go.sum +++ b/aiplatform/go.sum @@ -586,8 +586,8 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 h1:itnFmgk4Ls5nT+mYO2ZK6F0DpKsGZLhB5BB9y5ZL2HA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/channel/apiv1/cloud_channel_client.go b/channel/apiv1/cloud_channel_client.go index 3077df11ad1d..044a63009cb3 100644 --- a/channel/apiv1/cloud_channel_client.go +++ b/channel/apiv1/cloud_channel_client.go @@ -87,6 +87,10 @@ type CloudChannelCallOptions struct { RegisterSubscriber []gax.CallOption UnregisterSubscriber []gax.CallOption ListSubscribers []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultCloudChannelGRPCClientOptions() []option.ClientOption { @@ -488,6 +492,10 @@ func defaultCloudChannelCallOptions() *CloudChannelCallOptions { }) }), }, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -552,6 +560,10 @@ type internalCloudChannelClient interface { RegisterSubscriber(context.Context, *channelpb.RegisterSubscriberRequest, ...gax.CallOption) (*channelpb.RegisterSubscriberResponse, error) UnregisterSubscriber(context.Context, *channelpb.UnregisterSubscriberRequest, ...gax.CallOption) (*channelpb.UnregisterSubscriberResponse, error) ListSubscribers(context.Context, *channelpb.ListSubscribersRequest, ...gax.CallOption) *StringIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // CloudChannelClient is a client for interacting with Cloud Channel API. @@ -1855,6 +1867,26 @@ func (c *CloudChannelClient) ListSubscribers(ctx context.Context, req *channelpb return c.internalClient.ListSubscribers(ctx, req, opts...) } +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *CloudChannelClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *CloudChannelClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *CloudChannelClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *CloudChannelClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // cloudChannelGRPCClient is a client for interacting with Cloud Channel API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -1876,6 +1908,8 @@ type cloudChannelGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -1932,6 +1966,7 @@ func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*C disableDeadlines: disableDeadlines, cloudChannelClient: channelpb.NewCloudChannelServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -3270,6 +3305,94 @@ func (c *cloudChannelGRPCClient) ListSubscribers(ctx context.Context, req *chann return it } +func (c *cloudChannelGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *cloudChannelGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *cloudChannelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *cloudChannelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ActivateEntitlementOperation manages a long-running operation from ActivateEntitlement. type ActivateEntitlementOperation struct { lro *longrunning.Operation @@ -4289,6 +4412,53 @@ func (it *OfferIterator) takeBuf() interface{} { 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 +} + // ProductIterator manages a stream of *channelpb.Product. type ProductIterator struct { items []*channelpb.Product diff --git a/channel/apiv1/cloud_channel_client_example_test.go b/channel/apiv1/cloud_channel_client_example_test.go index 2a6bbe8c6ec3..cf43025ebb7b 100644 --- a/channel/apiv1/cloud_channel_client_example_test.go +++ b/channel/apiv1/cloud_channel_client_example_test.go @@ -22,6 +22,7 @@ import ( channel "cloud.google.com/go/channel/apiv1" "google.golang.org/api/iterator" channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewCloudChannelClient() { @@ -1058,3 +1059,85 @@ func ExampleCloudChannelClient_ListSubscribers() { _ = resp } } + +func ExampleCloudChannelClient_CancelOperation() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleCloudChannelClient_DeleteOperation() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleCloudChannelClient_GetOperation() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleCloudChannelClient_ListOperations() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/channel/apiv1/gapic_metadata.json b/channel/apiv1/gapic_metadata.json index 5c96bca7f173..5b76f8688e81 100644 --- a/channel/apiv1/gapic_metadata.json +++ b/channel/apiv1/gapic_metadata.json @@ -20,6 +20,11 @@ "CancelEntitlement" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "ChangeOffer": { "methods": [ "ChangeOffer" @@ -80,6 +85,11 @@ "DeleteCustomerRepricingConfig" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "GetChannelPartnerLink": { "methods": [ "GetChannelPartnerLink" @@ -105,6 +115,11 @@ "GetEntitlement" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ImportCustomer": { "methods": [ "ImportCustomer" @@ -140,6 +155,11 @@ "ListOffers" ] }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListProducts": { "methods": [ "ListProducts" diff --git a/channel/go.mod b/channel/go.mod index 26dc7c038528..5261c4531b95 100644 --- a/channel/go.mod +++ b/channel/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/channel/go.sum b/channel/go.sum index f00d995cec43..92102ddee870 100644 --- a/channel/go.sum +++ b/channel/go.sum @@ -587,6 +587,8 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/contactcenterinsights/apiv1/contact_center_insights_client.go b/contactcenterinsights/apiv1/contact_center_insights_client.go index 8c0e3c778123..6e0512228463 100644 --- a/contactcenterinsights/apiv1/contact_center_insights_client.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client.go @@ -76,6 +76,9 @@ type CallOptions struct { ListViews []gax.CallOption UpdateView []gax.CallOption DeleteView []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -466,6 +469,39 @@ func defaultCallOptions() *CallOptions { }) }), }, + CancelOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListOperations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, } } @@ -514,6 +550,9 @@ type internalClient interface { ListViews(context.Context, *contactcenterinsightspb.ListViewsRequest, ...gax.CallOption) *ViewIterator UpdateView(context.Context, *contactcenterinsightspb.UpdateViewRequest, ...gax.CallOption) (*contactcenterinsightspb.View, error) DeleteView(context.Context, *contactcenterinsightspb.DeleteViewRequest, ...gax.CallOption) error + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Contact Center AI Insights API. @@ -764,6 +803,21 @@ func (c *Client) DeleteView(ctx context.Context, req *contactcenterinsightspb.De return c.internalClient.DeleteView(ctx, req, opts...) } +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Contact Center AI Insights API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -785,6 +839,8 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -819,6 +875,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: contactcenterinsightspb.NewContactCenterInsightsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -1696,6 +1753,91 @@ func (c *gRPCClient) DeleteView(ctx context.Context, req *contactcenterinsightsp return err } +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateAnalysisOperation manages a long-running operation from CreateAnalysis. type CreateAnalysisOperation struct { lro *longrunning.Operation @@ -2193,6 +2335,53 @@ func (it *ConversationIterator) takeBuf() interface{} { 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 +} + // PhraseMatcherIterator manages a stream of *contactcenterinsightspb.PhraseMatcher. type PhraseMatcherIterator struct { items []*contactcenterinsightspb.PhraseMatcher diff --git a/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go b/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go index 7fb1b3f426bb..30e7fab8816c 100644 --- a/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go @@ -22,6 +22,7 @@ import ( contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1" "google.golang.org/api/iterator" contactcenterinsightspb "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { @@ -759,3 +760,67 @@ func ExampleClient_DeleteView() { // TODO: Handle error. } } + +func ExampleClient_CancelOperation() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/contactcenterinsights/apiv1/gapic_metadata.json b/contactcenterinsights/apiv1/gapic_metadata.json index 0e9a3529db15..1943a9d4efc8 100644 --- a/contactcenterinsights/apiv1/gapic_metadata.json +++ b/contactcenterinsights/apiv1/gapic_metadata.json @@ -20,6 +20,11 @@ "CalculateStats" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateAnalysis": { "methods": [ "CreateAnalysis" @@ -100,6 +105,11 @@ "GetIssueModel" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetPhraseMatcher": { "methods": [ "GetPhraseMatcher" @@ -135,6 +145,11 @@ "ListIssues" ] }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListPhraseMatchers": { "methods": [ "ListPhraseMatchers" diff --git a/contactcenterinsights/go.mod b/contactcenterinsights/go.mod index 5687b19448e2..7f37edca232e 100644 --- a/contactcenterinsights/go.mod +++ b/contactcenterinsights/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/contactcenterinsights/go.sum b/contactcenterinsights/go.sum index f00d995cec43..92102ddee870 100644 --- a/contactcenterinsights/go.sum +++ b/contactcenterinsights/go.sum @@ -587,6 +587,8 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/go.mod b/go.mod index 47bcd2d381f0..78c6cdb423bd 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index 3d7338fb5dd2..f6bf485482e5 100644 --- a/go.sum +++ b/go.sum @@ -596,8 +596,8 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 h1:itnFmgk4Ls5nT+mYO2ZK6F0DpKsGZLhB5BB9y5ZL2HA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/internal/generated/snippets/aiplatform/apiv1/DatasetClient/ListSavedQueries/main.go b/internal/generated/snippets/aiplatform/apiv1/DatasetClient/ListSavedQueries/main.go new file mode 100644 index 000000000000..61957f7174bc --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/DatasetClient/ListSavedQueries/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_DatasetService_ListSavedQueries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewDatasetClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListSavedQueriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListSavedQueriesRequest. + } + it := c.ListSavedQueries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_DatasetService_ListSavedQueries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json b/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json index 7e03f7589c65..09250bfce1ed 100644 --- a/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -745,6 +745,52 @@ } ] }, + { + "regionTag": "aiplatform_v1_generated_DatasetService_ListSavedQueries_sync", + "title": "aiplatform ListSavedQueries Sample", + "description": "ListSavedQueries lists SavedQueries in a Dataset.", + "file": "DatasetClient/ListSavedQueries/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListSavedQueries", + "fullName": "google.cloud.aiplatform.v1.DatasetClient.ListSavedQueries", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.ListSavedQueriesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "SavedQueryIterator", + "client": { + "shortName": "DatasetClient", + "fullName": "google.cloud.aiplatform.v1.DatasetClient" + }, + "method": { + "shortName": "ListSavedQueries", + "fullName": "google.cloud.aiplatform.v1.DatasetService.ListSavedQueries", + "service": { + "shortName": "DatasetService", + "fullName": "google.cloud.aiplatform.v1.DatasetService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1_generated_DatasetService_SetIamPolicy_sync", "title": "aiplatform SetIamPolicy Sample", diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/DatasetClient/ListSavedQueries/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/DatasetClient/ListSavedQueries/main.go new file mode 100644 index 000000000000..73dab2bb07ac --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/DatasetClient/ListSavedQueries/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewDatasetClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListSavedQueriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#ListSavedQueriesRequest. + } + it := c.ListSavedQueries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 3c9555a00c87..60ebabb209dc 100644 --- a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -745,6 +745,52 @@ } ] }, + { + "regionTag": "aiplatform_v1beta1_generated_DatasetService_ListSavedQueries_sync", + "title": "aiplatform ListSavedQueries Sample", + "description": "ListSavedQueries lists SavedQueries in a Dataset.", + "file": "DatasetClient/ListSavedQueries/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListSavedQueries", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetClient.ListSavedQueries", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.ListSavedQueriesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "SavedQueryIterator", + "client": { + "shortName": "DatasetClient", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetClient" + }, + "method": { + "shortName": "ListSavedQueries", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries", + "service": { + "shortName": "DatasetService", + "fullName": "google.cloud.aiplatform.v1beta1.DatasetService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1beta1_generated_DatasetService_SetIamPolicy_sync", "title": "aiplatform SetIamPolicy Sample", diff --git a/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json b/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json index a584f04f4b85..33da7d1e2a11 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json +++ b/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/connection/apiv1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json b/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json index b7fb0c913426..1669175e07fc 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/connection/apiv1beta1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json b/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json index bc99b4d0f4cf..fcc173e333c2 100644 --- a/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json +++ b/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/dataexchange/apiv1beta1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index 0f7e08d85f8a..0e5ef21737b2 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/datatransfer/apiv1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json b/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json index a84645b2e7c5..dbaace3af3d8 100644 --- a/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json +++ b/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/migration/apiv2", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json b/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json index fa659d1a4f8c..153199860fc9 100644 --- a/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json +++ b/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/migration/apiv2alpha", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json b/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json index bc0ec85772c5..686a23ebee04 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json +++ b/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/reservation/apiv1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json b/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json index cc9149ba17de..665271a9356c 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/reservation/apiv1beta1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json b/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json index 8c964abb41bc..57fd9c68f4ff 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json +++ b/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json b/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json index 544721f77642..19d86aa95038 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1beta1", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json b/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json index 2547b1181b57..1257f113a92b 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1beta2", - "version": "1.33.0", + "version": "1.34.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelOperation/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelOperation/main.go new file mode 100644 index 000000000000..530a1e5a577c --- /dev/null +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelOperation/main.go @@ -0,0 +1,46 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudchannel_v1_generated_CloudChannelService_CancelOperation_sync] + +package main + +import ( + "context" + + channel "cloud.google.com/go/channel/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END cloudchannel_v1_generated_CloudChannelService_CancelOperation_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteOperation/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteOperation/main.go new file mode 100644 index 000000000000..7e4e7cac8599 --- /dev/null +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudchannel_v1_generated_CloudChannelService_DeleteOperation_sync] + +package main + +import ( + "context" + + channel "cloud.google.com/go/channel/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END cloudchannel_v1_generated_CloudChannelService_DeleteOperation_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetOperation/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetOperation/main.go new file mode 100644 index 000000000000..a182bd125793 --- /dev/null +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetOperation/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudchannel_v1_generated_CloudChannelService_GetOperation_sync] + +package main + +import ( + "context" + + channel "cloud.google.com/go/channel/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudchannel_v1_generated_CloudChannelService_GetOperation_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOperations/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOperations/main.go new file mode 100644 index 000000000000..4d24773641ee --- /dev/null +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOperations/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudchannel_v1_generated_CloudChannelService_ListOperations_sync] + +package main + +import ( + "context" + + channel "cloud.google.com/go/channel/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := channel.NewCloudChannelClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END cloudchannel_v1_generated_CloudChannelService_ListOperations_sync] diff --git a/internal/generated/snippets/channel/apiv1/snippet_metadata.google.cloud.channel.v1.json b/internal/generated/snippets/channel/apiv1/snippet_metadata.google.cloud.channel.v1.json index e282a9d5525d..695574b831e3 100644 --- a/internal/generated/snippets/channel/apiv1/snippet_metadata.google.cloud.channel.v1.json +++ b/internal/generated/snippets/channel/apiv1/snippet_metadata.google.cloud.channel.v1.json @@ -103,6 +103,51 @@ } ] }, + { + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CancelOperation_sync", + "title": "cloudchannel CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "CloudChannelClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.channel.v1.CloudChannelClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "CloudChannelClient", + "fullName": "google.cloud.channel.v1.CloudChannelClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.channel.v1.CloudChannelService.CancelOperation", + "service": { + "shortName": "CloudChannelService", + "fullName": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync", "title": "cloudchannel ChangeOffer Sample", @@ -652,6 +697,51 @@ } ] }, + { + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteOperation_sync", + "title": "cloudchannel DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "CloudChannelClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.channel.v1.CloudChannelClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "CloudChannelClient", + "fullName": "google.cloud.channel.v1.CloudChannelClient" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteOperation", + "service": { + "shortName": "CloudChannelService", + "fullName": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, { "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", "title": "cloudchannel GetChannelPartnerLink Sample", @@ -882,6 +972,52 @@ } ] }, + { + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetOperation_sync", + "title": "cloudchannel GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "CloudChannelClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.channel.v1.CloudChannelClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "CloudChannelClient", + "fullName": "google.cloud.channel.v1.CloudChannelClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetOperation", + "service": { + "shortName": "CloudChannelService", + "fullName": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", "title": "cloudchannel ImportCustomer Sample", @@ -1204,6 +1340,52 @@ } ] }, + { + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOperations_sync", + "title": "cloudchannel ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "CloudChannelClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.channel.v1.CloudChannelClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "CloudChannelClient", + "fullName": "google.cloud.channel.v1.CloudChannelClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListOperations", + "service": { + "shortName": "CloudChannelService", + "fullName": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", "title": "cloudchannel ListProducts Sample", diff --git a/internal/generated/snippets/contactcenterinsights/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/contactcenterinsights/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..98a7cd8d888c --- /dev/null +++ b/internal/generated/snippets/contactcenterinsights/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START contactcenterinsights_v1_generated_ContactCenterInsights_CancelOperation_sync] + +package main + +import ( + "context" + + contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END contactcenterinsights_v1_generated_ContactCenterInsights_CancelOperation_sync] diff --git a/internal/generated/snippets/contactcenterinsights/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/contactcenterinsights/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..a57755e3c7c5 --- /dev/null +++ b/internal/generated/snippets/contactcenterinsights/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START contactcenterinsights_v1_generated_ContactCenterInsights_GetOperation_sync] + +package main + +import ( + "context" + + contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END contactcenterinsights_v1_generated_ContactCenterInsights_GetOperation_sync] diff --git a/internal/generated/snippets/contactcenterinsights/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/contactcenterinsights/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..a40900f064e9 --- /dev/null +++ b/internal/generated/snippets/contactcenterinsights/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START contactcenterinsights_v1_generated_ContactCenterInsights_ListOperations_sync] + +package main + +import ( + "context" + + contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := contactcenterinsights.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END contactcenterinsights_v1_generated_ContactCenterInsights_ListOperations_sync] diff --git a/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 00b908c46b9f..24aebfc3e161 100644 --- a/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -103,6 +103,51 @@ } ] }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CancelOperation_sync", + "title": "contactcenterinsights CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.contactcenterinsights.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.contactcenterinsights.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CancelOperation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync", "title": "contactcenterinsights CreateAnalysis Sample", @@ -835,6 +880,52 @@ } ] }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetOperation_sync", + "title": "contactcenterinsights GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.contactcenterinsights.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.contactcenterinsights.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetOperation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync", "title": "contactcenterinsights GetPhraseMatcher Sample", @@ -1157,6 +1248,52 @@ } ] }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListOperations_sync", + "title": "contactcenterinsights ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.contactcenterinsights.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.contactcenterinsights.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListOperations", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync", "title": "contactcenterinsights ListPhraseMatchers Sample", diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 79b5c448e409..69babbe15128 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -118,7 +118,7 @@ require ( cloud.google.com/go/workflows v1.1.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f ) replace cloud.google.com/go/storagetransfer => ../../../storagetransfer diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index e48d1f6ea57d..2595d45ee4d3 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -212,8 +212,9 @@ google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220621134657-43db42f103f7/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220622131801-db39fadba55f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 h1:itnFmgk4Ls5nT+mYO2ZK6F0DpKsGZLhB5BB9y5ZL2HA= google.golang.org/genproto v0.0.0-20220623142657-077d458a5694/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index 04a6c50132c7..92ebf78d896d 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -271,6 +271,8 @@ google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220622131801-db39fadba55f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 h1:itnFmgk4Ls5nT+mYO2ZK6F0DpKsGZLhB5BB9y5ZL2HA= google.golang.org/genproto v0.0.0-20220623142657-077d458a5694/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=