chore(all): auto-regenerate gapics (#6253)
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.
If you have been assigned to review this PR, please:
- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.
Corresponding genproto PR: https://github.com/googleapis/go-genproto/pull/834
Changes:
feat(aiplatform): add ListSavedQueries rpc to aiplatform v1 dataset_service.proto feat: add saved_query.proto to aiplatform v1 feat: add saved_query_id to InputDataConfig in aiplatform v1 training_pipeline.proto
PiperOrigin-RevId: 456872211
Source-Link: https://github.com/googleapis/googleapis/commit/88f397321b5f8fc1060fcd569d214e2e5c6249a4
feat(aiplatform): add ListSavedQueries rpc to aiplatform v1beta1 dataset_service.proto feat: add saved_query.proto to aiplatform v1beta1 feat: add saved_query_id to InputDataConfig in aiplatform v1beta1 training_pipeline.proto
PiperOrigin-RevId: 456872207
Source-Link: https://github.com/googleapis/googleapis/commit/aeb384ae8c1a00ead951ef70179794a3f40c0799
feat(channel): google.longrunning.Operations for Cloud Channel apis
PiperOrigin-RevId: 456853650
Source-Link: https://github.com/googleapis/googleapis/commit/ebf8158cdf124fcc2d70b8a0e4f9d19195691e99
chore(contactcenterinsights):add LRO to API list
PiperOrigin-RevId: 456850784
Source-Link: https://github.com/googleapis/googleapis/commit/17cc208d408380524606316ce0737c9188ec272d
diff --git a/aiplatform/apiv1/dataset_client.go b/aiplatform/apiv1/dataset_client.go
index 4df8a27..51b6a7a 100644
--- a/aiplatform/apiv1/dataset_client.go
+++ b/aiplatform/apiv1/dataset_client.go
@@ -51,6 +51,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 b355f7e..b94f366 100644
--- a/aiplatform/apiv1/dataset_client_example_test.go
+++ b/aiplatform/apiv1/dataset_client_example_test.go
@@ -229,6 +229,32 @@
}
}
+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 e415d24..14d14b7 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 a051d11..2c50f31 100644
--- a/aiplatform/apiv1beta1/dataset_client.go
+++ b/aiplatform/apiv1beta1/dataset_client.go
@@ -51,6 +51,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 abf4d57..eae6826 100644
--- a/aiplatform/apiv1beta1/dataset_client_example_test.go
+++ b/aiplatform/apiv1beta1/dataset_client_example_test.go
@@ -229,6 +229,32 @@
}
}
+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 dfda251..548d1d8 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 93274a7..f1baab4 100644
--- a/aiplatform/go.mod
+++ b/aiplatform/go.mod
@@ -6,7 +6,7 @@
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 ece2e0d..cc18f1a 100644
--- a/aiplatform/go.sum
+++ b/aiplatform/go.sum
@@ -586,8 +586,8 @@
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 3077df1..044a630 100644
--- a/channel/apiv1/cloud_channel_client.go
+++ b/channel/apiv1/cloud_channel_client.go
@@ -87,6 +87,10 @@
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 @@
})
}),
},
+ CancelOperation: []gax.CallOption{},
+ DeleteOperation: []gax.CallOption{},
+ GetOperation: []gax.CallOption{},
+ ListOperations: []gax.CallOption{},
}
}
@@ -552,6 +560,10 @@
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 @@
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 @@
// 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 @@
disableDeadlines: disableDeadlines,
cloudChannelClient: channelpb.NewCloudChannelServiceClient(connPool),
CallOptions: &client.CallOptions,
+ operationsClient: longrunningpb.NewOperationsClient(connPool),
}
c.setGoogleClientInfo()
@@ -3270,6 +3305,94 @@
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 @@
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 2a6bbe8..cf43025 100644
--- a/channel/apiv1/cloud_channel_client_example_test.go
+++ b/channel/apiv1/cloud_channel_client_example_test.go
@@ -22,6 +22,7 @@
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 @@
_ = 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 5c96bca..5b76f86 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 26dc7c0..5261c45 100644
--- a/channel/go.mod
+++ b/channel/go.mod
@@ -6,7 +6,7 @@
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 f00d995..92102dd 100644
--- a/channel/go.sum
+++ b/channel/go.sum
@@ -587,6 +587,8 @@
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 8c0e3c7..6e05122 100644
--- a/contactcenterinsights/apiv1/contact_center_insights_client.go
+++ b/contactcenterinsights/apiv1/contact_center_insights_client.go
@@ -76,6 +76,9 @@
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 @@
})
}),
},
+ 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 @@
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 @@
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 @@
// 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 @@
disableDeadlines: disableDeadlines,
client: contactcenterinsightspb.NewContactCenterInsightsClient(connPool),
CallOptions: &client.CallOptions,
+ operationsClient: longrunningpb.NewOperationsClient(connPool),
}
c.setGoogleClientInfo()
@@ -1696,6 +1753,91 @@
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 @@
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 7fb1b3f..30e7fab 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 @@
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 @@
// 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 0e9a352..1943a9d 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 5687b19..7f37edc 100644
--- a/contactcenterinsights/go.mod
+++ b/contactcenterinsights/go.mod
@@ -6,7 +6,7 @@
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 f00d995..92102dd 100644
--- a/contactcenterinsights/go.sum
+++ b/contactcenterinsights/go.sum
@@ -587,6 +587,8 @@
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 47bcd2d..78c6cdb 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@
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 3d7338f..f6bf485 100644
--- a/go.sum
+++ b/go.sum
@@ -596,8 +596,8 @@
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 0000000..61957f7
--- /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 7e03f75..09250bf 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
@@ -746,6 +746,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",
"description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.",
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 0000000..73dab2b
--- /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 3c9555a..60ebabb 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
@@ -746,6 +746,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",
"description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.",
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 a584f04..33da7d1 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 b7fb0c9..1669175 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 bc99b4d..fcc173e 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 0f7e08d..0e5ef21 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 a84645b..dbaace3 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 fa659d1..1531998 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 bc0ec85..686a23e 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 cc9149b..665271a 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 8c964ab..57fd9c6 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 544721f..19d86aa 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 2547b11..1257f11 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 0000000..530a1e5
--- /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 0000000..7e4e7ca
--- /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 0000000..a182bd1
--- /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 0000000..4d24773
--- /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 e282a9d..695574b 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
@@ -104,6 +104,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",
"description": "ChangeOffer updates the Offer for an existing customer entitlement.\n\nAn entitlement update is a long-running operation and it updates the\nentitlement as a result of fulfillment.\n\nPossible error codes: \n\n PERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: Offer or Entitlement resource not found.\n\n INTERNAL: Any non-user error related to a technical issue in the\n backend. Contact Cloud Channel support.\n\n UNKNOWN: Any non-user error related to a technical issue in the backend.\n Contact Cloud Channel support.\n\nReturn value: \nThe ID of a long-running operation.\n\nTo get the results of the operation, call the GetOperation method of\nCloudChannelOperationsService. The Operation metadata will contain an\ninstance of OperationMetadata.",
@@ -653,6 +698,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",
"description": "GetChannelPartnerLink returns the requested ChannelPartnerLink resource.\nYou must be a distributor to call this method.\n\nPossible error codes: \n\n PERMISSION_DENIED: The reseller account making the request is different\n from the reseller account in the API request.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: ChannelPartnerLink resource not found because of an\n invalid channel partner link name.\n\nReturn value: \nThe ChannelPartnerLink resource.",
@@ -883,6 +973,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",
"description": "ImportCustomer imports a Customer from the Cloud Identity associated with the provided\nCloud Identity ID or domain before a TransferEntitlements call. If a\nlinked Customer already exists and overwrite_if_exists is true, it will\nupdate that Customer’s data.\n\nPossible error codes: \n\n PERMISSION_DENIED: The reseller account making the request is different\n from the reseller account in the API request.\n\n NOT_FOUND: Cloud Identity doesn’t exist or was deleted.\n\n INVALID_ARGUMENT: Required parameters are missing, or the auth_token is\n expired or invalid.\n\n ALREADY_EXISTS: A customer already exists and has conflicting critical\n fields. Requires an overwrite.\n\nReturn value: \nThe Customer.",
@@ -1205,6 +1341,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",
"description": "ListProducts lists the Products the reseller is authorized to sell.\n\nPossible error codes: \n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.",
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 0000000..98a7cd8
--- /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 0000000..a57755e
--- /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 0000000..a40900f
--- /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 00b908c..24aebfc 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
@@ -104,6 +104,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",
"description": "CreateAnalysis creates an analysis. The long running operation is done when the analysis\nhas completed.",
@@ -836,6 +881,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",
"description": "GetPhraseMatcher gets a phrase matcher.",
@@ -1158,6 +1249,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",
"description": "ListPhraseMatchers lists phrase matchers.",
diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod
index 79b5c44..69babbe 100644
--- a/internal/generated/snippets/go.mod
+++ b/internal/generated/snippets/go.mod
@@ -118,7 +118,7 @@
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 e48d1f6..2595d45 100644
--- a/internal/generated/snippets/go.sum
+++ b/internal/generated/snippets/go.sum
@@ -212,8 +212,9 @@
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 04a6c50..92ebf78 100644
--- a/internal/godocfx/go.sum
+++ b/internal/godocfx/go.sum
@@ -271,6 +271,8 @@
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=