diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client.go b/aiplatform/apiv1beta1/featurestore_online_serving_client.go index f069b5d4071f..1d1a46351fdc 100644 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client.go @@ -43,6 +43,7 @@ var newFeaturestoreOnlineServingClientHook clientHook type FeaturestoreOnlineServingCallOptions struct { ReadFeatureValues []gax.CallOption StreamingReadFeatureValues []gax.CallOption + WriteFeatureValues []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption @@ -71,6 +72,7 @@ func defaultFeaturestoreOnlineServingCallOptions() *FeaturestoreOnlineServingCal return &FeaturestoreOnlineServingCallOptions{ ReadFeatureValues: []gax.CallOption{}, StreamingReadFeatureValues: []gax.CallOption{}, + WriteFeatureValues: []gax.CallOption{}, GetLocation: []gax.CallOption{}, ListLocations: []gax.CallOption{}, GetIamPolicy: []gax.CallOption{}, @@ -91,6 +93,7 @@ type internalFeaturestoreOnlineServingClient interface { Connection() *grpc.ClientConn ReadFeatureValues(context.Context, *aiplatformpb.ReadFeatureValuesRequest, ...gax.CallOption) (*aiplatformpb.ReadFeatureValuesResponse, error) StreamingReadFeatureValues(context.Context, *aiplatformpb.StreamingReadFeatureValuesRequest, ...gax.CallOption) (aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient, error) + WriteFeatureValues(context.Context, *aiplatformpb.WriteFeatureValuesRequest, ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) @@ -151,6 +154,15 @@ func (c *FeaturestoreOnlineServingClient) StreamingReadFeatureValues(ctx context return c.internalClient.StreamingReadFeatureValues(ctx, req, opts...) } +// WriteFeatureValues writes Feature values of one or more entities of an EntityType. +// +// The Feature values are merged into existing entities if any. The Feature +// values to be written must have timestamp within the online storage +// retention. +func (c *FeaturestoreOnlineServingClient) WriteFeatureValues(ctx context.Context, req *aiplatformpb.WriteFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) { + return c.internalClient.WriteFeatureValues(ctx, req, opts...) +} + // GetLocation gets information about a location. func (c *FeaturestoreOnlineServingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { return c.internalClient.GetLocation(ctx, req, opts...) @@ -339,6 +351,23 @@ func (c *featurestoreOnlineServingGRPCClient) StreamingReadFeatureValues(ctx con return resp, nil } +func (c *featurestoreOnlineServingGRPCClient) WriteFeatureValues(ctx context.Context, req *aiplatformpb.WriteFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WriteFeatureValues[0:len((*c.CallOptions).WriteFeatureValues):len((*c.CallOptions).WriteFeatureValues)], opts...) + var resp *aiplatformpb.WriteFeatureValuesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.featurestoreOnlineServingClient.WriteFeatureValues(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *featurestoreOnlineServingGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go index 046bc7584a7d..821954e537fc 100644 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go @@ -59,6 +59,26 @@ func ExampleFeaturestoreOnlineServingClient_ReadFeatureValues() { _ = resp } +func ExampleFeaturestoreOnlineServingClient_WriteFeatureValues() { + ctx := context.Background() + c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteFeatureValuesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#WriteFeatureValuesRequest. + } + resp, err := c.WriteFeatureValues(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleFeaturestoreOnlineServingClient_GetLocation() { ctx := context.Background() c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index 8ddcc92203a5..75762b835a69 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -361,6 +361,11 @@ "methods": [ "WaitOperation" ] + }, + "WriteFeatureValues": { + "methods": [ + "WriteFeatureValues" + ] } } } diff --git a/aiplatform/go.mod b/aiplatform/go.mod index 21dcca199cd0..e93dd5abfa8c 100644 --- a/aiplatform/go.mod +++ b/aiplatform/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.90.0 - google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f + google.golang.org/api v0.92.0 + google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) diff --git a/aiplatform/go.sum b/aiplatform/go.sum index 2127fe0836b0..573f69c7e64a 100644 --- a/aiplatform/go.sum +++ b/aiplatform/go.sum @@ -499,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.90.0 h1:WMnUWAvihIClUYFNeFA69VTuR3duKS3IalMGDQcLvq8= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -589,8 +589,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/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f h1:XVHpVMvPs4MtH3h6cThzKs2snNexcfd35vQx2T3IuIY= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 h1:zZnTt15U44/Txe/9cN/tVbteBkPMiyXK48hPsKRmqj4= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/asset/apiv1/asset_client.go b/asset/apiv1/asset_client.go index c057fd04b12b..f3ab3985204f 100644 --- a/asset/apiv1/asset_client.go +++ b/asset/apiv1/asset_client.go @@ -55,12 +55,14 @@ type CallOptions struct { AnalyzeIamPolicy []gax.CallOption AnalyzeIamPolicyLongrunning []gax.CallOption AnalyzeMove []gax.CallOption + QueryAssets []gax.CallOption CreateSavedQuery []gax.CallOption GetSavedQuery []gax.CallOption ListSavedQueries []gax.CallOption UpdateSavedQuery []gax.CallOption DeleteSavedQuery []gax.CallOption BatchGetEffectiveIamPolicies []gax.CallOption + GetOperation []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -173,14 +175,26 @@ func defaultCallOptions() *CallOptions { }) }), }, - AnalyzeIamPolicyLongrunning: []gax.CallOption{}, - AnalyzeMove: []gax.CallOption{}, + AnalyzeIamPolicyLongrunning: []gax.CallOption{}, + AnalyzeMove: []gax.CallOption{}, + QueryAssets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, CreateSavedQuery: []gax.CallOption{}, GetSavedQuery: []gax.CallOption{}, ListSavedQueries: []gax.CallOption{}, UpdateSavedQuery: []gax.CallOption{}, DeleteSavedQuery: []gax.CallOption{}, BatchGetEffectiveIamPolicies: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, } } @@ -204,12 +218,14 @@ type internalClient interface { AnalyzeIamPolicyLongrunning(context.Context, *assetpb.AnalyzeIamPolicyLongrunningRequest, ...gax.CallOption) (*AnalyzeIamPolicyLongrunningOperation, error) AnalyzeIamPolicyLongrunningOperation(name string) *AnalyzeIamPolicyLongrunningOperation AnalyzeMove(context.Context, *assetpb.AnalyzeMoveRequest, ...gax.CallOption) (*assetpb.AnalyzeMoveResponse, error) + QueryAssets(context.Context, *assetpb.QueryAssetsRequest, ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) CreateSavedQuery(context.Context, *assetpb.CreateSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) GetSavedQuery(context.Context, *assetpb.GetSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) ListSavedQueries(context.Context, *assetpb.ListSavedQueriesRequest, ...gax.CallOption) *SavedQueryIterator UpdateSavedQuery(context.Context, *assetpb.UpdateSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) DeleteSavedQuery(context.Context, *assetpb.DeleteSavedQueryRequest, ...gax.CallOption) error BatchGetEffectiveIamPolicies(context.Context, *assetpb.BatchGetEffectiveIamPoliciesRequest, ...gax.CallOption) (*assetpb.BatchGetEffectiveIamPoliciesResponse, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // Client is a client for interacting with Cloud Asset API. @@ -366,6 +382,24 @@ func (c *Client) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveReques return c.internalClient.AnalyzeMove(ctx, req, opts...) } +// QueryAssets issue a job that queries assets using a SQL statement compatible with +// BigQuery Standard +// SQL (at http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). +// +// If the query execution finishes within timeout and there’s no pagination, +// the full query results will be returned in the QueryAssetsResponse. +// +// Otherwise, full query results can be obtained by issuing extra requests +// with the job_reference from the a previous QueryAssets call. +// +// Note, the query result has approximately 10 GB limitation enforced by +// BigQuery +// https://cloud.google.com/bigquery/docs/best-practices-performance-output (at https://cloud.google.com/bigquery/docs/best-practices-performance-output), +// queries return larger results will result in errors. +func (c *Client) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRequest, opts ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) { + return c.internalClient.QueryAssets(ctx, req, opts...) +} + // CreateSavedQuery creates a saved query in a parent project/folder/organization. func (c *Client) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSavedQueryRequest, opts ...gax.CallOption) (*assetpb.SavedQuery, error) { return c.internalClient.CreateSavedQuery(ctx, req, opts...) @@ -396,6 +430,11 @@ func (c *Client) BatchGetEffectiveIamPolicies(ctx context.Context, req *assetpb. return c.internalClient.BatchGetEffectiveIamPolicies(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...) +} + // gRPCClient is a client for interacting with Cloud Asset API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -417,6 +456,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 } @@ -451,6 +492,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: assetpb.NewAssetServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -842,6 +884,28 @@ func (c *gRPCClient) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveRe return resp, nil } +func (c *gRPCClient) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRequest, opts ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 200000*time.Millisecond) + defer cancel() + ctx = cctx + } + 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).QueryAssets[0:len((*c.CallOptions).QueryAssets):len((*c.CallOptions).QueryAssets)], opts...) + var resp *assetpb.QueryAssetsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.QueryAssets(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *gRPCClient) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSavedQueryRequest, opts ...gax.CallOption) (*assetpb.SavedQuery, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -968,6 +1032,23 @@ func (c *gRPCClient) BatchGetEffectiveIamPolicies(ctx context.Context, req *asse return resp, nil } +func (c *gRPCClient) 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 +} + // AnalyzeIamPolicyLongrunningOperation manages a long-running operation from AnalyzeIamPolicyLongrunning. type AnalyzeIamPolicyLongrunningOperation struct { lro *longrunning.Operation diff --git a/asset/apiv1/asset_client_example_test.go b/asset/apiv1/asset_client_example_test.go index fee01cdc23ab..a607e5d6ba59 100644 --- a/asset/apiv1/asset_client_example_test.go +++ b/asset/apiv1/asset_client_example_test.go @@ -22,6 +22,7 @@ import ( asset "cloud.google.com/go/asset/apiv1" "google.golang.org/api/iterator" assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { @@ -322,6 +323,26 @@ func ExampleClient_AnalyzeMove() { _ = resp } +func ExampleClient_QueryAssets() { + ctx := context.Background() + c, err := asset.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &assetpb.QueryAssetsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1#QueryAssetsRequest. + } + resp, err := c.QueryAssets(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_CreateSavedQuery() { ctx := context.Background() c, err := asset.NewClient(ctx) @@ -445,3 +466,23 @@ func ExampleClient_BatchGetEffectiveIamPolicies() { // TODO: Use resp. _ = resp } + +func ExampleClient_GetOperation() { + ctx := context.Background() + c, err := asset.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 +} diff --git a/asset/apiv1/gapic_metadata.json b/asset/apiv1/gapic_metadata.json index a2646d4354f7..10fd5089523c 100644 --- a/asset/apiv1/gapic_metadata.json +++ b/asset/apiv1/gapic_metadata.json @@ -65,6 +65,11 @@ "GetFeed" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetSavedQuery": { "methods": [ "GetSavedQuery" @@ -85,6 +90,11 @@ "ListSavedQueries" ] }, + "QueryAssets": { + "methods": [ + "QueryAssets" + ] + }, "SearchAllIamPolicies": { "methods": [ "SearchAllIamPolicies" diff --git a/asset/go.mod b/asset/go.mod index 23cbadfb14c2..dda18ddb3f74 100644 --- a/asset/go.mod +++ b/asset/go.mod @@ -6,8 +6,8 @@ require ( cloud.google.com/go v0.102.1 github.com/golang/protobuf v1.5.2 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/api v0.92.0 + google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/asset/go.sum b/asset/go.sum index 2391d86f7856..573f69c7e64a 100644 --- a/asset/go.sum +++ b/asset/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,9 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 h1:+jnHzr9VPj32ykQVai5DNahi9+NSp7yYuCsl5eAQtL0= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +587,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= 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 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/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 h1:zZnTt15U44/Txe/9cN/tVbteBkPMiyXK48hPsKRmqj4= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/bigquery/go.mod b/bigquery/go.mod index 0030535ae9c4..03a68b7d0b13 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -13,8 +13,8 @@ require ( go.opencensus.io v0.23.0 golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.90.0 - google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 + google.golang.org/api v0.92.0 + google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) diff --git a/bigquery/go.sum b/bigquery/go.sum index e6b2b863e7da..12b2c590b090 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -515,8 +515,9 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0 h1:WMnUWAvihIClUYFNeFA69VTuR3duKS3IalMGDQcLvq8= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -606,8 +607,8 @@ google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw= -google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 h1:zZnTt15U44/Txe/9cN/tVbteBkPMiyXK48hPsKRmqj4= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/documentai/apiv1/document_processor_client.go b/documentai/apiv1/document_processor_client.go index 7c966e2447b0..9418e82d6928 100644 --- a/documentai/apiv1/document_processor_client.go +++ b/documentai/apiv1/document_processor_client.go @@ -26,23 +26,45 @@ import ( "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" ) var newDocumentProcessorClientHook clientHook // DocumentProcessorCallOptions contains the retry settings for each method of DocumentProcessorClient. type DocumentProcessorCallOptions struct { - ProcessDocument []gax.CallOption - BatchProcessDocuments []gax.CallOption - ReviewDocument []gax.CallOption + ProcessDocument []gax.CallOption + BatchProcessDocuments []gax.CallOption + FetchProcessorTypes []gax.CallOption + ListProcessorTypes []gax.CallOption + ListProcessors []gax.CallOption + GetProcessor []gax.CallOption + GetProcessorVersion []gax.CallOption + ListProcessorVersions []gax.CallOption + DeleteProcessorVersion []gax.CallOption + DeployProcessorVersion []gax.CallOption + UndeployProcessorVersion []gax.CallOption + CreateProcessor []gax.CallOption + DeleteProcessor []gax.CallOption + EnableProcessor []gax.CallOption + DisableProcessor []gax.CallOption + SetDefaultProcessorVersion []gax.CallOption + ReviewDocument []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultDocumentProcessorGRPCClientOptions() []option.ClientOption { @@ -83,6 +105,20 @@ func defaultDocumentProcessorCallOptions() *DocumentProcessorCallOptions { }) }), }, + FetchProcessorTypes: []gax.CallOption{}, + ListProcessorTypes: []gax.CallOption{}, + ListProcessors: []gax.CallOption{}, + GetProcessor: []gax.CallOption{}, + GetProcessorVersion: []gax.CallOption{}, + ListProcessorVersions: []gax.CallOption{}, + DeleteProcessorVersion: []gax.CallOption{}, + DeployProcessorVersion: []gax.CallOption{}, + UndeployProcessorVersion: []gax.CallOption{}, + CreateProcessor: []gax.CallOption{}, + DeleteProcessor: []gax.CallOption{}, + EnableProcessor: []gax.CallOption{}, + DisableProcessor: []gax.CallOption{}, + SetDefaultProcessorVersion: []gax.CallOption{}, ReviewDocument: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -95,6 +131,11 @@ func defaultDocumentProcessorCallOptions() *DocumentProcessorCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -106,8 +147,34 @@ type internalDocumentProcessorClient interface { ProcessDocument(context.Context, *documentaipb.ProcessRequest, ...gax.CallOption) (*documentaipb.ProcessResponse, error) BatchProcessDocuments(context.Context, *documentaipb.BatchProcessRequest, ...gax.CallOption) (*BatchProcessDocumentsOperation, error) BatchProcessDocumentsOperation(name string) *BatchProcessDocumentsOperation + FetchProcessorTypes(context.Context, *documentaipb.FetchProcessorTypesRequest, ...gax.CallOption) (*documentaipb.FetchProcessorTypesResponse, error) + ListProcessorTypes(context.Context, *documentaipb.ListProcessorTypesRequest, ...gax.CallOption) *ProcessorTypeIterator + ListProcessors(context.Context, *documentaipb.ListProcessorsRequest, ...gax.CallOption) *ProcessorIterator + GetProcessor(context.Context, *documentaipb.GetProcessorRequest, ...gax.CallOption) (*documentaipb.Processor, error) + GetProcessorVersion(context.Context, *documentaipb.GetProcessorVersionRequest, ...gax.CallOption) (*documentaipb.ProcessorVersion, error) + ListProcessorVersions(context.Context, *documentaipb.ListProcessorVersionsRequest, ...gax.CallOption) *ProcessorVersionIterator + DeleteProcessorVersion(context.Context, *documentaipb.DeleteProcessorVersionRequest, ...gax.CallOption) (*DeleteProcessorVersionOperation, error) + DeleteProcessorVersionOperation(name string) *DeleteProcessorVersionOperation + DeployProcessorVersion(context.Context, *documentaipb.DeployProcessorVersionRequest, ...gax.CallOption) (*DeployProcessorVersionOperation, error) + DeployProcessorVersionOperation(name string) *DeployProcessorVersionOperation + UndeployProcessorVersion(context.Context, *documentaipb.UndeployProcessorVersionRequest, ...gax.CallOption) (*UndeployProcessorVersionOperation, error) + UndeployProcessorVersionOperation(name string) *UndeployProcessorVersionOperation + CreateProcessor(context.Context, *documentaipb.CreateProcessorRequest, ...gax.CallOption) (*documentaipb.Processor, error) + DeleteProcessor(context.Context, *documentaipb.DeleteProcessorRequest, ...gax.CallOption) (*DeleteProcessorOperation, error) + DeleteProcessorOperation(name string) *DeleteProcessorOperation + EnableProcessor(context.Context, *documentaipb.EnableProcessorRequest, ...gax.CallOption) (*EnableProcessorOperation, error) + EnableProcessorOperation(name string) *EnableProcessorOperation + DisableProcessor(context.Context, *documentaipb.DisableProcessorRequest, ...gax.CallOption) (*DisableProcessorOperation, error) + DisableProcessorOperation(name string) *DisableProcessorOperation + SetDefaultProcessorVersion(context.Context, *documentaipb.SetDefaultProcessorVersionRequest, ...gax.CallOption) (*SetDefaultProcessorVersionOperation, error) + SetDefaultProcessorVersionOperation(name string) *SetDefaultProcessorVersionOperation ReviewDocument(context.Context, *documentaipb.ReviewDocumentRequest, ...gax.CallOption) (*ReviewDocumentOperation, error) ReviewDocumentOperation(name string) *ReviewDocumentOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + 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 } // DocumentProcessorClient is a client for interacting with Cloud Document AI API. @@ -169,6 +236,124 @@ func (c *DocumentProcessorClient) BatchProcessDocumentsOperation(name string) *B return c.internalClient.BatchProcessDocumentsOperation(name) } +// FetchProcessorTypes fetches processor types. Note that we do not use ListProcessorTypes here +// because it is not paginated. +func (c *DocumentProcessorClient) FetchProcessorTypes(ctx context.Context, req *documentaipb.FetchProcessorTypesRequest, opts ...gax.CallOption) (*documentaipb.FetchProcessorTypesResponse, error) { + return c.internalClient.FetchProcessorTypes(ctx, req, opts...) +} + +// ListProcessorTypes lists the processor types that exist. +func (c *DocumentProcessorClient) ListProcessorTypes(ctx context.Context, req *documentaipb.ListProcessorTypesRequest, opts ...gax.CallOption) *ProcessorTypeIterator { + return c.internalClient.ListProcessorTypes(ctx, req, opts...) +} + +// ListProcessors lists all processors which belong to this project. +func (c *DocumentProcessorClient) ListProcessors(ctx context.Context, req *documentaipb.ListProcessorsRequest, opts ...gax.CallOption) *ProcessorIterator { + return c.internalClient.ListProcessors(ctx, req, opts...) +} + +// GetProcessor gets a processor detail. +func (c *DocumentProcessorClient) GetProcessor(ctx context.Context, req *documentaipb.GetProcessorRequest, opts ...gax.CallOption) (*documentaipb.Processor, error) { + return c.internalClient.GetProcessor(ctx, req, opts...) +} + +// GetProcessorVersion gets a processor version detail. +func (c *DocumentProcessorClient) GetProcessorVersion(ctx context.Context, req *documentaipb.GetProcessorVersionRequest, opts ...gax.CallOption) (*documentaipb.ProcessorVersion, error) { + return c.internalClient.GetProcessorVersion(ctx, req, opts...) +} + +// ListProcessorVersions lists all versions of a processor. +func (c *DocumentProcessorClient) ListProcessorVersions(ctx context.Context, req *documentaipb.ListProcessorVersionsRequest, opts ...gax.CallOption) *ProcessorVersionIterator { + return c.internalClient.ListProcessorVersions(ctx, req, opts...) +} + +// DeleteProcessorVersion deletes the processor version, all artifacts under the processor version +// will be deleted. +func (c *DocumentProcessorClient) DeleteProcessorVersion(ctx context.Context, req *documentaipb.DeleteProcessorVersionRequest, opts ...gax.CallOption) (*DeleteProcessorVersionOperation, error) { + return c.internalClient.DeleteProcessorVersion(ctx, req, opts...) +} + +// DeleteProcessorVersionOperation returns a new DeleteProcessorVersionOperation from a given name. +// The name must be that of a previously created DeleteProcessorVersionOperation, possibly from a different process. +func (c *DocumentProcessorClient) DeleteProcessorVersionOperation(name string) *DeleteProcessorVersionOperation { + return c.internalClient.DeleteProcessorVersionOperation(name) +} + +// DeployProcessorVersion deploys the processor version. +func (c *DocumentProcessorClient) DeployProcessorVersion(ctx context.Context, req *documentaipb.DeployProcessorVersionRequest, opts ...gax.CallOption) (*DeployProcessorVersionOperation, error) { + return c.internalClient.DeployProcessorVersion(ctx, req, opts...) +} + +// DeployProcessorVersionOperation returns a new DeployProcessorVersionOperation from a given name. +// The name must be that of a previously created DeployProcessorVersionOperation, possibly from a different process. +func (c *DocumentProcessorClient) DeployProcessorVersionOperation(name string) *DeployProcessorVersionOperation { + return c.internalClient.DeployProcessorVersionOperation(name) +} + +// UndeployProcessorVersion undeploys the processor version. +func (c *DocumentProcessorClient) UndeployProcessorVersion(ctx context.Context, req *documentaipb.UndeployProcessorVersionRequest, opts ...gax.CallOption) (*UndeployProcessorVersionOperation, error) { + return c.internalClient.UndeployProcessorVersion(ctx, req, opts...) +} + +// UndeployProcessorVersionOperation returns a new UndeployProcessorVersionOperation from a given name. +// The name must be that of a previously created UndeployProcessorVersionOperation, possibly from a different process. +func (c *DocumentProcessorClient) UndeployProcessorVersionOperation(name string) *UndeployProcessorVersionOperation { + return c.internalClient.UndeployProcessorVersionOperation(name) +} + +// CreateProcessor creates a processor from the type processor that the user chose. +// The processor will be at “ENABLED” state by default after its creation. +func (c *DocumentProcessorClient) CreateProcessor(ctx context.Context, req *documentaipb.CreateProcessorRequest, opts ...gax.CallOption) (*documentaipb.Processor, error) { + return c.internalClient.CreateProcessor(ctx, req, opts...) +} + +// DeleteProcessor deletes the processor, unloads all deployed model artifacts if it was +// enabled and then deletes all artifacts associated with this processor. +func (c *DocumentProcessorClient) DeleteProcessor(ctx context.Context, req *documentaipb.DeleteProcessorRequest, opts ...gax.CallOption) (*DeleteProcessorOperation, error) { + return c.internalClient.DeleteProcessor(ctx, req, opts...) +} + +// DeleteProcessorOperation returns a new DeleteProcessorOperation from a given name. +// The name must be that of a previously created DeleteProcessorOperation, possibly from a different process. +func (c *DocumentProcessorClient) DeleteProcessorOperation(name string) *DeleteProcessorOperation { + return c.internalClient.DeleteProcessorOperation(name) +} + +// EnableProcessor enables a processor +func (c *DocumentProcessorClient) EnableProcessor(ctx context.Context, req *documentaipb.EnableProcessorRequest, opts ...gax.CallOption) (*EnableProcessorOperation, error) { + return c.internalClient.EnableProcessor(ctx, req, opts...) +} + +// EnableProcessorOperation returns a new EnableProcessorOperation from a given name. +// The name must be that of a previously created EnableProcessorOperation, possibly from a different process. +func (c *DocumentProcessorClient) EnableProcessorOperation(name string) *EnableProcessorOperation { + return c.internalClient.EnableProcessorOperation(name) +} + +// DisableProcessor disables a processor +func (c *DocumentProcessorClient) DisableProcessor(ctx context.Context, req *documentaipb.DisableProcessorRequest, opts ...gax.CallOption) (*DisableProcessorOperation, error) { + return c.internalClient.DisableProcessor(ctx, req, opts...) +} + +// DisableProcessorOperation returns a new DisableProcessorOperation from a given name. +// The name must be that of a previously created DisableProcessorOperation, possibly from a different process. +func (c *DocumentProcessorClient) DisableProcessorOperation(name string) *DisableProcessorOperation { + return c.internalClient.DisableProcessorOperation(name) +} + +// SetDefaultProcessorVersion set the default (active) version of a Processor that will be used in +// ProcessDocument and +// BatchProcessDocuments. +func (c *DocumentProcessorClient) SetDefaultProcessorVersion(ctx context.Context, req *documentaipb.SetDefaultProcessorVersionRequest, opts ...gax.CallOption) (*SetDefaultProcessorVersionOperation, error) { + return c.internalClient.SetDefaultProcessorVersion(ctx, req, opts...) +} + +// SetDefaultProcessorVersionOperation returns a new SetDefaultProcessorVersionOperation from a given name. +// The name must be that of a previously created SetDefaultProcessorVersionOperation, possibly from a different process. +func (c *DocumentProcessorClient) SetDefaultProcessorVersionOperation(name string) *SetDefaultProcessorVersionOperation { + return c.internalClient.SetDefaultProcessorVersionOperation(name) +} + // ReviewDocument send a document for Human Review. The input document should be processed by // the specified processor. func (c *DocumentProcessorClient) ReviewDocument(ctx context.Context, req *documentaipb.ReviewDocumentRequest, opts ...gax.CallOption) (*ReviewDocumentOperation, error) { @@ -181,6 +366,31 @@ func (c *DocumentProcessorClient) ReviewDocumentOperation(name string) *ReviewDo return c.internalClient.ReviewDocumentOperation(name) } +// GetLocation gets information about a location. +func (c *DocumentProcessorClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DocumentProcessorClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DocumentProcessorClient) 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 *DocumentProcessorClient) 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 *DocumentProcessorClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // documentProcessorGRPCClient is a client for interacting with Cloud Document AI API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -202,6 +412,10 @@ type documentProcessorGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -239,6 +453,8 @@ func NewDocumentProcessorClient(ctx context.Context, opts ...option.ClientOption disableDeadlines: disableDeadlines, documentProcessorClient: documentaipb.NewDocumentProcessorServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -326,158 +542,954 @@ func (c *documentProcessorGRPCClient) BatchProcessDocuments(ctx context.Context, }, nil } -func (c *documentProcessorGRPCClient) ReviewDocument(ctx context.Context, req *documentaipb.ReviewDocumentRequest, opts ...gax.CallOption) (*ReviewDocumentOperation, error) { - if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { - cctx, cancel := context.WithTimeout(ctx, 120000*time.Millisecond) - defer cancel() - ctx = cctx - } - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "human_review_config", url.QueryEscape(req.GetHumanReviewConfig()))) +func (c *documentProcessorGRPCClient) FetchProcessorTypes(ctx context.Context, req *documentaipb.FetchProcessorTypesRequest, opts ...gax.CallOption) (*documentaipb.FetchProcessorTypesResponse, error) { + 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).ReviewDocument[0:len((*c.CallOptions).ReviewDocument):len((*c.CallOptions).ReviewDocument)], opts...) - var resp *longrunningpb.Operation + opts = append((*c.CallOptions).FetchProcessorTypes[0:len((*c.CallOptions).FetchProcessorTypes):len((*c.CallOptions).FetchProcessorTypes)], opts...) + var resp *documentaipb.FetchProcessorTypesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ReviewDocument(ctx, req, settings.GRPC...) + resp, err = c.documentProcessorClient.FetchProcessorTypes(ctx, req, settings.GRPC...) return err }, opts...) if err != nil { return nil, err } - return &ReviewDocumentOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, resp), - }, nil + return resp, nil } -// BatchProcessDocumentsOperation manages a long-running operation from BatchProcessDocuments. -type BatchProcessDocumentsOperation struct { - lro *longrunning.Operation -} +func (c *documentProcessorGRPCClient) ListProcessorTypes(ctx context.Context, req *documentaipb.ListProcessorTypesRequest, opts ...gax.CallOption) *ProcessorTypeIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// BatchProcessDocumentsOperation returns a new BatchProcessDocumentsOperation from a given name. -// The name must be that of a previously created BatchProcessDocumentsOperation, possibly from a different process. -func (c *documentProcessorGRPCClient) BatchProcessDocumentsOperation(name string) *BatchProcessDocumentsOperation { - return &BatchProcessDocumentsOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListProcessorTypes[0:len((*c.CallOptions).ListProcessorTypes):len((*c.CallOptions).ListProcessorTypes)], opts...) + it := &ProcessorTypeIterator{} + req = proto.Clone(req).(*documentaipb.ListProcessorTypesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*documentaipb.ProcessorType, string, error) { + resp := &documentaipb.ListProcessorTypesResponse{} + 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.documentProcessorClient.ListProcessorTypes(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetProcessorTypes(), 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 } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *BatchProcessDocumentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.BatchProcessResponse, error) { - var resp documentaipb.BatchProcessResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err +func (c *documentProcessorGRPCClient) ListProcessors(ctx context.Context, req *documentaipb.ListProcessorsRequest, opts ...gax.CallOption) *ProcessorIterator { + 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).ListProcessors[0:len((*c.CallOptions).ListProcessors):len((*c.CallOptions).ListProcessors)], opts...) + it := &ProcessorIterator{} + req = proto.Clone(req).(*documentaipb.ListProcessorsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*documentaipb.Processor, string, error) { + resp := &documentaipb.ListProcessorsResponse{} + 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.documentProcessorClient.ListProcessors(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetProcessors(), resp.GetNextPageToken(), nil } - return &resp, 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 } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *BatchProcessDocumentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.BatchProcessResponse, error) { - var resp documentaipb.BatchProcessResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { +func (c *documentProcessorGRPCClient) GetProcessor(ctx context.Context, req *documentaipb.GetProcessorRequest, opts ...gax.CallOption) (*documentaipb.Processor, 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).GetProcessor[0:len((*c.CallOptions).GetProcessor):len((*c.CallOptions).GetProcessor)], opts...) + var resp *documentaipb.Processor + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.GetProcessor(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil + return resp, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *BatchProcessDocumentsOperation) Metadata() (*documentaipb.BatchProcessMetadata, error) { - var meta documentaipb.BatchProcessMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +func (c *documentProcessorGRPCClient) GetProcessorVersion(ctx context.Context, req *documentaipb.GetProcessorVersionRequest, opts ...gax.CallOption) (*documentaipb.ProcessorVersion, 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).GetProcessorVersion[0:len((*c.CallOptions).GetProcessorVersion):len((*c.CallOptions).GetProcessorVersion)], opts...) + var resp *documentaipb.ProcessorVersion + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.GetProcessorVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { return nil, err } - return &meta, nil + return resp, nil } -// Done reports whether the long-running operation has completed. -func (op *BatchProcessDocumentsOperation) Done() bool { - return op.lro.Done() -} +func (c *documentProcessorGRPCClient) ListProcessorVersions(ctx context.Context, req *documentaipb.ListProcessorVersionsRequest, opts ...gax.CallOption) *ProcessorVersionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *BatchProcessDocumentsOperation) Name() string { - return op.lro.Name() -} + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListProcessorVersions[0:len((*c.CallOptions).ListProcessorVersions):len((*c.CallOptions).ListProcessorVersions)], opts...) + it := &ProcessorVersionIterator{} + req = proto.Clone(req).(*documentaipb.ListProcessorVersionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*documentaipb.ProcessorVersion, string, error) { + resp := &documentaipb.ListProcessorVersionsResponse{} + 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.documentProcessorClient.ListProcessorVersions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } -// ReviewDocumentOperation manages a long-running operation from ReviewDocument. -type ReviewDocumentOperation struct { - lro *longrunning.Operation + it.Response = resp + return resp.GetProcessorVersions(), 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 } -// ReviewDocumentOperation returns a new ReviewDocumentOperation from a given name. -// The name must be that of a previously created ReviewDocumentOperation, possibly from a different process. -func (c *documentProcessorGRPCClient) ReviewDocumentOperation(name string) *ReviewDocumentOperation { - return &ReviewDocumentOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), +func (c *documentProcessorGRPCClient) DeleteProcessorVersion(ctx context.Context, req *documentaipb.DeleteProcessorVersionRequest, opts ...gax.CallOption) (*DeleteProcessorVersionOperation, 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).DeleteProcessorVersion[0:len((*c.CallOptions).DeleteProcessorVersion):len((*c.CallOptions).DeleteProcessorVersion)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.DeleteProcessorVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err } + return &DeleteProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *ReviewDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.ReviewDocumentResponse, error) { - var resp documentaipb.ReviewDocumentResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +func (c *documentProcessorGRPCClient) DeployProcessorVersion(ctx context.Context, req *documentaipb.DeployProcessorVersionRequest, opts ...gax.CallOption) (*DeployProcessorVersionOperation, 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).DeployProcessorVersion[0:len((*c.CallOptions).DeployProcessorVersion):len((*c.CallOptions).DeployProcessorVersion)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.DeployProcessorVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { return nil, err } - return &resp, nil + return &DeployProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *ReviewDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.ReviewDocumentResponse, error) { - var resp documentaipb.ReviewDocumentResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { +func (c *documentProcessorGRPCClient) UndeployProcessorVersion(ctx context.Context, req *documentaipb.UndeployProcessorVersionRequest, opts ...gax.CallOption) (*UndeployProcessorVersionOperation, 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).UndeployProcessorVersion[0:len((*c.CallOptions).UndeployProcessorVersion):len((*c.CallOptions).UndeployProcessorVersion)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.UndeployProcessorVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil + return &UndeployProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *ReviewDocumentOperation) Metadata() (*documentaipb.ReviewDocumentOperationMetadata, error) { - var meta documentaipb.ReviewDocumentOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +func (c *documentProcessorGRPCClient) CreateProcessor(ctx context.Context, req *documentaipb.CreateProcessorRequest, opts ...gax.CallOption) (*documentaipb.Processor, error) { + 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).CreateProcessor[0:len((*c.CallOptions).CreateProcessor):len((*c.CallOptions).CreateProcessor)], opts...) + var resp *documentaipb.Processor + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.CreateProcessor(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { return nil, err } - return &meta, nil + return resp, nil } -// Done reports whether the long-running operation has completed. +func (c *documentProcessorGRPCClient) DeleteProcessor(ctx context.Context, req *documentaipb.DeleteProcessorRequest, opts ...gax.CallOption) (*DeleteProcessorOperation, 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).DeleteProcessor[0:len((*c.CallOptions).DeleteProcessor):len((*c.CallOptions).DeleteProcessor)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.DeleteProcessor(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentProcessorGRPCClient) EnableProcessor(ctx context.Context, req *documentaipb.EnableProcessorRequest, opts ...gax.CallOption) (*EnableProcessorOperation, 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).EnableProcessor[0:len((*c.CallOptions).EnableProcessor):len((*c.CallOptions).EnableProcessor)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.EnableProcessor(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &EnableProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentProcessorGRPCClient) DisableProcessor(ctx context.Context, req *documentaipb.DisableProcessorRequest, opts ...gax.CallOption) (*DisableProcessorOperation, 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).DisableProcessor[0:len((*c.CallOptions).DisableProcessor):len((*c.CallOptions).DisableProcessor)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.DisableProcessor(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DisableProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentProcessorGRPCClient) SetDefaultProcessorVersion(ctx context.Context, req *documentaipb.SetDefaultProcessorVersionRequest, opts ...gax.CallOption) (*SetDefaultProcessorVersionOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "processor", url.QueryEscape(req.GetProcessor()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetDefaultProcessorVersion[0:len((*c.CallOptions).SetDefaultProcessorVersion):len((*c.CallOptions).SetDefaultProcessorVersion)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.SetDefaultProcessorVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &SetDefaultProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentProcessorGRPCClient) ReviewDocument(ctx context.Context, req *documentaipb.ReviewDocumentRequest, opts ...gax.CallOption) (*ReviewDocumentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 120000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "human_review_config", url.QueryEscape(req.GetHumanReviewConfig()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReviewDocument[0:len((*c.CallOptions).ReviewDocument):len((*c.CallOptions).ReviewDocument)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentProcessorClient.ReviewDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ReviewDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentProcessorGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, 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).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentProcessorGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + 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).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + 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.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), 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 *documentProcessorGRPCClient) 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 *documentProcessorGRPCClient) 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 *documentProcessorGRPCClient) 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 +} + +// BatchProcessDocumentsOperation manages a long-running operation from BatchProcessDocuments. +type BatchProcessDocumentsOperation struct { + lro *longrunning.Operation +} + +// BatchProcessDocumentsOperation returns a new BatchProcessDocumentsOperation from a given name. +// The name must be that of a previously created BatchProcessDocumentsOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) BatchProcessDocumentsOperation(name string) *BatchProcessDocumentsOperation { + return &BatchProcessDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchProcessDocumentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.BatchProcessResponse, error) { + var resp documentaipb.BatchProcessResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchProcessDocumentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.BatchProcessResponse, error) { + var resp documentaipb.BatchProcessResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchProcessDocumentsOperation) Metadata() (*documentaipb.BatchProcessMetadata, error) { + var meta documentaipb.BatchProcessMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchProcessDocumentsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchProcessDocumentsOperation) Name() string { + return op.lro.Name() +} + +// DeleteProcessorOperation manages a long-running operation from DeleteProcessor. +type DeleteProcessorOperation struct { + lro *longrunning.Operation +} + +// DeleteProcessorOperation returns a new DeleteProcessorOperation from a given name. +// The name must be that of a previously created DeleteProcessorOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) DeleteProcessorOperation(name string) *DeleteProcessorOperation { + return &DeleteProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteProcessorOperation) Metadata() (*documentaipb.DeleteProcessorMetadata, error) { + var meta documentaipb.DeleteProcessorMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteProcessorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteProcessorOperation) Name() string { + return op.lro.Name() +} + +// DeleteProcessorVersionOperation manages a long-running operation from DeleteProcessorVersion. +type DeleteProcessorVersionOperation struct { + lro *longrunning.Operation +} + +// DeleteProcessorVersionOperation returns a new DeleteProcessorVersionOperation from a given name. +// The name must be that of a previously created DeleteProcessorVersionOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) DeleteProcessorVersionOperation(name string) *DeleteProcessorVersionOperation { + return &DeleteProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteProcessorVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteProcessorVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteProcessorVersionOperation) Metadata() (*documentaipb.DeleteProcessorVersionMetadata, error) { + var meta documentaipb.DeleteProcessorVersionMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteProcessorVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteProcessorVersionOperation) Name() string { + return op.lro.Name() +} + +// DeployProcessorVersionOperation manages a long-running operation from DeployProcessorVersion. +type DeployProcessorVersionOperation struct { + lro *longrunning.Operation +} + +// DeployProcessorVersionOperation returns a new DeployProcessorVersionOperation from a given name. +// The name must be that of a previously created DeployProcessorVersionOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) DeployProcessorVersionOperation(name string) *DeployProcessorVersionOperation { + return &DeployProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeployProcessorVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.DeployProcessorVersionResponse, error) { + var resp documentaipb.DeployProcessorVersionResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeployProcessorVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.DeployProcessorVersionResponse, error) { + var resp documentaipb.DeployProcessorVersionResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeployProcessorVersionOperation) Metadata() (*documentaipb.DeployProcessorVersionMetadata, error) { + var meta documentaipb.DeployProcessorVersionMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeployProcessorVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeployProcessorVersionOperation) Name() string { + return op.lro.Name() +} + +// DisableProcessorOperation manages a long-running operation from DisableProcessor. +type DisableProcessorOperation struct { + lro *longrunning.Operation +} + +// DisableProcessorOperation returns a new DisableProcessorOperation from a given name. +// The name must be that of a previously created DisableProcessorOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) DisableProcessorOperation(name string) *DisableProcessorOperation { + return &DisableProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DisableProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.DisableProcessorResponse, error) { + var resp documentaipb.DisableProcessorResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DisableProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.DisableProcessorResponse, error) { + var resp documentaipb.DisableProcessorResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DisableProcessorOperation) Metadata() (*documentaipb.DisableProcessorMetadata, error) { + var meta documentaipb.DisableProcessorMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DisableProcessorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DisableProcessorOperation) Name() string { + return op.lro.Name() +} + +// EnableProcessorOperation manages a long-running operation from EnableProcessor. +type EnableProcessorOperation struct { + lro *longrunning.Operation +} + +// EnableProcessorOperation returns a new EnableProcessorOperation from a given name. +// The name must be that of a previously created EnableProcessorOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) EnableProcessorOperation(name string) *EnableProcessorOperation { + return &EnableProcessorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *EnableProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.EnableProcessorResponse, error) { + var resp documentaipb.EnableProcessorResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *EnableProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.EnableProcessorResponse, error) { + var resp documentaipb.EnableProcessorResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *EnableProcessorOperation) Metadata() (*documentaipb.EnableProcessorMetadata, error) { + var meta documentaipb.EnableProcessorMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *EnableProcessorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *EnableProcessorOperation) Name() string { + return op.lro.Name() +} + +// ReviewDocumentOperation manages a long-running operation from ReviewDocument. +type ReviewDocumentOperation struct { + lro *longrunning.Operation +} + +// ReviewDocumentOperation returns a new ReviewDocumentOperation from a given name. +// The name must be that of a previously created ReviewDocumentOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) ReviewDocumentOperation(name string) *ReviewDocumentOperation { + return &ReviewDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ReviewDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.ReviewDocumentResponse, error) { + var resp documentaipb.ReviewDocumentResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ReviewDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.ReviewDocumentResponse, error) { + var resp documentaipb.ReviewDocumentResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ReviewDocumentOperation) Metadata() (*documentaipb.ReviewDocumentOperationMetadata, error) { + var meta documentaipb.ReviewDocumentOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. func (op *ReviewDocumentOperation) Done() bool { return op.lro.Done() } @@ -487,3 +1499,376 @@ func (op *ReviewDocumentOperation) Done() bool { func (op *ReviewDocumentOperation) Name() string { return op.lro.Name() } + +// SetDefaultProcessorVersionOperation manages a long-running operation from SetDefaultProcessorVersion. +type SetDefaultProcessorVersionOperation struct { + lro *longrunning.Operation +} + +// SetDefaultProcessorVersionOperation returns a new SetDefaultProcessorVersionOperation from a given name. +// The name must be that of a previously created SetDefaultProcessorVersionOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) SetDefaultProcessorVersionOperation(name string) *SetDefaultProcessorVersionOperation { + return &SetDefaultProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *SetDefaultProcessorVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.SetDefaultProcessorVersionResponse, error) { + var resp documentaipb.SetDefaultProcessorVersionResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *SetDefaultProcessorVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.SetDefaultProcessorVersionResponse, error) { + var resp documentaipb.SetDefaultProcessorVersionResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *SetDefaultProcessorVersionOperation) Metadata() (*documentaipb.SetDefaultProcessorVersionMetadata, error) { + var meta documentaipb.SetDefaultProcessorVersionMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *SetDefaultProcessorVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *SetDefaultProcessorVersionOperation) Name() string { + return op.lro.Name() +} + +// UndeployProcessorVersionOperation manages a long-running operation from UndeployProcessorVersion. +type UndeployProcessorVersionOperation struct { + lro *longrunning.Operation +} + +// UndeployProcessorVersionOperation returns a new UndeployProcessorVersionOperation from a given name. +// The name must be that of a previously created UndeployProcessorVersionOperation, possibly from a different process. +func (c *documentProcessorGRPCClient) UndeployProcessorVersionOperation(name string) *UndeployProcessorVersionOperation { + return &UndeployProcessorVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UndeployProcessorVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*documentaipb.UndeployProcessorVersionResponse, error) { + var resp documentaipb.UndeployProcessorVersionResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UndeployProcessorVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*documentaipb.UndeployProcessorVersionResponse, error) { + var resp documentaipb.UndeployProcessorVersionResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UndeployProcessorVersionOperation) Metadata() (*documentaipb.UndeployProcessorVersionMetadata, error) { + var meta documentaipb.UndeployProcessorVersionMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UndeployProcessorVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UndeployProcessorVersionOperation) Name() string { + return op.lro.Name() +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ProcessorIterator manages a stream of *documentaipb.Processor. +type ProcessorIterator struct { + items []*documentaipb.Processor + 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 []*documentaipb.Processor, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ProcessorIterator) 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 *ProcessorIterator) Next() (*documentaipb.Processor, error) { + var item *documentaipb.Processor + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ProcessorIterator) bufLen() int { + return len(it.items) +} + +func (it *ProcessorIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ProcessorTypeIterator manages a stream of *documentaipb.ProcessorType. +type ProcessorTypeIterator struct { + items []*documentaipb.ProcessorType + 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 []*documentaipb.ProcessorType, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ProcessorTypeIterator) 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 *ProcessorTypeIterator) Next() (*documentaipb.ProcessorType, error) { + var item *documentaipb.ProcessorType + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ProcessorTypeIterator) bufLen() int { + return len(it.items) +} + +func (it *ProcessorTypeIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ProcessorVersionIterator manages a stream of *documentaipb.ProcessorVersion. +type ProcessorVersionIterator struct { + items []*documentaipb.ProcessorVersion + 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 []*documentaipb.ProcessorVersion, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ProcessorVersionIterator) 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 *ProcessorVersionIterator) Next() (*documentaipb.ProcessorVersion, error) { + var item *documentaipb.ProcessorVersion + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ProcessorVersionIterator) bufLen() int { + return len(it.items) +} + +func (it *ProcessorVersionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/documentai/apiv1/document_processor_client_example_test.go b/documentai/apiv1/document_processor_client_example_test.go index 1ae840442885..8739c49ebefe 100644 --- a/documentai/apiv1/document_processor_client_example_test.go +++ b/documentai/apiv1/document_processor_client_example_test.go @@ -20,7 +20,10 @@ import ( "context" documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewDocumentProcessorClient() { @@ -80,6 +83,335 @@ func ExampleDocumentProcessorClient_BatchProcessDocuments() { _ = resp } +func ExampleDocumentProcessorClient_FetchProcessorTypes() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.FetchProcessorTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#FetchProcessorTypesRequest. + } + resp, err := c.FetchProcessorTypes(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_ListProcessorTypes() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorTypesRequest. + } + it := c.ListProcessorTypes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentProcessorClient_ListProcessors() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorsRequest. + } + it := c.ListProcessors(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentProcessorClient_GetProcessor() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.GetProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#GetProcessorRequest. + } + resp, err := c.GetProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_GetProcessorVersion() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.GetProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#GetProcessorVersionRequest. + } + resp, err := c.GetProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_ListProcessorVersions() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorVersionsRequest. + } + it := c.ListProcessorVersions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentProcessorClient_DeleteProcessorVersion() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeleteProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeleteProcessorVersionRequest. + } + op, err := c.DeleteProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDocumentProcessorClient_DeployProcessorVersion() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeployProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeployProcessorVersionRequest. + } + op, err := c.DeployProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_UndeployProcessorVersion() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.UndeployProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#UndeployProcessorVersionRequest. + } + op, err := c.UndeployProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_CreateProcessor() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.CreateProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#CreateProcessorRequest. + } + resp, err := c.CreateProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_DeleteProcessor() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeleteProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeleteProcessorRequest. + } + op, err := c.DeleteProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDocumentProcessorClient_EnableProcessor() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.EnableProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#EnableProcessorRequest. + } + op, err := c.EnableProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_DisableProcessor() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DisableProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DisableProcessorRequest. + } + op, err := c.DisableProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_SetDefaultProcessorVersion() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.SetDefaultProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#SetDefaultProcessorVersionRequest. + } + op, err := c.SetDefaultProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleDocumentProcessorClient_ReviewDocument() { ctx := context.Background() c, err := documentai.NewDocumentProcessorClient(ctx) @@ -104,3 +436,113 @@ func ExampleDocumentProcessorClient_ReviewDocument() { // TODO: Use resp. _ = resp } + +func ExampleDocumentProcessorClient_GetLocation() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentProcessorClient_ListLocations() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentProcessorClient_CancelOperation() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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 ExampleDocumentProcessorClient_GetOperation() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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 ExampleDocumentProcessorClient_ListOperations() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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/documentai/apiv1/gapic_metadata.json b/documentai/apiv1/gapic_metadata.json index 0e0f7bb50653..9749290d36f6 100644 --- a/documentai/apiv1/gapic_metadata.json +++ b/documentai/apiv1/gapic_metadata.json @@ -15,6 +15,91 @@ "BatchProcessDocuments" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateProcessor": { + "methods": [ + "CreateProcessor" + ] + }, + "DeleteProcessor": { + "methods": [ + "DeleteProcessor" + ] + }, + "DeleteProcessorVersion": { + "methods": [ + "DeleteProcessorVersion" + ] + }, + "DeployProcessorVersion": { + "methods": [ + "DeployProcessorVersion" + ] + }, + "DisableProcessor": { + "methods": [ + "DisableProcessor" + ] + }, + "EnableProcessor": { + "methods": [ + "EnableProcessor" + ] + }, + "FetchProcessorTypes": { + "methods": [ + "FetchProcessorTypes" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetProcessor": { + "methods": [ + "GetProcessor" + ] + }, + "GetProcessorVersion": { + "methods": [ + "GetProcessorVersion" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListProcessorTypes": { + "methods": [ + "ListProcessorTypes" + ] + }, + "ListProcessorVersions": { + "methods": [ + "ListProcessorVersions" + ] + }, + "ListProcessors": { + "methods": [ + "ListProcessors" + ] + }, "ProcessDocument": { "methods": [ "ProcessDocument" @@ -24,6 +109,16 @@ "methods": [ "ReviewDocument" ] + }, + "SetDefaultProcessorVersion": { + "methods": [ + "SetDefaultProcessorVersion" + ] + }, + "UndeployProcessorVersion": { + "methods": [ + "UndeployProcessorVersion" + ] } } } diff --git a/documentai/go.mod b/documentai/go.mod index 92bfb7452bc6..75e94b7e6fc0 100644 --- a/documentai/go.mod +++ b/documentai/go.mod @@ -5,8 +5,8 @@ go 1.17 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/api v0.92.0 + google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/documentai/go.sum b/documentai/go.sum index 2391d86f7856..573f69c7e64a 100644 --- a/documentai/go.sum +++ b/documentai/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,9 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 h1:+jnHzr9VPj32ykQVai5DNahi9+NSp7yYuCsl5eAQtL0= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +587,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= 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 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/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 h1:zZnTt15U44/Txe/9cN/tVbteBkPMiyXK48hPsKRmqj4= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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 6dd43ca03c89..bd9192d9e05b 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( go.opencensus.io v0.23.0 golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.91.0 - google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e + google.golang.org/api v0.92.0 + google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) diff --git a/go.sum b/go.sum index 2cd0f8f6e526..ca979150bfb2 100644 --- a/go.sum +++ b/go.sum @@ -510,8 +510,8 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= -google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -600,8 +600,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/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e h1:yXLYwnRRqNHIwwHZLiA9/aC9uieNrOF0owsijAiZJr8= -google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/snippet_metadata.google.cloud.aiplatform.v1.json b/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json index c08137ed1612..1ecad61593de 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 @@ -2538,7 +2538,7 @@ { "regionTag": "aiplatform_v1_generated_FeaturestoreService_ImportFeatureValues_sync", "title": "aiplatform ImportFeatureValues Sample", - "description": "ImportFeatureValues imports Feature values into the Featurestore from a source storage.\n\nThe progress of the import is tracked by the returned operation. The\nimported features are guaranteed to be visible to subsequent read\noperations after the operation is marked as successfully done.\n\nIf an import operation fails, the Feature values returned from\nreads and exports may be inconsistent. If consistency is\nrequired, the caller must retry the same import request again and wait till\nthe new operation returned is marked as successfully done.\n\nThere are also scenarios where the caller can cause inconsistency.\n\n Source data for import contains multiple distinct Feature values for\n the same entity ID and timestamp.\n\n Source is modified during an import. This includes adding, updating, or\n removing source data and/or metadata. Examples of updating metadata\n include but are not limited to changing storage location, storage class,\n or retention policy.\n\n Online serving cluster is under-provisioned.", + "description": "ImportFeatureValues imports Feature values into the Featurestore from a source storage.\n\nThe progress of the import is tracked by the returned operation. The\nimported features are guaranteed to be visible to subsequent read\noperations after the operation is marked as successfully done.\n\nIf an import operation fails, the Feature values returned from\nreads and exports may be inconsistent. If consistency is\nrequired, the caller must retry the same import request again and wait till\nthe new operation returned is marked as successfully done.\n\nThere are also scenarios where the caller can cause inconsistency.\n\n\tSource data for import contains multiple distinct Feature values for\n\tthe same entity ID and timestamp.\n\n\tSource is modified during an import. This includes adding, updating, or\n\tremoving source data and/or metadata. Examples of updating metadata\n\tinclude but are not limited to changing storage location, storage class,\n\tor retention policy.\n\n\tOnline serving cluster is under-provisioned.", "file": "FeaturestoreClient/ImportFeatureValues/main.go", "language": "GO", "clientMethod": { @@ -11849,7 +11849,7 @@ { "regionTag": "aiplatform_v1_generated_PredictionService_RawPredict_sync", "title": "aiplatform RawPredict Sample", - "description": "RawPredict perform an online prediction with an arbitrary HTTP payload.\n\nThe response includes the following HTTP headers: \n\n X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this\n prediction.\n\n X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel\n that served this prediction.", + "description": "RawPredict perform an online prediction with an arbitrary HTTP payload.\n\nThe response includes the following HTTP headers: \n\n\tX-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this\n\tprediction.\n\n\tX-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel\n\tthat served this prediction.", "file": "PredictionClient/RawPredict/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/FeaturestoreOnlineServingClient/WriteFeatureValues/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/FeaturestoreOnlineServingClient/WriteFeatureValues/main.go new file mode 100644 index 000000000000..25ccdb3f341a --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/FeaturestoreOnlineServingClient/WriteFeatureValues/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 aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteFeatureValuesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#WriteFeatureValuesRequest. + } + resp, err := c.WriteFeatureValues(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_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 25cac36f6be3..72e9113b71bd 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 @@ -3226,7 +3226,7 @@ { "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_ImportFeatureValues_sync", "title": "aiplatform ImportFeatureValues Sample", - "description": "ImportFeatureValues imports Feature values into the Featurestore from a source storage.\n\nThe progress of the import is tracked by the returned operation. The\nimported features are guaranteed to be visible to subsequent read\noperations after the operation is marked as successfully done.\n\nIf an import operation fails, the Feature values returned from\nreads and exports may be inconsistent. If consistency is\nrequired, the caller must retry the same import request again and wait till\nthe new operation returned is marked as successfully done.\n\nThere are also scenarios where the caller can cause inconsistency.\n\n Source data for import contains multiple distinct Feature values for\n the same entity ID and timestamp.\n\n Source is modified during an import. This includes adding, updating, or\n removing source data and/or metadata. Examples of updating metadata\n include but are not limited to changing storage location, storage class,\n or retention policy.\n\n Online serving cluster is under-provisioned.", + "description": "ImportFeatureValues imports Feature values into the Featurestore from a source storage.\n\nThe progress of the import is tracked by the returned operation. The\nimported features are guaranteed to be visible to subsequent read\noperations after the operation is marked as successfully done.\n\nIf an import operation fails, the Feature values returned from\nreads and exports may be inconsistent. If consistency is\nrequired, the caller must retry the same import request again and wait till\nthe new operation returned is marked as successfully done.\n\nThere are also scenarios where the caller can cause inconsistency.\n\n\tSource data for import contains multiple distinct Feature values for\n\tthe same entity ID and timestamp.\n\n\tSource is modified during an import. This includes adding, updating, or\n\tremoving source data and/or metadata. Examples of updating metadata\n\tinclude but are not limited to changing storage location, storage class,\n\tor retention policy.\n\n\tOnline serving cluster is under-provisioned.", "file": "FeaturestoreClient/ImportFeatureValues/main.go", "language": "GO", "clientMethod": { @@ -4370,6 +4370,52 @@ } ] }, + { + "regionTag": "aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_WriteFeatureValues_sync", + "title": "aiplatform WriteFeatureValues Sample", + "description": "WriteFeatureValues writes Feature values of one or more entities of an EntityType.\n\nThe Feature values are merged into existing entities if any. The Feature\nvalues to be written must have timestamp within the online storage\nretention.", + "file": "FeaturestoreOnlineServingClient/WriteFeatureValues/main.go", + "language": "GO", + "clientMethod": { + "shortName": "WriteFeatureValues", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingClient.WriteFeatureValues", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.WriteFeatureValuesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "aiplatformpb.WriteFeatureValuesResponse", + "client": { + "shortName": "FeaturestoreOnlineServingClient", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingClient" + }, + "method": { + "shortName": "WriteFeatureValues", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.WriteFeatureValues", + "service": { + "shortName": "FeaturestoreOnlineServingService", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1beta1_generated_IndexService_CancelOperation_sync", "title": "aiplatform CancelOperation Sample", @@ -12583,7 +12629,7 @@ { "regionTag": "aiplatform_v1beta1_generated_PredictionService_RawPredict_sync", "title": "aiplatform RawPredict Sample", - "description": "RawPredict perform an online prediction with an arbitrary HTTP payload.\n\nThe response includes the following HTTP headers: \n\n X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this\n prediction.\n\n X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel\n that served this prediction.", + "description": "RawPredict perform an online prediction with an arbitrary HTTP payload.\n\nThe response includes the following HTTP headers: \n\n\tX-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this\n\tprediction.\n\n\tX-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel\n\tthat served this prediction.", "file": "PredictionClient/RawPredict/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/internal/generated/snippets/analytics/admin/apiv1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index 827fcaaecaaa..59b5711cf255 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/snippet_metadata.google.analytics.admin.v1alpha.json +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/analytics/admin/apiv1alpha", - "version": "0.8.1", + "version": "0.9.0", "language": "GO", "apis": [ { @@ -470,7 +470,7 @@ { "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_sync", "title": "analyticsadmin CancelDisplayVideo360AdvertiserLinkProposal Sample", - "description": "CancelDisplayVideo360AdvertiserLinkProposal cancels a DisplayVideo360AdvertiserLinkProposal.\nCancelling can mean either: \n\n Declining a proposal initiated from Display & Video 360\n\n Withdrawing a proposal initiated from Google Analytics\n After being cancelled, a proposal will eventually be deleted automatically.", + "description": "CancelDisplayVideo360AdvertiserLinkProposal cancels a DisplayVideo360AdvertiserLinkProposal.\nCancelling can mean either: \n\n\tDeclining a proposal initiated from Display & Video 360\n\n\tWithdrawing a proposal initiated from Google Analytics\n\tAfter being cancelled, a proposal will eventually be deleted automatically.", "file": "AnalyticsAdminClient/CancelDisplayVideo360AdvertiserLinkProposal/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/appengine/apiv1/snippet_metadata.google.appengine.v1.json b/internal/generated/snippets/appengine/apiv1/snippet_metadata.google.appengine.v1.json index fa5dfdee86d4..6d3c1191ab41 100644 --- a/internal/generated/snippets/appengine/apiv1/snippet_metadata.google.appengine.v1.json +++ b/internal/generated/snippets/appengine/apiv1/snippet_metadata.google.appengine.v1.json @@ -14,7 +14,7 @@ { "regionTag": "appengine_v1_generated_Applications_CreateApplication_sync", "title": "appengine CreateApplication Sample", - "description": "CreateApplication creates an App Engine application for a Google Cloud Platform project.\nRequired fields: \n\n id - The ID of the target Cloud Platform project.\n\n location - The region (at https: //cloud.google.com/appengine/docs/locations) where you want the App Engine application located.\n\nFor more information about App Engine applications, see Managing Projects, Applications, and Billing (at https: //cloud.google.com/appengine/docs/standard/python/console/).", + "description": "CreateApplication creates an App Engine application for a Google Cloud Platform project.\nRequired fields: \n\n\tid - The ID of the target Cloud Platform project.\n\n\tlocation - The region (at https: //cloud.google.com/appengine/docs/locations) where you want the App Engine application located.\n\nFor more information about App Engine applications, see Managing Projects, Applications, and Billing (at https: //cloud.google.com/appengine/docs/standard/python/console/).", "file": "ApplicationsClient/CreateApplication/main.go", "language": "GO", "clientMethod": { @@ -152,7 +152,7 @@ { "regionTag": "appengine_v1_generated_Applications_UpdateApplication_sync", "title": "appengine UpdateApplication Sample", - "description": "UpdateApplication updates the specified Application resource.\nYou can update the following fields: \n\n auth_domain - Google authentication domain for controlling user access to the application.\n\n default_cookie_expiration - Cookie expiration policy for the application.\n\n iap - Identity-Aware Proxy properties for the application.", + "description": "UpdateApplication updates the specified Application resource.\nYou can update the following fields: \n\n\tauth_domain - Google authentication domain for controlling user access to the application.\n\n\tdefault_cookie_expiration - Cookie expiration policy for the application.\n\n\tiap - Identity-Aware Proxy properties for the application.", "file": "ApplicationsClient/UpdateApplication/main.go", "language": "GO", "clientMethod": { @@ -1530,7 +1530,7 @@ { "regionTag": "appengine_v1_generated_Versions_UpdateVersion_sync", "title": "appengine UpdateVersion Sample", - "description": "UpdateVersion updates the specified Version resource.\nYou can specify the following fields depending on the App Engine\nenvironment and type of scaling that the version resource uses: \n\nStandard environment\n\n instance_class (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)\n\nautomatic scaling in the standard environment: \n\n automatic_scaling.min_idle_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n automatic_scaling.max_idle_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n automaticScaling.standard_scheduler_settings.max_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n automaticScaling.standard_scheduler_settings.min_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n automaticScaling.standard_scheduler_settings.target_cpu_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n automaticScaling.standard_scheduler_settings.target_throughput_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\nbasic scaling or manual scaling in the standard environment: \n\n serving_status (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n\n manual_scaling.instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)\n\nFlexible environment\n\n serving_status (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n\nautomatic scaling in the flexible environment: \n\n automatic_scaling.min_total_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n automatic_scaling.max_total_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n automatic_scaling.cool_down_period_sec (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n automatic_scaling.cpu_utilization.target_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\nmanual scaling in the flexible environment: \n\n manual_scaling.instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)", + "description": "UpdateVersion updates the specified Version resource.\nYou can specify the following fields depending on the App Engine\nenvironment and type of scaling that the version resource uses: \n\nStandard environment\n\n\tinstance_class (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)\n\nautomatic scaling in the standard environment: \n\n\tautomatic_scaling.min_idle_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n\tautomatic_scaling.max_idle_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n\tautomaticScaling.standard_scheduler_settings.max_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n\tautomaticScaling.standard_scheduler_settings.min_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n\tautomaticScaling.standard_scheduler_settings.target_cpu_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\n\tautomaticScaling.standard_scheduler_settings.target_throughput_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n\nbasic scaling or manual scaling in the standard environment: \n\n\tserving_status (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n\n\tmanual_scaling.instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)\n\nFlexible environment\n\n\tserving_status (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n\nautomatic scaling in the flexible environment: \n\n\tautomatic_scaling.min_total_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n\tautomatic_scaling.max_total_instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n\tautomatic_scaling.cool_down_period_sec (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\n\tautomatic_scaling.cpu_utilization.target_utilization (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n\nmanual scaling in the flexible environment: \n\n\tmanual_scaling.instances (at https: //cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)", "file": "VersionsClient/UpdateVersion/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/asset/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/asset/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..f60d2c0a4e86 --- /dev/null +++ b/internal/generated/snippets/asset/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 cloudasset_v1_generated_AssetService_GetOperation_sync] + +package main + +import ( + "context" + + asset "cloud.google.com/go/asset/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := asset.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 cloudasset_v1_generated_AssetService_GetOperation_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/QueryAssets/main.go b/internal/generated/snippets/asset/apiv1/Client/QueryAssets/main.go new file mode 100644 index 000000000000..8b2d45bf85b4 --- /dev/null +++ b/internal/generated/snippets/asset/apiv1/Client/QueryAssets/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 cloudasset_v1_generated_AssetService_QueryAssets_sync] + +package main + +import ( + "context" + + asset "cloud.google.com/go/asset/apiv1" + assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1" +) + +func main() { + ctx := context.Background() + c, err := asset.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &assetpb.QueryAssetsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1#QueryAssetsRequest. + } + resp, err := c.QueryAssets(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudasset_v1_generated_AssetService_QueryAssets_sync] diff --git a/internal/generated/snippets/asset/apiv1/snippet_metadata.google.cloud.asset.v1.json b/internal/generated/snippets/asset/apiv1/snippet_metadata.google.cloud.asset.v1.json index 6e9c45b009ce..cc67d4e10837 100644 --- a/internal/generated/snippets/asset/apiv1/snippet_metadata.google.cloud.asset.v1.json +++ b/internal/generated/snippets/asset/apiv1/snippet_metadata.google.cloud.asset.v1.json @@ -515,6 +515,52 @@ } ] }, + { + "regionTag": "cloudasset_v1_generated_AssetService_GetOperation_sync", + "title": "cloudasset 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.asset.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.asset.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.asset.v1.AssetService.GetOperation", + "service": { + "shortName": "AssetService", + "fullName": "google.cloud.asset.v1.AssetService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, { "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", "title": "cloudasset GetSavedQuery Sample", @@ -699,6 +745,52 @@ } ] }, + { + "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", + "title": "cloudasset QueryAssets Sample", + "description": "QueryAssets issue a job that queries assets using a SQL statement compatible with\nBigQuery Standard\nSQL (at http: //cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).\n\nIf the query execution finishes within timeout and there’s no pagination,\nthe full query results will be returned in the QueryAssetsResponse.\n\nOtherwise, full query results can be obtained by issuing extra requests\nwith the job_reference from the a previous QueryAssets call.\n\nNote, the query result has approximately 10 GB limitation enforced by\nBigQuery\nhttps: //cloud.google.com/bigquery/docs/best-practices-performance-output (at https: //cloud.google.com/bigquery/docs/best-practices-performance-output),\nqueries return larger results will result in errors.", + "file": "Client/QueryAssets/main.go", + "language": "GO", + "clientMethod": { + "shortName": "QueryAssets", + "fullName": "google.cloud.asset.v1.Client.QueryAssets", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "assetpb.QueryAssetsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "assetpb.QueryAssetsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.asset.v1.Client" + }, + "method": { + "shortName": "QueryAssets", + "fullName": "google.cloud.asset.v1.AssetService.QueryAssets", + "service": { + "shortName": "AssetService", + "fullName": "google.cloud.asset.v1.AssetService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, { "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", "title": "cloudasset SearchAllIamPolicies Sample", diff --git a/internal/generated/snippets/automl/apiv1/snippet_metadata.google.cloud.automl.v1.json b/internal/generated/snippets/automl/apiv1/snippet_metadata.google.cloud.automl.v1.json index 06116a759dbf..4c71fc0e9a0c 100644 --- a/internal/generated/snippets/automl/apiv1/snippet_metadata.google.cloud.automl.v1.json +++ b/internal/generated/snippets/automl/apiv1/snippet_metadata.google.cloud.automl.v1.json @@ -520,7 +520,7 @@ { "regionTag": "automl_v1_generated_AutoMl_ImportData_sync", "title": "automl ImportData Sample", - "description": "ImportData imports data into a dataset.\nFor Tables this method can only be called on an empty Dataset.\n\nFor Tables: \n\n A\n schema_inference_version\n parameter must be explicitly set.\n Returns an empty response in the\n response field when it completes.", + "description": "ImportData imports data into a dataset.\nFor Tables this method can only be called on an empty Dataset.\n\nFor Tables: \n\n\tA\n\tschema_inference_version\n\tparameter must be explicitly set.\n\tReturns an empty response in the\n\tresponse field when it completes.", "file": "Client/ImportData/main.go", "language": "GO", "clientMethod": { @@ -842,7 +842,7 @@ { "regionTag": "automl_v1_generated_PredictionService_BatchPredict_sync", "title": "automl BatchPredict Sample", - "description": "BatchPredict perform a batch prediction. Unlike the online Predict, batch\nprediction result won’t be immediately available in the response. Instead,\na long running operation object is returned. User can poll the operation\nresult via GetOperation\nmethod. Once the operation is done, BatchPredictResult is returned in\nthe response field.\nAvailable for following ML scenarios: \n\n AutoML Vision Classification\n\n AutoML Vision Object Detection\n\n AutoML Video Intelligence Classification\n\n AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification\n\n AutoML Natural Language Entity Extraction\n\n AutoML Natural Language Sentiment Analysis\n\n AutoML Tables", + "description": "BatchPredict perform a batch prediction. Unlike the online Predict, batch\nprediction result won’t be immediately available in the response. Instead,\na long running operation object is returned. User can poll the operation\nresult via GetOperation\nmethod. Once the operation is done, BatchPredictResult is returned in\nthe response field.\nAvailable for following ML scenarios: \n\n\tAutoML Vision Classification\n\n\tAutoML Vision Object Detection\n\n\tAutoML Video Intelligence Classification\n\n\tAutoML Video Intelligence Object Tracking * AutoML Natural Language Classification\n\n\tAutoML Natural Language Entity Extraction\n\n\tAutoML Natural Language Sentiment Analysis\n\n\tAutoML Tables", "file": "PredictionClient/BatchPredict/main.go", "language": "GO", "clientMethod": { @@ -888,7 +888,7 @@ { "regionTag": "automl_v1_generated_PredictionService_Predict_sync", "title": "automl Predict Sample", - "description": "Predict perform an online prediction. The prediction result is directly\nreturned in the response.\nAvailable for following ML scenarios, and their expected request payloads: \n\nAutoML Vision Classification\n\n An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.\n\nAutoML Vision Object Detection\n\n An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.\n\nAutoML Natural Language Classification\n\n A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in\n .PDF, .TIF or .TIFF format with size upto 2MB.\n\nAutoML Natural Language Entity Extraction\n\n A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document\n in .PDF, .TIF or .TIFF format with size upto 20MB.\n\nAutoML Natural Language Sentiment Analysis\n\n A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in\n .PDF, .TIF or .TIFF format with size upto 2MB.\n\nAutoML Translation\n\n A TextSnippet up to 25,000 characters, UTF-8 encoded.\n\nAutoML Tables\n\n A row with column values matching\n the columns of the model, up to 5MB. Not available for FORECASTING\n prediction_type.", + "description": "Predict perform an online prediction. The prediction result is directly\nreturned in the response.\nAvailable for following ML scenarios, and their expected request payloads: \n\nAutoML Vision Classification\n\n\tAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.\n\nAutoML Vision Object Detection\n\n\tAn image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.\n\nAutoML Natural Language Classification\n\n\tA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in\n\t.PDF, .TIF or .TIFF format with size upto 2MB.\n\nAutoML Natural Language Entity Extraction\n\n\tA TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document\n\tin .PDF, .TIF or .TIFF format with size upto 20MB.\n\nAutoML Natural Language Sentiment Analysis\n\n\tA TextSnippet up to 60,000 characters, UTF-8 encoded or a document in\n\t.PDF, .TIF or .TIFF format with size upto 2MB.\n\nAutoML Translation\n\n\tA TextSnippet up to 25,000 characters, UTF-8 encoded.\n\nAutoML Tables\n\n\tA row with column values matching\n\tthe columns of the model, up to 5MB. Not available for FORECASTING\n\tprediction_type.", "file": "PredictionClient/Predict/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/automl/apiv1beta1/snippet_metadata.google.cloud.automl.v1beta1.json b/internal/generated/snippets/automl/apiv1beta1/snippet_metadata.google.cloud.automl.v1beta1.json index 527c804edf23..364cd1672e68 100644 --- a/internal/generated/snippets/automl/apiv1beta1/snippet_metadata.google.cloud.automl.v1beta1.json +++ b/internal/generated/snippets/automl/apiv1beta1/snippet_metadata.google.cloud.automl.v1beta1.json @@ -658,7 +658,7 @@ { "regionTag": "automl_v1beta1_generated_AutoMl_ImportData_sync", "title": "automl ImportData Sample", - "description": "ImportData imports data into a dataset.\nFor Tables this method can only be called on an empty Dataset.\n\nFor Tables: \n\n A\n schema_inference_version\n parameter must be explicitly set.\n Returns an empty response in the\n response field when it completes.", + "description": "ImportData imports data into a dataset.\nFor Tables this method can only be called on an empty Dataset.\n\nFor Tables: \n\n\tA\n\tschema_inference_version\n\tparameter must be explicitly set.\n\tReturns an empty response in the\n\tresponse field when it completes.", "file": "Client/ImportData/main.go", "language": "GO", "clientMethod": { @@ -1118,7 +1118,7 @@ { "regionTag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", "title": "automl BatchPredict Sample", - "description": "BatchPredict perform a batch prediction. Unlike the online Predict, batch\nprediction result won’t be immediately available in the response. Instead,\na long running operation object is returned. User can poll the operation\nresult via GetOperation\nmethod. Once the operation is done, BatchPredictResult is returned in\nthe response field.\nAvailable for following ML problems: \n\n Image Classification\n\n Image Object Detection\n\n Video Classification\n\n Video Object Tracking * Text Extraction\n\n Tables", + "description": "BatchPredict perform a batch prediction. Unlike the online Predict, batch\nprediction result won’t be immediately available in the response. Instead,\na long running operation object is returned. User can poll the operation\nresult via GetOperation\nmethod. Once the operation is done, BatchPredictResult is returned in\nthe response field.\nAvailable for following ML problems: \n\n\tImage Classification\n\n\tImage Object Detection\n\n\tVideo Classification\n\n\tVideo Object Tracking * Text Extraction\n\n\tTables", "file": "PredictionClient/BatchPredict/main.go", "language": "GO", "clientMethod": { @@ -1164,7 +1164,7 @@ { "regionTag": "automl_v1beta1_generated_PredictionService_Predict_sync", "title": "automl Predict Sample", - "description": "Predict perform an online prediction. The prediction result will be directly\nreturned in the response.\nAvailable for following ML problems, and their expected request payloads: \n\n Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes\n up to 30MB.\n\n Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes\n up to 30MB.\n\n Text Classification - TextSnippet, content up to 60,000 characters,\n UTF-8 encoded.\n\n Text Extraction - TextSnippet, content up to 30,000 characters,\n UTF-8 NFC encoded.\n\n Translation - TextSnippet, content up to 25,000 characters, UTF-8\n encoded.\n\n Tables - Row, with column values matching the columns of the model,\n up to 5MB. Not available for FORECASTING\n\nprediction_type.\n\n Text Sentiment - TextSnippet, content up 500 characters, UTF-8\n encoded.", + "description": "Predict perform an online prediction. The prediction result will be directly\nreturned in the response.\nAvailable for following ML problems, and their expected request payloads: \n\n\tImage Classification - Image in .JPEG, .GIF or .PNG format, image_bytes\n\tup to 30MB.\n\n\tImage Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes\n\tup to 30MB.\n\n\tText Classification - TextSnippet, content up to 60,000 characters,\n\tUTF-8 encoded.\n\n\tText Extraction - TextSnippet, content up to 30,000 characters,\n\tUTF-8 NFC encoded.\n\n\tTranslation - TextSnippet, content up to 25,000 characters, UTF-8\n\tencoded.\n\n\tTables - Row, with column values matching the columns of the model,\n\tup to 5MB. Not available for FORECASTING\n\nprediction_type.\n\n\tText Sentiment - TextSnippet, content up 500 characters, UTF-8\n\tencoded.", "file": "PredictionClient/Predict/main.go", "language": "GO", "clientMethod": { 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 4fd468acb3ed..50e76bf50995 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 @@ -14,7 +14,7 @@ { "regionTag": "bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync", "title": "bigqueryreservation CreateAssignment Sample", - "description": "CreateAssignment creates an assignment object which allows the given project to submit jobs\nof a certain type using slots from the specified reservation.\n\nCurrently a\nresource (project, folder, organization) can only have one assignment per\neach (job_type, location) combination, and that reservation will be used\nfor all jobs of the matching type.\n\nDifferent assignments can be created on different levels of the\nprojects, folders or organization hierarchy. During query execution,\nthe assignment is looked up at the project, folder and organization levels\nin that order. The first assignment found is applied to the query.\n\nWhen creating assignments, it does not matter if other assignments exist at\nhigher levels.\n\nExample: \n\n The organization organizationA contains two projects, project1\n and project2.\n\n Assignments for all three entities (organizationA, project1, and\n project2) could all be created and mapped to the same or different\n reservations.\n\n“None” assignments represent an absence of the assignment. Projects\nassigned to None use on-demand pricing. To create a “None” assignment, use\n“none” as a reservation_id in the parent. Example parent: \nprojects/myproject/locations/US/reservations/none.\n\nReturns google.rpc.Code.PERMISSION_DENIED if user does not have\n‘bigquery.admin’ permissions on the project using the reservation\nand the project that owns this reservation.\n\nReturns google.rpc.Code.INVALID_ARGUMENT when location of the assignment\ndoes not match location of the reservation.", + "description": "CreateAssignment creates an assignment object which allows the given project to submit jobs\nof a certain type using slots from the specified reservation.\n\nCurrently a\nresource (project, folder, organization) can only have one assignment per\neach (job_type, location) combination, and that reservation will be used\nfor all jobs of the matching type.\n\nDifferent assignments can be created on different levels of the\nprojects, folders or organization hierarchy. During query execution,\nthe assignment is looked up at the project, folder and organization levels\nin that order. The first assignment found is applied to the query.\n\nWhen creating assignments, it does not matter if other assignments exist at\nhigher levels.\n\nExample: \n\n\tThe organization organizationA contains two projects, project1\n\tand project2.\n\n\tAssignments for all three entities (organizationA, project1, and\n\tproject2) could all be created and mapped to the same or different\n\treservations.\n\n“None” assignments represent an absence of the assignment. Projects\nassigned to None use on-demand pricing. To create a “None” assignment, use\n“none” as a reservation_id in the parent. Example parent: \nprojects/myproject/locations/US/reservations/none.\n\nReturns google.rpc.Code.PERMISSION_DENIED if user does not have\n‘bigquery.admin’ permissions on the project using the reservation\nand the project that owns this reservation.\n\nReturns google.rpc.Code.INVALID_ARGUMENT when location of the assignment\ndoes not match location of the reservation.", "file": "Client/CreateAssignment/main.go", "language": "GO", "clientMethod": { @@ -152,7 +152,7 @@ { "regionTag": "bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync", "title": "bigqueryreservation DeleteAssignment Sample", - "description": "DeleteAssignment deletes a assignment. No expansion will happen.\n\nExample: \n\n Organization organizationA contains two projects, project1 and\n project2.\n\n Reservation res1 exists and was created previously.\n\n CreateAssignment was used previously to define the following\n associations between entities and reservations: \n and \n\nIn this example, deletion of the assignment won’t\naffect the other assignment . After said deletion,\nqueries from project1 will still use res1 while queries from\nproject2 will switch to use on-demand mode.", + "description": "DeleteAssignment deletes a assignment. No expansion will happen.\n\nExample: \n\n\tOrganization organizationA contains two projects, project1 and\n\tproject2.\n\n\tReservation res1 exists and was created previously.\n\n\tCreateAssignment was used previously to define the following\n\tassociations between entities and reservations: \n\tand \n\nIn this example, deletion of the assignment won’t\naffect the other assignment . After said deletion,\nqueries from project1 will still use res1 while queries from\nproject2 will switch to use on-demand mode.", "file": "Client/DeleteAssignment/main.go", "language": "GO", "clientMethod": { @@ -425,7 +425,7 @@ { "regionTag": "bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync", "title": "bigqueryreservation ListAssignments Sample", - "description": "ListAssignments lists assignments.\n\nOnly explicitly created assignments will be returned.\n\nExample: \n\n Organization organizationA contains two projects, project1 and\n project2.\n\n Reservation res1 exists and was created previously.\n\n CreateAssignment was used previously to define the following\n associations between entities and reservations: \n and \n\nIn this example, ListAssignments will just return the above two assignments\nfor reservation res1, and no expansion/merge will happen.\n\nThe wildcard “-” can be used for\nreservations in the request. In that case all assignments belongs to the\nspecified project and location will be listed.\n\nNote \"-\" cannot be used for projects nor locations.", + "description": "ListAssignments lists assignments.\n\nOnly explicitly created assignments will be returned.\n\nExample: \n\n\tOrganization organizationA contains two projects, project1 and\n\tproject2.\n\n\tReservation res1 exists and was created previously.\n\n\tCreateAssignment was used previously to define the following\n\tassociations between entities and reservations: \n\tand \n\nIn this example, ListAssignments will just return the above two assignments\nfor reservation res1, and no expansion/merge will happen.\n\nThe wildcard “-” can be used for\nreservations in the request. In that case all assignments belongs to the\nspecified project and location will be listed.\n\nNote \"-\" cannot be used for projects nor locations.", "file": "Client/ListAssignments/main.go", "language": "GO", "clientMethod": { 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 4a27b38cc153..f95b4a072ed2 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 @@ -14,7 +14,7 @@ { "regionTag": "bigqueryreservation_v1beta1_generated_ReservationService_CreateAssignment_sync", "title": "bigqueryreservation CreateAssignment Sample", - "description": "CreateAssignment creates an assignment object which allows the given project to submit jobs\nof a certain type using slots from the specified reservation.\n\nCurrently a\nresource (project, folder, organization) can only have one assignment per\neach (job_type, location) combination, and that reservation will be used\nfor all jobs of the matching type.\n\nDifferent assignments can be created on different levels of the\nprojects, folders or organization hierarchy. During query execution,\nthe assignment is looked up at the project, folder and organization levels\nin that order. The first assignment found is applied to the query.\n\nWhen creating assignments, it does not matter if other assignments exist at\nhigher levels.\n\nExample: \n\n The organization organizationA contains two projects, project1\n and project2.\n\n Assignments for all three entities (organizationA, project1, and\n project2) could all be created and mapped to the same or different\n reservations.\n\nReturns google.rpc.Code.PERMISSION_DENIED if user does not have\n‘bigquery.admin’ permissions on the project using the reservation\nand the project that owns this reservation.\n\nReturns google.rpc.Code.INVALID_ARGUMENT when location of the assignment\ndoes not match location of the reservation.", + "description": "CreateAssignment creates an assignment object which allows the given project to submit jobs\nof a certain type using slots from the specified reservation.\n\nCurrently a\nresource (project, folder, organization) can only have one assignment per\neach (job_type, location) combination, and that reservation will be used\nfor all jobs of the matching type.\n\nDifferent assignments can be created on different levels of the\nprojects, folders or organization hierarchy. During query execution,\nthe assignment is looked up at the project, folder and organization levels\nin that order. The first assignment found is applied to the query.\n\nWhen creating assignments, it does not matter if other assignments exist at\nhigher levels.\n\nExample: \n\n\tThe organization organizationA contains two projects, project1\n\tand project2.\n\n\tAssignments for all three entities (organizationA, project1, and\n\tproject2) could all be created and mapped to the same or different\n\treservations.\n\nReturns google.rpc.Code.PERMISSION_DENIED if user does not have\n‘bigquery.admin’ permissions on the project using the reservation\nand the project that owns this reservation.\n\nReturns google.rpc.Code.INVALID_ARGUMENT when location of the assignment\ndoes not match location of the reservation.", "file": "Client/CreateAssignment/main.go", "language": "GO", "clientMethod": { @@ -152,7 +152,7 @@ { "regionTag": "bigqueryreservation_v1beta1_generated_ReservationService_DeleteAssignment_sync", "title": "bigqueryreservation DeleteAssignment Sample", - "description": "DeleteAssignment deletes a assignment. No expansion will happen.\n\nExample: \n\n Organization organizationA contains two projects, project1 and\n project2.\n\n Reservation res1 exists and was created previously.\n\n CreateAssignment was used previously to define the following\n associations between entities and reservations: \n and \n\nIn this example, deletion of the assignment won’t\naffect the other assignment . After said deletion,\nqueries from project1 will still use res1 while queries from\nproject2 will switch to use on-demand mode.", + "description": "DeleteAssignment deletes a assignment. No expansion will happen.\n\nExample: \n\n\tOrganization organizationA contains two projects, project1 and\n\tproject2.\n\n\tReservation res1 exists and was created previously.\n\n\tCreateAssignment was used previously to define the following\n\tassociations between entities and reservations: \n\tand \n\nIn this example, deletion of the assignment won’t\naffect the other assignment . After said deletion,\nqueries from project1 will still use res1 while queries from\nproject2 will switch to use on-demand mode.", "file": "Client/DeleteAssignment/main.go", "language": "GO", "clientMethod": { @@ -425,7 +425,7 @@ { "regionTag": "bigqueryreservation_v1beta1_generated_ReservationService_ListAssignments_sync", "title": "bigqueryreservation ListAssignments Sample", - "description": "ListAssignments lists assignments.\n\nOnly explicitly created assignments will be returned.\n\nExample: \n\n Organization organizationA contains two projects, project1 and\n project2.\n\n Reservation res1 exists and was created previously.\n\n CreateAssignment was used previously to define the following\n associations between entities and reservations: \n and \n\nIn this example, ListAssignments will just return the above two assignments\nfor reservation res1, and no expansion/merge will happen.\n\nThe wildcard “-” can be used for\nreservations in the request. In that case all assignments belongs to the\nspecified project and location will be listed.\n\nNote \"-\" cannot be used for projects nor locations.", + "description": "ListAssignments lists assignments.\n\nOnly explicitly created assignments will be returned.\n\nExample: \n\n\tOrganization organizationA contains two projects, project1 and\n\tproject2.\n\n\tReservation res1 exists and was created previously.\n\n\tCreateAssignment was used previously to define the following\n\tassociations between entities and reservations: \n\tand \n\nIn this example, ListAssignments will just return the above two assignments\nfor reservation res1, and no expansion/merge will happen.\n\nThe wildcard “-” can be used for\nreservations in the request. In that case all assignments belongs to the\nspecified project and location will be listed.\n\nNote \"-\" cannot be used for projects nor locations.", "file": "Client/ListAssignments/main.go", "language": "GO", "clientMethod": { 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 b45e88cce523..9d826ee669a7 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 @@ -151,7 +151,7 @@ { "regionTag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", "title": "bigquerystorage AppendRows Sample", - "description": "AppendRows appends data to the given stream.\n\nIf offset is specified, the offset is checked against the end of\nstream. The server returns OUT_OF_RANGE in AppendRowsResponse if an\nattempt is made to append to an offset beyond the current end of the stream\nor ALREADY_EXISTS if user provides an offset that has already been\nwritten to. User can retry with adjusted offset within the same RPC\nconnection. If offset is not specified, append happens at the end of the\nstream.\n\nThe response contains an optional offset at which the append\nhappened. No offset information will be returned for appends to a\ndefault stream.\n\nResponses are received in the same order in which requests are sent.\nThere will be one response for each successful inserted request. Responses\nmay optionally embed error information if the originating AppendRequest was\nnot successfully processed.\n\nThe specifics of when successfully appended data is made visible to the\ntable are governed by the type of stream: \n\n For COMMITTED streams (which includes the default stream), data is\n visible immediately upon successful append.\n\n For BUFFERED streams, data is made visible via a subsequent FlushRows\n rpc which advances a cursor to a newer offset in the stream.\n\n For PENDING streams, data is not made visible until the stream itself is\n finalized (via the FinalizeWriteStream rpc), and the stream is explicitly\n committed via the BatchCommitWriteStreams rpc.\n\nNote: For users coding against the gRPC api directly, it may be\nnecessary to supply the x-goog-request-params system parameter\nwith write_stream=.\n\nMore information about system parameters: \nhttps: //cloud.google.com/apis/docs/system-parameters (at https: //cloud.google.com/apis/docs/system-parameters)", + "description": "AppendRows appends data to the given stream.\n\nIf offset is specified, the offset is checked against the end of\nstream. The server returns OUT_OF_RANGE in AppendRowsResponse if an\nattempt is made to append to an offset beyond the current end of the stream\nor ALREADY_EXISTS if user provides an offset that has already been\nwritten to. User can retry with adjusted offset within the same RPC\nconnection. If offset is not specified, append happens at the end of the\nstream.\n\nThe response contains an optional offset at which the append\nhappened. No offset information will be returned for appends to a\ndefault stream.\n\nResponses are received in the same order in which requests are sent.\nThere will be one response for each successful inserted request. Responses\nmay optionally embed error information if the originating AppendRequest was\nnot successfully processed.\n\nThe specifics of when successfully appended data is made visible to the\ntable are governed by the type of stream: \n\n\tFor COMMITTED streams (which includes the default stream), data is\n\tvisible immediately upon successful append.\n\n\tFor BUFFERED streams, data is made visible via a subsequent FlushRows\n\trpc which advances a cursor to a newer offset in the stream.\n\n\tFor PENDING streams, data is not made visible until the stream itself is\n\tfinalized (via the FinalizeWriteStream rpc), and the stream is explicitly\n\tcommitted via the BatchCommitWriteStreams rpc.\n\nNote: For users coding against the gRPC api directly, it may be\nnecessary to supply the x-goog-request-params system parameter\nwith write_stream=.\n\nMore information about system parameters: \nhttps: //cloud.google.com/apis/docs/system-parameters (at https: //cloud.google.com/apis/docs/system-parameters)", "file": "BigQueryWriteClient/AppendRows/main.go", "language": "GO", "clientMethod": { 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 14a0787e82aa..330014b80a3c 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 @@ -14,7 +14,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync", "title": "cloudchannel ActivateEntitlement Sample", - "description": "ActivateEntitlement activates a previously suspended entitlement. Entitlements suspended for\npending ToS acceptance can’t be activated using this method.\n\nAn entitlement activation is a long-running operation and it updates\nthe state of the customer entitlement.\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: Entitlement resource not found.\n\n SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated\n suspensions and entitlements that have accepted the TOS.\n\n NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE\n state.\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.", + "description": "ActivateEntitlement activates a previously suspended entitlement. Entitlements suspended for\npending ToS acceptance can’t be activated using this method.\n\nAn entitlement activation is a long-running operation and it updates\nthe state of the customer entitlement.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tSUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated\n\tsuspensions and entitlements that have accepted the TOS.\n\n\tNOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE\n\tstate.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/ActivateEntitlement/main.go", "language": "GO", "clientMethod": { @@ -60,7 +60,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync", "title": "cloudchannel CancelEntitlement Sample", - "description": "CancelEntitlement cancels a previously fulfilled entitlement.\n\nAn entitlement cancellation is a long-running operation.\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 FAILED_PRECONDITION: There are Google Cloud projects linked to the\n Google Cloud entitlement’s Cloud Billing subaccount.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: Entitlement resource not found.\n\n DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace\n add-ons, or entitlements for Google Cloud’s development platform.\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 response will contain\ngoogle.protobuf.Empty on success. The Operation metadata will contain an\ninstance of OperationMetadata.", + "description": "CancelEntitlement cancels a previously fulfilled entitlement.\n\nAn entitlement cancellation is a long-running operation.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tFAILED_PRECONDITION: There are Google Cloud projects linked to the\n\tGoogle Cloud entitlement’s Cloud Billing subaccount.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tDELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace\n\tadd-ons, or entitlements for Google Cloud’s development platform.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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 response will contain\ngoogle.protobuf.Empty on success. The Operation metadata will contain an\ninstance of OperationMetadata.", "file": "CloudChannelClient/CancelEntitlement/main.go", "language": "GO", "clientMethod": { @@ -151,7 +151,7 @@ { "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.", + "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\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Offer or Entitlement resource not found.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/ChangeOffer/main.go", "language": "GO", "clientMethod": { @@ -197,7 +197,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync", "title": "cloudchannel ChangeParameters Sample", - "description": "ChangeParameters change parameters of the 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 For example, the number of seats being changed is greater than the allowed\n number of max seats, or decreasing seats for a commitment based plan.\n\n NOT_FOUND: 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.", + "description": "ChangeParameters change parameters of the 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\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\tFor example, the number of seats being changed is greater than the allowed\n\tnumber of max seats, or decreasing seats for a commitment based plan.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/ChangeParameters/main.go", "language": "GO", "clientMethod": { @@ -243,7 +243,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync", "title": "cloudchannel ChangeRenewalSettings Sample", - "description": "ChangeRenewalSettings updates the renewal settings 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: Entitlement resource not found.\n\n NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a\n commitment plan. Can’t enable or disable renewals for non-commitment plans.\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.", + "description": "ChangeRenewalSettings updates the renewal settings 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\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tNOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a\n\tcommitment plan. Can’t enable or disable renewals for non-commitment plans.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/ChangeRenewalSettings/main.go", "language": "GO", "clientMethod": { @@ -289,7 +289,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync", "title": "cloudchannel CheckCloudIdentityAccountsExist Sample", - "description": "CheckCloudIdentityAccountsExist confirms the existence of Cloud Identity accounts based on the domain and\nif the Cloud Identity accounts are owned by the reseller.\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 INVALID_VALUE: Invalid domain value in the request.\n\nReturn value: \nA list of CloudIdentityCustomerAccount resources for the domain (may be\nempty)\n\nNote: in the v1alpha1 version of the API, a NOT_FOUND error returns if\nno CloudIdentityCustomerAccount resources match the domain.", + "description": "CheckCloudIdentityAccountsExist confirms the existence of Cloud Identity accounts based on the domain and\nif the Cloud Identity accounts are owned by the reseller.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tINVALID_VALUE: Invalid domain value in the request.\n\nReturn value: \nA list of CloudIdentityCustomerAccount resources for the domain (may be\nempty)\n\nNote: in the v1alpha1 version of the API, a NOT_FOUND error returns if\nno CloudIdentityCustomerAccount resources match the domain.", "file": "CloudChannelClient/CheckCloudIdentityAccountsExist/main.go", "language": "GO", "clientMethod": { @@ -335,7 +335,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync", "title": "cloudchannel CreateChannelPartnerLink Sample", - "description": "CreateChannelPartnerLink initiates a channel partner link between a distributor and a reseller, or\nbetween resellers in an n-tier reseller channel.\nInvited partners need to follow the invite_link_uri provided in the\nresponse to accept. After accepting the invitation, a link is set up\nbetween the two parties.\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 ALREADY_EXISTS: The ChannelPartnerLink sent in the request already\n exists.\n\n NOT_FOUND: No Cloud Identity customer exists for provided domain.\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 new ChannelPartnerLink resource.", + "description": "CreateChannelPartnerLink initiates a channel partner link between a distributor and a reseller, or\nbetween resellers in an n-tier reseller channel.\nInvited partners need to follow the invite_link_uri provided in the\nresponse to accept. After accepting the invitation, a link is set up\nbetween the two parties.\nYou must be a distributor to call this method.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tALREADY_EXISTS: The ChannelPartnerLink sent in the request already\n\texists.\n\n\tNOT_FOUND: No Cloud Identity customer exists for provided domain.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact Cloud Channel support.\n\nReturn value: \nThe new ChannelPartnerLink resource.", "file": "CloudChannelClient/CreateChannelPartnerLink/main.go", "language": "GO", "clientMethod": { @@ -381,7 +381,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync", "title": "cloudchannel CreateChannelPartnerRepricingConfig Sample", - "description": "CreateChannelPartnerRepricingConfig creates a ChannelPartnerRepricingConfig. Call this method to set\nmodifications for a specific ChannelPartner’s bill. You can only create\nconfigs if the RepricingConfig.effective_invoice_month is a future\nmonth. If needed, you can create a config for the current month, with some\nrestrictions.\n\nWhen creating a config for a future month, make sure there are no existing\nconfigs for that\nRepricingConfig.effective_invoice_month.\n\nThe following restrictions are for creating configs in the current month.\n\n This functionality is reserved for recovering from an erroneous config,\n and should not be used for regular business cases.\n\n The new config will not modify exports used with other configs.\n Changes to the config may be immediate, but may take up to 24 hours.\n\n There is a limit of ten configs for any ChannelPartner or\n RepricingConfig.effective_invoice_month.\n\n The contained ChannelPartnerRepricingConfig.repricing_config vaule\n must be different from the value used in the current config for a\n ChannelPartner.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n INVALID_ARGUMENT: Missing or invalid required parameters in the\n request. Also displays if the updated config is for the current month or\n past months.\n\n NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n or is not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated ChannelPartnerRepricingConfig resource,\notherwise returns an error.", + "description": "CreateChannelPartnerRepricingConfig creates a ChannelPartnerRepricingConfig. Call this method to set\nmodifications for a specific ChannelPartner’s bill. You can only create\nconfigs if the RepricingConfig.effective_invoice_month is a future\nmonth. If needed, you can create a config for the current month, with some\nrestrictions.\n\nWhen creating a config for a future month, make sure there are no existing\nconfigs for that\nRepricingConfig.effective_invoice_month.\n\nThe following restrictions are for creating configs in the current month.\n\n\tThis functionality is reserved for recovering from an erroneous config,\n\tand should not be used for regular business cases.\n\n\tThe new config will not modify exports used with other configs.\n\tChanges to the config may be immediate, but may take up to 24 hours.\n\n\tThere is a limit of ten configs for any ChannelPartner or\n\tRepricingConfig.effective_invoice_month.\n\n\tThe contained ChannelPartnerRepricingConfig.repricing_config vaule\n\tmust be different from the value used in the current config for a\n\tChannelPartner.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tINVALID_ARGUMENT: Missing or invalid required parameters in the\n\trequest. Also displays if the updated config is for the current month or\n\tpast months.\n\n\tNOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n\tor is not associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated ChannelPartnerRepricingConfig resource,\notherwise returns an error.", "file": "CloudChannelClient/CreateChannelPartnerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -427,7 +427,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", "title": "cloudchannel CreateCustomer Sample", - "description": "CreateCustomer creates a new Customer resource under the reseller or distributor\naccount.\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: \n\n Required request parameters are missing or invalid.\n\n Domain field value doesn’t match the primary email domain.\n\nReturn value: \nThe newly created Customer resource.", + "description": "CreateCustomer creates a new Customer resource under the reseller or distributor\naccount.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: \n\n\t Required request parameters are missing or invalid.\n\n\t Domain field value doesn’t match the primary email domain.\n\nReturn value: \nThe newly created Customer resource.", "file": "CloudChannelClient/CreateCustomer/main.go", "language": "GO", "clientMethod": { @@ -473,7 +473,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync", "title": "cloudchannel CreateCustomerRepricingConfig Sample", - "description": "CreateCustomerRepricingConfig creates a CustomerRepricingConfig. Call this method to set modifications\nfor a specific customer’s bill. You can only create configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. If needed, you can create a config for the current month,\nwith some restrictions.\n\nWhen creating a config for a future month, make sure there are no existing\nconfigs for that\nRepricingConfig.effective_invoice_month.\n\nThe following restrictions are for creating configs in the current month.\n\n This functionality is reserved for recovering from an erroneous config,\n and should not be used for regular business cases.\n\n The new config will not modify exports used with other configs.\n Changes to the config may be immediate, but may take up to 24 hours.\n\n There is a limit of ten configs for any\n RepricingConfig.EntitlementGranularity.entitlement\n or RepricingConfig.effective_invoice_month.\n\n The contained CustomerRepricingConfig.repricing_config vaule must be\n different from the value used in the current config for a\n RepricingConfig.EntitlementGranularity.entitlement.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n INVALID_ARGUMENT: Missing or invalid required parameters in the\n request. Also displays if the updated config is for the current month or\n past months.\n\n NOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated CustomerRepricingConfig resource, otherwise\nreturns an error.", + "description": "CreateCustomerRepricingConfig creates a CustomerRepricingConfig. Call this method to set modifications\nfor a specific customer’s bill. You can only create configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. If needed, you can create a config for the current month,\nwith some restrictions.\n\nWhen creating a config for a future month, make sure there are no existing\nconfigs for that\nRepricingConfig.effective_invoice_month.\n\nThe following restrictions are for creating configs in the current month.\n\n\tThis functionality is reserved for recovering from an erroneous config,\n\tand should not be used for regular business cases.\n\n\tThe new config will not modify exports used with other configs.\n\tChanges to the config may be immediate, but may take up to 24 hours.\n\n\tThere is a limit of ten configs for any\n\tRepricingConfig.EntitlementGranularity.entitlement\n\tor RepricingConfig.effective_invoice_month.\n\n\tThe contained CustomerRepricingConfig.repricing_config vaule must be\n\tdifferent from the value used in the current config for a\n\tRepricingConfig.EntitlementGranularity.entitlement.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tINVALID_ARGUMENT: Missing or invalid required parameters in the\n\trequest. Also displays if the updated config is for the current month or\n\tpast months.\n\n\tNOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n\tnot associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated CustomerRepricingConfig resource, otherwise\nreturns an error.", "file": "CloudChannelClient/CreateCustomerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -519,7 +519,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", "title": "cloudchannel CreateEntitlement Sample", - "description": "CreateEntitlement creates an entitlement for a customer.\n\nPossible error codes: \n\n PERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n INVALID_ARGUMENT: \n\n Required request parameters are missing or invalid.\n\n There is already a customer entitlement for a SKU from the same\n product family.\n\n INVALID_VALUE: Make sure the OfferId is valid. If it is, contact\n Google Channel support for further troubleshooting.\n\n NOT_FOUND: The customer or offer resource was not found.\n\n ALREADY_EXISTS: \n\n The SKU was already purchased for the customer.\n\n The customer’s primary email already exists. Retry\n after changing the customer’s primary contact email.\n\n CONDITION_NOT_MET or FAILED_PRECONDITION: \n\n The domain required for purchasing a SKU has not been verified.\n\n A pre-requisite SKU required to purchase an Add-On SKU is missing.\n For example, Google Workspace Business Starter is required to purchase\n Vault or Drive.\n\n (Developer accounts only) Reseller and resold domain must meet the\n following naming requirements: \n\n Domain names must start with goog-test.\n\n Domain names must include the reseller domain.\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.", + "description": "CreateEntitlement creates an entitlement for a customer.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: \n\n\t Required request parameters are missing or invalid.\n\n\t There is already a customer entitlement for a SKU from the same\n\t product family.\n\n\tINVALID_VALUE: Make sure the OfferId is valid. If it is, contact\n\tGoogle Channel support for further troubleshooting.\n\n\tNOT_FOUND: The customer or offer resource was not found.\n\n\tALREADY_EXISTS: \n\n\t The SKU was already purchased for the customer.\n\n\t The customer’s primary email already exists. Retry\n\t after changing the customer’s primary contact email.\n\n\tCONDITION_NOT_MET or FAILED_PRECONDITION: \n\n\t The domain required for purchasing a SKU has not been verified.\n\n\t A pre-requisite SKU required to purchase an Add-On SKU is missing.\n\t For example, Google Workspace Business Starter is required to purchase\n\t Vault or Drive.\n\n\t (Developer accounts only) Reseller and resold domain must meet the\n\t following naming requirements: \n\n\t Domain names must start with goog-test.\n\n\t Domain names must include the reseller domain.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/CreateEntitlement/main.go", "language": "GO", "clientMethod": { @@ -565,7 +565,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync", "title": "cloudchannel DeleteChannelPartnerRepricingConfig Sample", - "description": "DeleteChannelPartnerRepricingConfig deletes the given ChannelPartnerRepricingConfig permanently. You can\nonly delete configs if their RepricingConfig.effective_invoice_month is\nset to a date after the current month.\n\nPossible error codes: \n\n PERMISSION_DENIED: The account making the request does not own\n this customer.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or\n in the past.\n\n NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the\n request.", + "description": "DeleteChannelPartnerRepricingConfig deletes the given ChannelPartnerRepricingConfig permanently. You can\nonly delete configs if their RepricingConfig.effective_invoice_month is\nset to a date after the current month.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The account making the request does not own\n\tthis customer.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tFAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or\n\tin the past.\n\n\tNOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the\n\trequest.", "file": "CloudChannelClient/DeleteChannelPartnerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -610,7 +610,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", "title": "cloudchannel DeleteCustomer Sample", - "description": "DeleteCustomer deletes the given Customer permanently.\n\nPossible error codes: \n\n PERMISSION_DENIED: The account making the request does not own\n this customer.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n FAILED_PRECONDITION: The customer has existing entitlements.\n\n NOT_FOUND: No Customer resource found for the name in the request.", + "description": "DeleteCustomer deletes the given Customer permanently.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The account making the request does not own\n\tthis customer.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tFAILED_PRECONDITION: The customer has existing entitlements.\n\n\tNOT_FOUND: No Customer resource found for the name in the request.", "file": "CloudChannelClient/DeleteCustomer/main.go", "language": "GO", "clientMethod": { @@ -655,7 +655,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync", "title": "cloudchannel DeleteCustomerRepricingConfig Sample", - "description": "DeleteCustomerRepricingConfig deletes the given CustomerRepricingConfig permanently. You can only\ndelete configs if their RepricingConfig.effective_invoice_month is set\nto a date after the current month.\n\nPossible error codes: \n\n PERMISSION_DENIED: The account making the request does not own\n this customer.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the\n past.\n\n NOT_FOUND: No CustomerRepricingConfig found for the name in the\n request.", + "description": "DeleteCustomerRepricingConfig deletes the given CustomerRepricingConfig permanently. You can only\ndelete configs if their RepricingConfig.effective_invoice_month is set\nto a date after the current month.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The account making the request does not own\n\tthis customer.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tFAILED_PRECONDITION: The CustomerRepricingConfig is active or in the\n\tpast.\n\n\tNOT_FOUND: No CustomerRepricingConfig found for the name in the\n\trequest.", "file": "CloudChannelClient/DeleteCustomerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -745,7 +745,7 @@ { "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.", + "description": "GetChannelPartnerLink returns the requested ChannelPartnerLink resource.\nYou must be a distributor to call this method.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: ChannelPartnerLink resource not found because of an\n\tinvalid channel partner link name.\n\nReturn value: \nThe ChannelPartnerLink resource.", "file": "CloudChannelClient/GetChannelPartnerLink/main.go", "language": "GO", "clientMethod": { @@ -791,7 +791,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync", "title": "cloudchannel GetChannelPartnerRepricingConfig Sample", - "description": "GetChannelPartnerRepricingConfig gets information about how a Distributor modifies their bill before sending\nit to a ChannelPartner.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n NOT_FOUND: The ChannelPartnerRepricingConfig was not found.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the ChannelPartnerRepricingConfig resource, otherwise\nreturns an error.", + "description": "GetChannelPartnerRepricingConfig gets information about how a Distributor modifies their bill before sending\nit to a ChannelPartner.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tNOT_FOUND: The ChannelPartnerRepricingConfig was not found.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the ChannelPartnerRepricingConfig resource, otherwise\nreturns an error.", "file": "CloudChannelClient/GetChannelPartnerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -837,7 +837,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", "title": "cloudchannel GetCustomer Sample", - "description": "GetCustomer returns the requested Customer resource.\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: The customer resource doesn’t exist. Usually the result of an\n invalid name parameter.\n\nReturn value: \nThe Customer resource.", + "description": "GetCustomer returns the requested Customer resource.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The customer resource doesn’t exist. Usually the result of an\n\tinvalid name parameter.\n\nReturn value: \nThe Customer resource.", "file": "CloudChannelClient/GetCustomer/main.go", "language": "GO", "clientMethod": { @@ -883,7 +883,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync", "title": "cloudchannel GetCustomerRepricingConfig Sample", - "description": "GetCustomerRepricingConfig gets information about how a Reseller modifies their bill before sending\nit to a Customer.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n NOT_FOUND: The CustomerRepricingConfig was not found.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the CustomerRepricingConfig resource, otherwise returns\nan error.", + "description": "GetCustomerRepricingConfig gets information about how a Reseller modifies their bill before sending\nit to a Customer.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tNOT_FOUND: The CustomerRepricingConfig was not found.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the CustomerRepricingConfig resource, otherwise returns\nan error.", "file": "CloudChannelClient/GetCustomerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -929,7 +929,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", "title": "cloudchannel GetEntitlement Sample", - "description": "GetEntitlement returns the requested Entitlement resource.\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: The customer entitlement was not found.\n\nReturn value: \nThe requested Entitlement resource.", + "description": "GetEntitlement returns the requested Entitlement resource.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The customer entitlement was not found.\n\nReturn value: \nThe requested Entitlement resource.", "file": "CloudChannelClient/GetEntitlement/main.go", "language": "GO", "clientMethod": { @@ -1021,7 +1021,7 @@ { "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.", + "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\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tNOT_FOUND: Cloud Identity doesn’t exist or was deleted.\n\n\tINVALID_ARGUMENT: Required parameters are missing, or the auth_token is\n\texpired or invalid.\n\n\tALREADY_EXISTS: A customer already exists and has conflicting critical\n\tfields. Requires an overwrite.\n\nReturn value: \nThe Customer.", "file": "CloudChannelClient/ImportCustomer/main.go", "language": "GO", "clientMethod": { @@ -1067,7 +1067,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", "title": "cloudchannel ListChannelPartnerLinks Sample", - "description": "ListChannelPartnerLinks list ChannelPartnerLinks belonging to a distributor.\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\nReturn value: \nThe list of the distributor account’s ChannelPartnerLink resources.", + "description": "ListChannelPartnerLinks list ChannelPartnerLinks belonging to a distributor.\nYou must be a distributor to call this method.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nThe list of the distributor account’s ChannelPartnerLink resources.", "file": "CloudChannelClient/ListChannelPartnerLinks/main.go", "language": "GO", "clientMethod": { @@ -1113,7 +1113,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync", "title": "cloudchannel ListChannelPartnerRepricingConfigs Sample", - "description": "ListChannelPartnerRepricingConfigs lists information about how a Reseller modifies their bill before sending\nit to a ChannelPartner.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n or is not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the ChannelPartnerRepricingConfig resources.\nThe data for each resource is displayed in the ascending order of: \n\n channel partner ID\n\n RepricingConfig.effective_invoice_month\n\n ChannelPartnerRepricingConfig.update_time\n\nIf unsuccessful, returns an error.", + "description": "ListChannelPartnerRepricingConfigs lists information about how a Reseller modifies their bill before sending\nit to a ChannelPartner.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tNOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n\tor is not associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the ChannelPartnerRepricingConfig resources.\nThe data for each resource is displayed in the ascending order of: \n\n\tchannel partner ID\n\n\tRepricingConfig.effective_invoice_month\n\n\tChannelPartnerRepricingConfig.update_time\n\nIf unsuccessful, returns an error.", "file": "CloudChannelClient/ListChannelPartnerRepricingConfigs/main.go", "language": "GO", "clientMethod": { @@ -1159,7 +1159,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync", "title": "cloudchannel ListCustomerRepricingConfigs Sample", - "description": "ListCustomerRepricingConfigs lists information about how a Reseller modifies their bill before sending\nit to a Customer.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n NOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the CustomerRepricingConfig resources. The\ndata for each resource is displayed in the ascending order of: \n\n customer ID\n\n RepricingConfig.EntitlementGranularity.entitlement\n\n RepricingConfig.effective_invoice_month\n\n CustomerRepricingConfig.update_time\n\nIf unsuccessful, returns an error.", + "description": "ListCustomerRepricingConfigs lists information about how a Reseller modifies their bill before sending\nit to a Customer.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tNOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n\tnot associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the CustomerRepricingConfig resources. The\ndata for each resource is displayed in the ascending order of: \n\n\tcustomer ID\n\n\tRepricingConfig.EntitlementGranularity.entitlement\n\n\tRepricingConfig.effective_invoice_month\n\n\tCustomerRepricingConfig.update_time\n\nIf unsuccessful, returns an error.", "file": "CloudChannelClient/ListCustomerRepricingConfigs/main.go", "language": "GO", "clientMethod": { @@ -1205,7 +1205,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", "title": "cloudchannel ListCustomers Sample", - "description": "ListCustomers list Customers.\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\nReturn value: \nList of Customers, or an empty list if there are no customers.", + "description": "ListCustomers list Customers.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nList of Customers, or an empty list if there are no customers.", "file": "CloudChannelClient/ListCustomers/main.go", "language": "GO", "clientMethod": { @@ -1251,7 +1251,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", "title": "cloudchannel ListEntitlements Sample", - "description": "ListEntitlements lists Entitlements belonging to a customer.\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\nReturn value: \nA list of the customer’s Entitlements.", + "description": "ListEntitlements lists Entitlements belonging to a customer.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nA list of the customer’s Entitlements.", "file": "CloudChannelClient/ListEntitlements/main.go", "language": "GO", "clientMethod": { @@ -1297,7 +1297,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", "title": "cloudchannel ListOffers Sample", - "description": "ListOffers lists the Offers the reseller can sell.\n\nPossible error codes: \n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.", + "description": "ListOffers lists the Offers the reseller can sell.\n\nPossible error codes: \n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.", "file": "CloudChannelClient/ListOffers/main.go", "language": "GO", "clientMethod": { @@ -1389,7 +1389,7 @@ { "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.", + "description": "ListProducts lists the Products the reseller is authorized to sell.\n\nPossible error codes: \n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.", "file": "CloudChannelClient/ListProducts/main.go", "language": "GO", "clientMethod": { @@ -1435,7 +1435,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", "title": "cloudchannel ListPurchasableOffers Sample", - "description": "ListPurchasableOffers lists the following: \n\n Offers that you can purchase for a customer.\n\n Offers that you can change for an entitlement.\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.", + "description": "ListPurchasableOffers lists the following: \n\n\tOffers that you can purchase for a customer.\n\n\tOffers that you can change for an entitlement.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.", "file": "CloudChannelClient/ListPurchasableOffers/main.go", "language": "GO", "clientMethod": { @@ -1481,7 +1481,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", "title": "cloudchannel ListPurchasableSkus Sample", - "description": "ListPurchasableSkus lists the following: \n\n SKUs that you can purchase for a customer\n\n SKUs that you can upgrade or downgrade for an entitlement.\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.", + "description": "ListPurchasableSkus lists the following: \n\n\tSKUs that you can purchase for a customer\n\n\tSKUs that you can upgrade or downgrade for an entitlement.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.", "file": "CloudChannelClient/ListPurchasableSkus/main.go", "language": "GO", "clientMethod": { @@ -1527,7 +1527,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", "title": "cloudchannel ListSkus Sample", - "description": "ListSkus lists the SKUs for a product the reseller is authorized to sell.\n\nPossible error codes: \n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.", + "description": "ListSkus lists the SKUs for a product the reseller is authorized to sell.\n\nPossible error codes: \n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.", "file": "CloudChannelClient/ListSkus/main.go", "language": "GO", "clientMethod": { @@ -1573,7 +1573,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", "title": "cloudchannel ListSubscribers Sample", - "description": "ListSubscribers lists service accounts with subscriber privileges on the Cloud Pub/Sub\ntopic created for this Channel Services account.\n\nPossible error codes: \n\n PERMISSION_DENIED: The reseller account making the request and the\n provided reseller account are different, or the impersonated user\n is not a super admin.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: The topic resource doesn’t exist.\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: \nA list of service email addresses.", + "description": "ListSubscribers lists service accounts with subscriber privileges on the Cloud Pub/Sub\ntopic created for this Channel Services account.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request and the\n\tprovided reseller account are different, or the impersonated user\n\tis not a super admin.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The topic resource doesn’t exist.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact Cloud Channel support.\n\nReturn value: \nA list of service email addresses.", "file": "CloudChannelClient/ListSubscribers/main.go", "language": "GO", "clientMethod": { @@ -1619,7 +1619,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", "title": "cloudchannel ListTransferableOffers Sample", - "description": "ListTransferableOffers list TransferableOffers of a customer based on Cloud Identity ID or\nCustomer Name in the request.\n\nUse this method when a reseller gets the entitlement information of an\nunowned customer. The reseller should provide the customer’s\nCloud Identity ID or Customer Name.\n\nPossible error codes: \n\n PERMISSION_DENIED: \n\n The customer doesn’t belong to the reseller and has no auth token.\n\n The supplied auth token is invalid.\n\n The reseller account making the request is different\n from the reseller account in the query.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nList of TransferableOffer for the given customer and SKU.", + "description": "ListTransferableOffers list TransferableOffers of a customer based on Cloud Identity ID or\nCustomer Name in the request.\n\nUse this method when a reseller gets the entitlement information of an\nunowned customer. The reseller should provide the customer’s\nCloud Identity ID or Customer Name.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: \n\n\t The customer doesn’t belong to the reseller and has no auth token.\n\n\t The supplied auth token is invalid.\n\n\t The reseller account making the request is different\n\t from the reseller account in the query.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nList of TransferableOffer for the given customer and SKU.", "file": "CloudChannelClient/ListTransferableOffers/main.go", "language": "GO", "clientMethod": { @@ -1665,7 +1665,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", "title": "cloudchannel ListTransferableSkus Sample", - "description": "ListTransferableSkus list TransferableSkus of a customer based on the Cloud Identity ID or\nCustomer Name in the request.\n\nUse this method to list the entitlements information of an\nunowned customer. You should provide the customer’s\nCloud Identity ID or Customer Name.\n\nPossible error codes: \n\n PERMISSION_DENIED: \n\n The customer doesn’t belong to the reseller and has no auth token.\n\n The supplied auth token is invalid.\n\n The reseller account making the request is different\n from the reseller account in the query.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nA list of the customer’s TransferableSku.", + "description": "ListTransferableSkus list TransferableSkus of a customer based on the Cloud Identity ID or\nCustomer Name in the request.\n\nUse this method to list the entitlements information of an\nunowned customer. You should provide the customer’s\nCloud Identity ID or Customer Name.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: \n\n\t The customer doesn’t belong to the reseller and has no auth token.\n\n\t The supplied auth token is invalid.\n\n\t The reseller account making the request is different\n\t from the reseller account in the query.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\nReturn value: \nA list of the customer’s TransferableSku.", "file": "CloudChannelClient/ListTransferableSkus/main.go", "language": "GO", "clientMethod": { @@ -1711,7 +1711,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", "title": "cloudchannel LookupOffer Sample", - "description": "LookupOffer returns the requested Offer resource.\n\nPossible error codes: \n\n PERMISSION_DENIED: The entitlement doesn’t belong to the reseller.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: Entitlement or offer was not found.\n\nReturn value: \nThe Offer resource.", + "description": "LookupOffer returns the requested Offer resource.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The entitlement doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement or offer was not found.\n\nReturn value: \nThe Offer resource.", "file": "CloudChannelClient/LookupOffer/main.go", "language": "GO", "clientMethod": { @@ -1757,7 +1757,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", "title": "cloudchannel ProvisionCloudIdentity Sample", - "description": "ProvisionCloudIdentity creates a Cloud Identity for the given customer using the customer’s\ninformation, or the information provided here.\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: The customer was not found.\n\n ALREADY_EXISTS: The customer’s primary email already exists. Retry\n after changing the customer’s primary contact email.\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 contains an\ninstance of OperationMetadata.", + "description": "ProvisionCloudIdentity creates a Cloud Identity for the given customer using the customer’s\ninformation, or the information provided here.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The customer was not found.\n\n\tALREADY_EXISTS: The customer’s primary email already exists. Retry\n\tafter changing the customer’s primary contact email.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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 contains an\ninstance of OperationMetadata.", "file": "CloudChannelClient/ProvisionCloudIdentity/main.go", "language": "GO", "clientMethod": { @@ -1803,7 +1803,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", "title": "cloudchannel RegisterSubscriber Sample", - "description": "RegisterSubscriber registers a service account with subscriber privileges on the Cloud Pub/Sub\ntopic for this Channel Services account. After you create a\nsubscriber, you get the events through SubscriberEvent\n\nPossible error codes: \n\n PERMISSION_DENIED: The reseller account making the request and the\n provided reseller account are different, or the impersonated user\n is not a super admin.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\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 topic name with the registered service email address.", + "description": "RegisterSubscriber registers a service account with subscriber privileges on the Cloud Pub/Sub\ntopic for this Channel Services account. After you create a\nsubscriber, you get the events through SubscriberEvent\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request and the\n\tprovided reseller account are different, or the impersonated user\n\tis not a super admin.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact Cloud Channel support.\n\nReturn value: \nThe topic name with the registered service email address.", "file": "CloudChannelClient/RegisterSubscriber/main.go", "language": "GO", "clientMethod": { @@ -1849,7 +1849,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", "title": "cloudchannel StartPaidService Sample", - "description": "StartPaidService starts paid service for a trial entitlement.\n\nStarts paid service for a trial entitlement immediately. This method is\nonly applicable if a plan is set up for a trial entitlement but has some\ntrial days remaining.\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: Entitlement resource not found.\n\n FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for\n entitlement on trial plans.\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.", + "description": "StartPaidService starts paid service for a trial entitlement.\n\nStarts paid service for a trial entitlement immediately. This method is\nonly applicable if a plan is set up for a trial entitlement but has some\ntrial days remaining.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tFAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for\n\tentitlement on trial plans.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/StartPaidService/main.go", "language": "GO", "clientMethod": { @@ -1895,7 +1895,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", "title": "cloudchannel SuspendEntitlement Sample", - "description": "SuspendEntitlement suspends a previously fulfilled entitlement.\n\nAn entitlement suspension is a long-running operation.\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: Entitlement resource not found.\n\n NOT_ACTIVE: Entitlement is not active.\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.", + "description": "SuspendEntitlement suspends a previously fulfilled entitlement.\n\nAn entitlement suspension is a long-running operation.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: Entitlement resource not found.\n\n\tNOT_ACTIVE: Entitlement is not active.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/SuspendEntitlement/main.go", "language": "GO", "clientMethod": { @@ -1941,7 +1941,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", "title": "cloudchannel TransferEntitlements Sample", - "description": "TransferEntitlements transfers customer entitlements to new reseller.\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: The customer or offer resource was not found.\n\n ALREADY_EXISTS: The SKU was already transferred for the customer.\n\n CONDITION_NOT_MET or FAILED_PRECONDITION: \n\n The SKU requires domain verification to transfer, but the domain is\n not verified.\n\n An Add-On SKU (example, Vault or Drive) is missing the\n pre-requisite SKU (example, G Suite Basic).\n\n (Developer accounts only) Reseller and resold domain must meet the\n following naming requirements: \n\n Domain names must start with goog-test.\n\n Domain names must include the reseller domain.\n\n Specify all transferring entitlements.\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.", + "description": "TransferEntitlements transfers customer entitlements to new reseller.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The customer or offer resource was not found.\n\n\tALREADY_EXISTS: The SKU was already transferred for the customer.\n\n\tCONDITION_NOT_MET or FAILED_PRECONDITION: \n\n\t The SKU requires domain verification to transfer, but the domain is\n\t not verified.\n\n\t An Add-On SKU (example, Vault or Drive) is missing the\n\t pre-requisite SKU (example, G Suite Basic).\n\n\t (Developer accounts only) Reseller and resold domain must meet the\n\t following naming requirements: \n\n\t Domain names must start with goog-test.\n\n\t Domain names must include the reseller domain.\n\n\t Specify all transferring entitlements.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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.", "file": "CloudChannelClient/TransferEntitlements/main.go", "language": "GO", "clientMethod": { @@ -1987,7 +1987,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", "title": "cloudchannel TransferEntitlementsToGoogle Sample", - "description": "TransferEntitlementsToGoogle transfers customer entitlements from their current reseller to Google.\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: The customer or offer resource was not found.\n\n ALREADY_EXISTS: The SKU was already transferred for the customer.\n\n CONDITION_NOT_MET or FAILED_PRECONDITION: \n\n The SKU requires domain verification to transfer, but the domain is\n not verified.\n\n An Add-On SKU (example, Vault or Drive) is missing the\n pre-requisite SKU (example, G Suite Basic).\n\n (Developer accounts only) Reseller and resold domain must meet the\n following naming requirements: \n\n Domain names must start with goog-test.\n\n Domain names must include the reseller domain.\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 response will contain\ngoogle.protobuf.Empty on success. The Operation metadata will contain an\ninstance of OperationMetadata.", + "description": "TransferEntitlementsToGoogle transfers customer entitlements from their current reseller to Google.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The customer doesn’t belong to the reseller.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The customer or offer resource was not found.\n\n\tALREADY_EXISTS: The SKU was already transferred for the customer.\n\n\tCONDITION_NOT_MET or FAILED_PRECONDITION: \n\n\t The SKU requires domain verification to transfer, but the domain is\n\t not verified.\n\n\t An Add-On SKU (example, Vault or Drive) is missing the\n\t pre-requisite SKU (example, G Suite Basic).\n\n\t (Developer accounts only) Reseller and resold domain must meet the\n\t following naming requirements: \n\n\t Domain names must start with goog-test.\n\n\t Domain names must include the reseller domain.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact 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 response will contain\ngoogle.protobuf.Empty on success. The Operation metadata will contain an\ninstance of OperationMetadata.", "file": "CloudChannelClient/TransferEntitlementsToGoogle/main.go", "language": "GO", "clientMethod": { @@ -2033,7 +2033,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", "title": "cloudchannel UnregisterSubscriber Sample", - "description": "UnregisterSubscriber unregisters a service account with subscriber privileges on the Cloud\nPub/Sub topic created for this Channel Services account. If there are no\nservice accounts left with subscriber privileges, this deletes the topic.\nYou can call ListSubscribers to check for these accounts.\n\nPossible error codes: \n\n PERMISSION_DENIED: The reseller account making the request and the\n provided reseller account are different, or the impersonated user\n is not a super admin.\n\n INVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n NOT_FOUND: The topic resource doesn’t exist.\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 topic name that unregistered the service email address.\nReturns a success response if the service email address wasn’t registered\nwith the topic.", + "description": "UnregisterSubscriber unregisters a service account with subscriber privileges on the Cloud\nPub/Sub topic created for this Channel Services account. If there are no\nservice accounts left with subscriber privileges, this deletes the topic.\nYou can call ListSubscribers to check for these accounts.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request and the\n\tprovided reseller account are different, or the impersonated user\n\tis not a super admin.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: The topic resource doesn’t exist.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact Cloud Channel support.\n\nReturn value: \nThe topic name that unregistered the service email address.\nReturns a success response if the service email address wasn’t registered\nwith the topic.", "file": "CloudChannelClient/UnregisterSubscriber/main.go", "language": "GO", "clientMethod": { @@ -2079,7 +2079,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", "title": "cloudchannel UpdateChannelPartnerLink Sample", - "description": "UpdateChannelPartnerLink updates a channel partner link. Distributors call this method to change a\nlink’s status. For example, to suspend a partner link.\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: \n\n Required request parameters are missing or invalid.\n\n Link state cannot change from invited to active or suspended.\n\n Cannot send reseller_cloud_identity_id, invite_url, or name in update\n mask.\n\n NOT_FOUND: ChannelPartnerLink 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 updated ChannelPartnerLink resource.", + "description": "UpdateChannelPartnerLink updates a channel partner link. Distributors call this method to change a\nlink’s status. For example, to suspend a partner link.\nYou must be a distributor to call this method.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: \n\n\t Required request parameters are missing or invalid.\n\n\t Link state cannot change from invited to active or suspended.\n\n\t Cannot send reseller_cloud_identity_id, invite_url, or name in update\n\t mask.\n\n\tNOT_FOUND: ChannelPartnerLink resource not found.\n\n\tINTERNAL: Any non-user error related to a technical issue in the\n\tbackend. Contact Cloud Channel support.\n\n\tUNKNOWN: Any non-user error related to a technical issue in the backend.\n\tContact Cloud Channel support.\n\nReturn value: \nThe updated ChannelPartnerLink resource.", "file": "CloudChannelClient/UpdateChannelPartnerLink/main.go", "language": "GO", "clientMethod": { @@ -2125,7 +2125,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync", "title": "cloudchannel UpdateChannelPartnerRepricingConfig Sample", - "description": "UpdateChannelPartnerRepricingConfig updates a ChannelPartnerRepricingConfig. Call this method to set\nmodifications for a specific ChannelPartner’s bill. This method overwrites\nthe existing CustomerRepricingConfig.\n\nYou can only update configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. To make changes to configs for the current month, use\nCreateChannelPartnerRepricingConfig, taking note of its restrictions.\nYou cannot update the RepricingConfig.effective_invoice_month.\n\nWhen updating a config in the future: \n\n This config must already exist.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n INVALID_ARGUMENT: Missing or invalid required parameters in the\n request. Also displays if the updated config is for the current month or\n past months.\n\n NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n or is not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated ChannelPartnerRepricingConfig resource,\notherwise returns an error.", + "description": "UpdateChannelPartnerRepricingConfig updates a ChannelPartnerRepricingConfig. Call this method to set\nmodifications for a specific ChannelPartner’s bill. This method overwrites\nthe existing CustomerRepricingConfig.\n\nYou can only update configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. To make changes to configs for the current month, use\nCreateChannelPartnerRepricingConfig, taking note of its restrictions.\nYou cannot update the RepricingConfig.effective_invoice_month.\n\nWhen updating a config in the future: \n\n\tThis config must already exist.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tINVALID_ARGUMENT: Missing or invalid required parameters in the\n\trequest. Also displays if the updated config is for the current month or\n\tpast months.\n\n\tNOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist\n\tor is not associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated ChannelPartnerRepricingConfig resource,\notherwise returns an error.", "file": "CloudChannelClient/UpdateChannelPartnerRepricingConfig/main.go", "language": "GO", "clientMethod": { @@ -2171,7 +2171,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync", "title": "cloudchannel UpdateCustomer Sample", - "description": "UpdateCustomer updates an existing Customer resource for the reseller or\ndistributor.\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: No Customer resource found for the name in the request.\n\nReturn value: \nThe updated Customer resource.", + "description": "UpdateCustomer updates an existing Customer resource for the reseller or\ndistributor.\n\nPossible error codes: \n\n\tPERMISSION_DENIED: The reseller account making the request is different\n\tfrom the reseller account in the API request.\n\n\tINVALID_ARGUMENT: Required request parameters are missing or invalid.\n\n\tNOT_FOUND: No Customer resource found for the name in the request.\n\nReturn value: \nThe updated Customer resource.", "file": "CloudChannelClient/UpdateCustomer/main.go", "language": "GO", "clientMethod": { @@ -2217,7 +2217,7 @@ { "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync", "title": "cloudchannel UpdateCustomerRepricingConfig Sample", - "description": "UpdateCustomerRepricingConfig updates a CustomerRepricingConfig. Call this method to set modifications\nfor a specific customer’s bill. This method overwrites the existing\nCustomerRepricingConfig.\n\nYou can only update configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. To make changes to configs for the current month, use\nCreateCustomerRepricingConfig, taking note of its restrictions. You\ncannot update the RepricingConfig.effective_invoice_month.\n\nWhen updating a config in the future: \n\n This config must already exist.\n\nPossible Error Codes: \n\n PERMISSION_DENIED: If the account making the request and the account\n being queried are different.\n\n INVALID_ARGUMENT: Missing or invalid required parameters in the\n request. Also displays if the updated config is for the current month or\n past months.\n\n NOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n not associated with the given account.\n\n INTERNAL: Any non-user error related to technical issues in the\n backend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated CustomerRepricingConfig resource, otherwise\nreturns an error.", + "description": "UpdateCustomerRepricingConfig updates a CustomerRepricingConfig. Call this method to set modifications\nfor a specific customer’s bill. This method overwrites the existing\nCustomerRepricingConfig.\n\nYou can only update configs if the\nRepricingConfig.effective_invoice_month is a\nfuture month. To make changes to configs for the current month, use\nCreateCustomerRepricingConfig, taking note of its restrictions. You\ncannot update the RepricingConfig.effective_invoice_month.\n\nWhen updating a config in the future: \n\n\tThis config must already exist.\n\nPossible Error Codes: \n\n\tPERMISSION_DENIED: If the account making the request and the account\n\tbeing queried are different.\n\n\tINVALID_ARGUMENT: Missing or invalid required parameters in the\n\trequest. Also displays if the updated config is for the current month or\n\tpast months.\n\n\tNOT_FOUND: The CustomerRepricingConfig specified does not exist or is\n\tnot associated with the given account.\n\n\tINTERNAL: Any non-user error related to technical issues in the\n\tbackend. In this case, contact Cloud Channel support.\n\nReturn Value: \nIf successful, the updated CustomerRepricingConfig resource, otherwise\nreturns an error.", "file": "CloudChannelClient/UpdateCustomerRepricingConfig/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/snippet_metadata.google.devtools.cloudbuild.v1.json b/internal/generated/snippets/cloudbuild/apiv1/v2/snippet_metadata.google.devtools.cloudbuild.v1.json index b7680872a6c8..5f3a804d8e3e 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -657,7 +657,7 @@ { "regionTag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_sync", "title": "cloudbuild RetryBuild Sample", - "description": "RetryBuild creates a new build based on the specified build.\n\nThis method creates a new build using the original build request, which may\nor may not result in an identical build.\n\nFor triggered builds: \n\n Triggered builds resolve to a precise revision; therefore a retry of a\n triggered build will result in a build that uses the same revision.\n\nFor non-triggered builds that specify RepoSource: \n\n If the original build built from the tip of a branch, the retried build\n will build from the tip of that branch, which may not be the same revision\n as the original build.\n\n If the original build specified a commit sha or revision ID, the retried\n build will use the identical source.\n\nFor builds that specify StorageSource: \n\n If the original build pulled source from Google Cloud Storage without\n specifying the generation of the object, the new build will use the current\n object, which may be different from the original build source.\n\n If the original build pulled source from Cloud Storage and specified the\n generation of the object, the new build will attempt to use the same\n object, which may or may not be available depending on the bucket’s\n lifecycle management settings.", + "description": "RetryBuild creates a new build based on the specified build.\n\nThis method creates a new build using the original build request, which may\nor may not result in an identical build.\n\nFor triggered builds: \n\n\tTriggered builds resolve to a precise revision; therefore a retry of a\n\ttriggered build will result in a build that uses the same revision.\n\nFor non-triggered builds that specify RepoSource: \n\n\tIf the original build built from the tip of a branch, the retried build\n\twill build from the tip of that branch, which may not be the same revision\n\tas the original build.\n\n\tIf the original build specified a commit sha or revision ID, the retried\n\tbuild will use the identical source.\n\nFor builds that specify StorageSource: \n\n\tIf the original build pulled source from Google Cloud Storage without\n\tspecifying the generation of the object, the new build will use the current\n\tobject, which may be different from the original build source.\n\n\tIf the original build pulled source from Cloud Storage and specified the\n\tgeneration of the object, the new build will attempt to use the same\n\tobject, which may or may not be available depending on the bucket’s\n\tlifecycle management settings.", "file": "Client/RetryBuild/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/cloudtasks/apiv2/snippet_metadata.google.cloud.tasks.v2.json b/internal/generated/snippets/cloudtasks/apiv2/snippet_metadata.google.cloud.tasks.v2.json index f731f5ec60e2..9b1130aca62e 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/snippet_metadata.google.cloud.tasks.v2.json +++ b/internal/generated/snippets/cloudtasks/apiv2/snippet_metadata.google.cloud.tasks.v2.json @@ -60,7 +60,7 @@ { "regionTag": "cloudtasks_v2_generated_CloudTasks_CreateTask_sync", "title": "cloudtasks CreateTask Sample", - "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n The maximum task size is 100KB.", + "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n\tThe maximum task size is 100KB.", "file": "Client/CreateTask/main.go", "language": "GO", "clientMethod": { @@ -196,7 +196,7 @@ { "regionTag": "cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync", "title": "cloudtasks GetIamPolicy Sample", - "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.getIamPolicy", + "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.getIamPolicy", "file": "Client/GetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -610,7 +610,7 @@ { "regionTag": "cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync", "title": "cloudtasks SetIamPolicy Sample", - "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.setIamPolicy", + "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.setIamPolicy", "file": "Client/SetIamPolicy/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json b/internal/generated/snippets/cloudtasks/apiv2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json index 98ec9725379a..4dc5f7df6ef8 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json @@ -151,7 +151,7 @@ { "regionTag": "cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync", "title": "cloudtasks CreateTask Sample", - "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is\n 100KB.\n\n For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.", + "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n\tFor [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is\n\t100KB.\n\n\tFor [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.", "file": "Client/CreateTask/main.go", "language": "GO", "clientMethod": { @@ -287,7 +287,7 @@ { "regionTag": "cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync", "title": "cloudtasks GetIamPolicy Sample", - "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.getIamPolicy", + "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.getIamPolicy", "file": "Client/GetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -793,7 +793,7 @@ { "regionTag": "cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync", "title": "cloudtasks SetIamPolicy Sample", - "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.setIamPolicy", + "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.setIamPolicy", "file": "Client/SetIamPolicy/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json b/internal/generated/snippets/cloudtasks/apiv2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json index 2f9f7099e07d..76b32d931d1a 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json @@ -60,7 +60,7 @@ { "regionTag": "cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync", "title": "cloudtasks CreateTask Sample", - "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n The maximum task size is 100KB.", + "description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n\tThe maximum task size is 100KB.", "file": "Client/CreateTask/main.go", "language": "GO", "clientMethod": { @@ -196,7 +196,7 @@ { "regionTag": "cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync", "title": "cloudtasks GetIamPolicy Sample", - "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.getIamPolicy", + "description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.getIamPolicy", "file": "Client/GetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -610,7 +610,7 @@ { "regionTag": "cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync", "title": "cloudtasks SetIamPolicy Sample", - "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n cloudtasks.queues.setIamPolicy", + "description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.setIamPolicy", "file": "Client/SetIamPolicy/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json b/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json index 04fb5b34f191..8cd1d2977cf1 100644 --- a/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json +++ b/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/compute/apiv1", - "version": "1.7.0", + "version": "1.8.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json b/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json index 2f5279b08a29..365adbd92126 100644 --- a/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json +++ b/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json @@ -60,7 +60,7 @@ { "regionTag": "datacatalog_v1_generated_DataCatalog_CreateEntryGroup_sync", "title": "datacatalog CreateEntryGroup Sample", - "description": "CreateEntryGroup creates an entry group.\n\nAn entry group contains logically related entries together with Cloud\nIdentity and Access Management (at /data-catalog/docs/concepts/iam) policies.\nThese policies specify users who can create, edit, and view entries\nwithin entry groups.\n\nData Catalog automatically creates entry groups with names that start with\nthe @ symbol for the following resources: \n\n BigQuery entries (@bigquery)\n\n Pub/Sub topics (@pubsub)\n\n Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})\n\nYou can create your own entry groups for Cloud Storage fileset entries\nand custom entries together with the corresponding IAM policies.\nUser-created entry groups can’t contain the @ symbol, it is reserved\nfor automatically created groups.\n\nEntry groups, like entries, can be searched.\n\nA maximum of 10,000 entry groups may be created per organization across all\nlocations.\n\nYou must enable the Data Catalog API in the project identified by\nthe parent parameter. For more information, see Data Catalog resource\nproject (at https: //cloud.google.com/data-catalog/docs/concepts/resource-project).", + "description": "CreateEntryGroup creates an entry group.\n\nAn entry group contains logically related entries together with Cloud\nIdentity and Access Management (at /data-catalog/docs/concepts/iam) policies.\nThese policies specify users who can create, edit, and view entries\nwithin entry groups.\n\nData Catalog automatically creates entry groups with names that start with\nthe @ symbol for the following resources: \n\n\tBigQuery entries (@bigquery)\n\n\tPub/Sub topics (@pubsub)\n\n\tDataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})\n\nYou can create your own entry groups for Cloud Storage fileset entries\nand custom entries together with the corresponding IAM policies.\nUser-created entry groups can’t contain the @ symbol, it is reserved\nfor automatically created groups.\n\nEntry groups, like entries, can be searched.\n\nA maximum of 10,000 entry groups may be created per organization across all\nlocations.\n\nYou must enable the Data Catalog API in the project identified by\nthe parent parameter. For more information, see Data Catalog resource\nproject (at https: //cloud.google.com/data-catalog/docs/concepts/resource-project).", "file": "Client/CreateEntryGroup/main.go", "language": "GO", "clientMethod": { @@ -106,7 +106,7 @@ { "regionTag": "datacatalog_v1_generated_DataCatalog_CreateTag_sync", "title": "datacatalog CreateTag Sample", - "description": "CreateTag creates a tag and assigns it to: \n\n An Entry if the method name is\n projects.locations.entryGroups.entries.tags.create.\n\n Or EntryGroupif the method\n name is projects.locations.entryGroups.tags.create.\n\nNote: The project identified by the parent parameter for the [tag]\n(https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters (at https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters))\nand the [tag template]\n(https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters (at https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters))\nused to create the tag must be in the same organization.", + "description": "CreateTag creates a tag and assigns it to: \n\n\tAn Entry if the method name is\n\tprojects.locations.entryGroups.entries.tags.create.\n\n\tOr EntryGroupif the method\n\tname is projects.locations.entryGroups.tags.create.\n\nNote: The project identified by the parent parameter for the [tag]\n(https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters (at https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters))\nand the [tag template]\n(https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters (at https: //cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters))\nused to create the tag must be in the same organization.", "file": "Client/CreateTag/main.go", "language": "GO", "clientMethod": { @@ -561,7 +561,7 @@ { "regionTag": "datacatalog_v1_generated_DataCatalog_GetIamPolicy_sync", "title": "datacatalog GetIamPolicy Sample", - "description": "GetIamPolicy gets the access control policy for a resource.\n\nMay return: \n\n ANOT_FOUND error if the resource doesn’t exist or you don’t have the\n permission to view it.\n\n An empty policy if the resource exists but doesn’t have a set policy.\n\nSupported resources are: \n\n Tag templates\n\n Entry groups\n\nNote: This method doesn’t get policies from Google Cloud Platform\nresources ingested into Data Catalog.\n\nTo call this method, you must have the following Google IAM permissions: \n\n datacatalog.tagTemplates.getIamPolicy to get policies on tag\n templates.\n\n datacatalog.entryGroups.getIamPolicy to get policies on entry groups.", + "description": "GetIamPolicy gets the access control policy for a resource.\n\nMay return: \n\n\tANOT_FOUND error if the resource doesn’t exist or you don’t have the\n\tpermission to view it.\n\n\tAn empty policy if the resource exists but doesn’t have a set policy.\n\nSupported resources are: \n\n\tTag templates\n\n\tEntry groups\n\nNote: This method doesn’t get policies from Google Cloud Platform\nresources ingested into Data Catalog.\n\nTo call this method, you must have the following Google IAM permissions: \n\n\tdatacatalog.tagTemplates.getIamPolicy to get policies on tag\n\ttemplates.\n\n\tdatacatalog.entryGroups.getIamPolicy to get policies on entry groups.", "file": "Client/GetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -1067,7 +1067,7 @@ { "regionTag": "datacatalog_v1_generated_DataCatalog_SetIamPolicy_sync", "title": "datacatalog SetIamPolicy Sample", - "description": "SetIamPolicy sets an access control policy for a resource. Replaces any existing\npolicy.\n\nSupported resources are: \n\n Tag templates\n\n Entry groups\n\nNote: This method sets policies only within Data Catalog and can’t be\nused to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any\nexternal Google Cloud Platform resources synced with the Data Catalog.\n\nTo call this method, you must have the following Google IAM permissions: \n\n datacatalog.tagTemplates.setIamPolicy to set policies on tag\n templates.\n\n datacatalog.entryGroups.setIamPolicy to set policies on entry groups.", + "description": "SetIamPolicy sets an access control policy for a resource. Replaces any existing\npolicy.\n\nSupported resources are: \n\n\tTag templates\n\n\tEntry groups\n\nNote: This method sets policies only within Data Catalog and can’t be\nused to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any\nexternal Google Cloud Platform resources synced with the Data Catalog.\n\nTo call this method, you must have the following Google IAM permissions: \n\n\tdatacatalog.tagTemplates.setIamPolicy to set policies on tag\n\ttemplates.\n\n\tdatacatalog.entryGroups.setIamPolicy to set policies on entry groups.", "file": "Client/SetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -1159,7 +1159,7 @@ { "regionTag": "datacatalog_v1_generated_DataCatalog_TestIamPermissions_sync", "title": "datacatalog TestIamPermissions Sample", - "description": "TestIamPermissions gets your permissions on a resource.\n\nReturns an empty set of permissions if the resource doesn’t exist.\n\nSupported resources are: \n\n Tag templates\n\n Entry groups\n\nNote: This method gets policies only within Data Catalog and can’t be\nused to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any\nexternal Google Cloud Platform resources ingested into Data Catalog.\n\nNo Google IAM permissions are required to call this method.", + "description": "TestIamPermissions gets your permissions on a resource.\n\nReturns an empty set of permissions if the resource doesn’t exist.\n\nSupported resources are: \n\n\tTag templates\n\n\tEntry groups\n\nNote: This method gets policies only within Data Catalog and can’t be\nused to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any\nexternal Google Cloud Platform resources ingested into Data Catalog.\n\nNo Google IAM permissions are required to call this method.", "file": "Client/TestIamPermissions/main.go", "language": "GO", "clientMethod": { @@ -1573,7 +1573,7 @@ { "regionTag": "datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_sync", "title": "datacatalog DeletePolicyTag Sample", - "description": "DeletePolicyTag deletes a policy tag together with the following: \n\n All of its descendant policy tags, if any\n\n Policies associated with the policy tag and its descendants\n\n References from BigQuery table schema of the policy tag and its\n descendants", + "description": "DeletePolicyTag deletes a policy tag together with the following: \n\n\tAll of its descendant policy tags, if any\n\n\tPolicies associated with the policy tag and its descendants\n\n\tReferences from BigQuery table schema of the policy tag and its\n\tdescendants", "file": "PolicyTagManagerClient/DeletePolicyTag/main.go", "language": "GO", "clientMethod": { @@ -2169,7 +2169,7 @@ { "regionTag": "datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_sync", "title": "datacatalog ReplaceTaxonomy Sample", - "description": "ReplaceTaxonomy replaces (updates) a taxonomy and all its policy tags.\n\nThe taxonomy and its entire hierarchy of policy tags must be\nrepresented literally by SerializedTaxonomy and the nested\nSerializedPolicyTag messages.\n\nThis operation automatically does the following: \n\n Deletes the existing policy tags that are missing from the\n SerializedPolicyTag.\n\n Creates policy tags that don’t have resource names. They are considered\n new.\n\n Updates policy tags with valid resources names accordingly.", + "description": "ReplaceTaxonomy replaces (updates) a taxonomy and all its policy tags.\n\nThe taxonomy and its entire hierarchy of policy tags must be\nrepresented literally by SerializedTaxonomy and the nested\nSerializedPolicyTag messages.\n\nThis operation automatically does the following: \n\n\tDeletes the existing policy tags that are missing from the\n\tSerializedPolicyTag.\n\n\tCreates policy tags that don’t have resource names. They are considered\n\tnew.\n\n\tUpdates policy tags with valid resources names accordingly.", "file": "PolicyTagManagerSerializationClient/ReplaceTaxonomy/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json b/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json index 3af0665d08bd..5bf935c9a4fa 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json +++ b/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json @@ -561,7 +561,7 @@ { "regionTag": "datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_sync", "title": "datacatalog GetIamPolicy Sample", - "description": "GetIamPolicy gets the access control policy for a resource. A NOT_FOUND error\nis returned if the resource does not exist. An empty policy is returned\nif the resource exists but does not have a policy set on it.\n\nSupported resources are: \n\n Tag templates.\n\n Entries.\n\n Entry groups.\n Note, this method cannot be used to manage policies for BigQuery, Pub/Sub\n and any external Google Cloud Platform resources synced to Data Catalog.\n\nCallers must have following Google IAM permission\n\n datacatalog.tagTemplates.getIamPolicy to get policies on tag\n templates.\n\n datacatalog.entries.getIamPolicy to get policies on entries.\n\n datacatalog.entryGroups.getIamPolicy to get policies on entry groups.", + "description": "GetIamPolicy gets the access control policy for a resource. A NOT_FOUND error\nis returned if the resource does not exist. An empty policy is returned\nif the resource exists but does not have a policy set on it.\n\nSupported resources are: \n\n\tTag templates.\n\n\tEntries.\n\n\tEntry groups.\n\tNote, this method cannot be used to manage policies for BigQuery, Pub/Sub\n\tand any external Google Cloud Platform resources synced to Data Catalog.\n\nCallers must have following Google IAM permission\n\n\tdatacatalog.tagTemplates.getIamPolicy to get policies on tag\n\ttemplates.\n\n\tdatacatalog.entries.getIamPolicy to get policies on entries.\n\n\tdatacatalog.entryGroups.getIamPolicy to get policies on entry groups.", "file": "Client/GetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -929,7 +929,7 @@ { "regionTag": "datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_sync", "title": "datacatalog SetIamPolicy Sample", - "description": "SetIamPolicy sets the access control policy for a resource. Replaces any existing\npolicy.\nSupported resources are: \n\n Tag templates.\n\n Entries.\n\n Entry groups.\n Note, this method cannot be used to manage policies for BigQuery, Pub/Sub\n and any external Google Cloud Platform resources synced to Data Catalog.\n\nCallers must have following Google IAM permission\n\n datacatalog.tagTemplates.setIamPolicy to set policies on tag\n templates.\n\n datacatalog.entries.setIamPolicy to set policies on entries.\n\n datacatalog.entryGroups.setIamPolicy to set policies on entry groups.", + "description": "SetIamPolicy sets the access control policy for a resource. Replaces any existing\npolicy.\nSupported resources are: \n\n\tTag templates.\n\n\tEntries.\n\n\tEntry groups.\n\tNote, this method cannot be used to manage policies for BigQuery, Pub/Sub\n\tand any external Google Cloud Platform resources synced to Data Catalog.\n\nCallers must have following Google IAM permission\n\n\tdatacatalog.tagTemplates.setIamPolicy to set policies on tag\n\ttemplates.\n\n\tdatacatalog.entries.setIamPolicy to set policies on entries.\n\n\tdatacatalog.entryGroups.setIamPolicy to set policies on entry groups.", "file": "Client/SetIamPolicy/main.go", "language": "GO", "clientMethod": { @@ -975,7 +975,7 @@ { "regionTag": "datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_sync", "title": "datacatalog TestIamPermissions Sample", - "description": "TestIamPermissions returns the caller’s permissions on a resource.\nIf the resource does not exist, an empty set of permissions is returned\n(We don’t return a NOT_FOUND error).\n\nSupported resources are: \n\n Tag templates.\n\n Entries.\n\n Entry groups.\n Note, this method cannot be used to manage policies for BigQuery, Pub/Sub\n and any external Google Cloud Platform resources synced to Data Catalog.\n\nA caller is not required to have Google IAM permission to make this\nrequest.", + "description": "TestIamPermissions returns the caller’s permissions on a resource.\nIf the resource does not exist, an empty set of permissions is returned\n(We don’t return a NOT_FOUND error).\n\nSupported resources are: \n\n\tTag templates.\n\n\tEntries.\n\n\tEntry groups.\n\tNote, this method cannot be used to manage policies for BigQuery, Pub/Sub\n\tand any external Google Cloud Platform resources synced to Data Catalog.\n\nA caller is not required to have Google IAM permission to make this\nrequest.", "file": "Client/TestIamPermissions/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json index 96786a5f4c43..ba2eaf2a1e8e 100644 --- a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -104,7 +104,7 @@ { "regionTag": "dialogflow_v2_generated_Agents_ExportAgent_sync", "title": "dialogflow ExportAgent Sample", - "description": "ExportAgent exports the specified agent to a ZIP file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ExportAgentResponse", + "description": "ExportAgent exports the specified agent to a ZIP file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ExportAgentResponse", "file": "AgentsClient/ExportAgent/main.go", "language": "GO", "clientMethod": { @@ -334,7 +334,7 @@ { "regionTag": "dialogflow_v2_generated_Agents_ImportAgent_sync", "title": "dialogflow ImportAgent Sample", - "description": "ImportAgent imports the specified agent from a ZIP file.\n\nUploads new intents and entity types without deleting the existing ones.\nIntents and entity types with the same name are replaced with the new\nversions from ImportAgentRequest. After the import, the imported draft\nagent will be trained automatically (unless disabled in agent settings).\nHowever, once the import is done, training may not be completed yet. Please\ncall TrainAgent and wait for the operation it returns in order to train\nexplicitly.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nThe operation only tracks when importing is complete, not when it is done\ntraining.\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "ImportAgent imports the specified agent from a ZIP file.\n\nUploads new intents and entity types without deleting the existing ones.\nIntents and entity types with the same name are replaced with the new\nversions from ImportAgentRequest. After the import, the imported draft\nagent will be trained automatically (unless disabled in agent settings).\nHowever, once the import is done, training may not be completed yet. Please\ncall TrainAgent and wait for the operation it returns in order to train\nexplicitly.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nThe operation only tracks when importing is complete, not when it is done\ntraining.\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "AgentsClient/ImportAgent/main.go", "language": "GO", "clientMethod": { @@ -472,7 +472,7 @@ { "regionTag": "dialogflow_v2_generated_Agents_RestoreAgent_sync", "title": "dialogflow RestoreAgent Sample", - "description": "RestoreAgent restores the specified agent from a ZIP file.\n\nReplaces the current agent version with a new one. All the intents and\nentity types in the older version are deleted. After the restore, the\nrestored draft agent will be trained automatically (unless disabled in\nagent settings). However, once the restore is done, training may not be\ncompleted yet. Please call TrainAgent and wait for the operation it\nreturns in order to train explicitly.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nThe operation only tracks when restoring is complete, not when it is done\ntraining.\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "RestoreAgent restores the specified agent from a ZIP file.\n\nReplaces the current agent version with a new one. All the intents and\nentity types in the older version are deleted. After the restore, the\nrestored draft agent will be trained automatically (unless disabled in\nagent settings). However, once the restore is done, training may not be\ncompleted yet. Please call TrainAgent and wait for the operation it\nreturns in order to train explicitly.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nThe operation only tracks when restoring is complete, not when it is done\ntraining.\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "AgentsClient/RestoreAgent/main.go", "language": "GO", "clientMethod": { @@ -610,7 +610,7 @@ { "regionTag": "dialogflow_v2_generated_Agents_TrainAgent_sync", "title": "dialogflow TrainAgent Sample", - "description": "TrainAgent trains the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "TrainAgent trains the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "AgentsClient/TrainAgent/main.go", "language": "GO", "clientMethod": { @@ -1525,7 +1525,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationDatasets_CreateConversationDataset_sync", "title": "dialogflow CreateConversationDataset Sample", - "description": "CreateConversationDataset creates a new conversation dataset.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: CreateConversationDatasetOperationMetadata\n\n response: ConversationDataset", + "description": "CreateConversationDataset creates a new conversation dataset.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: CreateConversationDatasetOperationMetadata\n\n\tresponse: ConversationDataset", "file": "ConversationDatasetsClient/CreateConversationDataset/main.go", "language": "GO", "clientMethod": { @@ -1571,7 +1571,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationDatasets_DeleteConversationDataset_sync", "title": "dialogflow DeleteConversationDataset Sample", - "description": "DeleteConversationDataset deletes the specified conversation dataset.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: DeleteConversationDatasetOperationMetadata\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "DeleteConversationDataset deletes the specified conversation dataset.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: DeleteConversationDatasetOperationMetadata\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "ConversationDatasetsClient/DeleteConversationDataset/main.go", "language": "GO", "clientMethod": { @@ -1755,7 +1755,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationDatasets_ImportConversationData_sync", "title": "dialogflow ImportConversationData Sample", - "description": "ImportConversationData import data into the specified conversation dataset. Note that it\nis not allowed to import data to a conversation dataset that\nalready has data in it.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ImportConversationDataOperationMetadata\n\n response: ImportConversationDataOperationResponse", + "description": "ImportConversationData import data into the specified conversation dataset. Note that it\nis not allowed to import data to a conversation dataset that\nalready has data in it.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ImportConversationDataOperationMetadata\n\n\tresponse: ImportConversationDataOperationResponse", "file": "ConversationDatasetsClient/ImportConversationData/main.go", "language": "GO", "clientMethod": { @@ -1984,7 +1984,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationModels_CreateConversationModel_sync", "title": "dialogflow CreateConversationModel Sample", - "description": "CreateConversationModel creates a model.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: CreateConversationModelOperationMetadata\n\n response: ConversationModel", + "description": "CreateConversationModel creates a model.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: CreateConversationModelOperationMetadata\n\n\tresponse: ConversationModel", "file": "ConversationModelsClient/CreateConversationModel/main.go", "language": "GO", "clientMethod": { @@ -2076,7 +2076,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationModels_DeleteConversationModel_sync", "title": "dialogflow DeleteConversationModel Sample", - "description": "DeleteConversationModel deletes a model.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: DeleteConversationModelOperationMetadata\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "DeleteConversationModel deletes a model.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: DeleteConversationModelOperationMetadata\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "ConversationModelsClient/DeleteConversationModel/main.go", "language": "GO", "clientMethod": { @@ -2122,7 +2122,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationModels_DeployConversationModel_sync", "title": "dialogflow DeployConversationModel Sample", - "description": "DeployConversationModel deploys a model. If a model is already deployed, deploying it\nhas no effect. A model can only serve prediction requests after it gets\ndeployed. For article suggestion, custom model will not be used unless\nit is deployed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: DeployConversationModelOperationMetadata\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "DeployConversationModel deploys a model. If a model is already deployed, deploying it\nhas no effect. A model can only serve prediction requests after it gets\ndeployed. For article suggestion, custom model will not be used unless\nit is deployed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: DeployConversationModelOperationMetadata\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "ConversationModelsClient/DeployConversationModel/main.go", "language": "GO", "clientMethod": { @@ -2536,7 +2536,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationModels_UndeployConversationModel_sync", "title": "dialogflow UndeployConversationModel Sample", - "description": "UndeployConversationModel undeploys a model. If the model is not deployed this method has no effect.\nIf the model is currently being used: \n\n For article suggestion, article suggestion will fallback to the default\n model if model is undeployed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: UndeployConversationModelOperationMetadata\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "UndeployConversationModel undeploys a model. If the model is not deployed this method has no effect.\nIf the model is currently being used: \n\n\tFor article suggestion, article suggestion will fallback to the default\n\tmodel if model is undeployed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: UndeployConversationModelOperationMetadata\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "ConversationModelsClient/UndeployConversationModel/main.go", "language": "GO", "clientMethod": { @@ -2627,7 +2627,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync", "title": "dialogflow ClearSuggestionFeatureConfig Sample", - "description": "ClearSuggestionFeatureConfig clears a suggestion feature from a conversation profile for the given\nparticipant role.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ClearSuggestionFeatureConfigOperationMetadata\n\n response: ConversationProfile", + "description": "ClearSuggestionFeatureConfig clears a suggestion feature from a conversation profile for the given\nparticipant role.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ClearSuggestionFeatureConfigOperationMetadata\n\n\tresponse: ConversationProfile", "file": "ConversationProfilesClient/ClearSuggestionFeatureConfig/main.go", "language": "GO", "clientMethod": { @@ -3040,7 +3040,7 @@ { "regionTag": "dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync", "title": "dialogflow SetSuggestionFeatureConfig Sample", - "description": "SetSuggestionFeatureConfig adds or updates a suggestion feature in a conversation profile.\nIf the conversation profile contains the type of suggestion feature for\nthe participant role, it will update it. Otherwise it will insert the\nsuggestion feature.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: SetSuggestionFeatureConfigOperationMetadata\n\n response: ConversationProfile\n\nIf a long running operation to add or update suggestion feature\nconfig for the same conversation profile, participant role and suggestion\nfeature type exists, please cancel the existing long running operation\nbefore sending such request, otherwise the request will be rejected.", + "description": "SetSuggestionFeatureConfig adds or updates a suggestion feature in a conversation profile.\nIf the conversation profile contains the type of suggestion feature for\nthe participant role, it will update it. Otherwise it will insert the\nsuggestion feature.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: SetSuggestionFeatureConfigOperationMetadata\n\n\tresponse: ConversationProfile\n\nIf a long running operation to add or update suggestion feature\nconfig for the same conversation profile, participant role and suggestion\nfeature type exists, please cancel the existing long running operation\nbefore sending such request, otherwise the request will be rejected.", "file": "ConversationProfilesClient/SetSuggestionFeatureConfig/main.go", "language": "GO", "clientMethod": { @@ -3636,7 +3636,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_CreateDocument_sync", "title": "dialogflow CreateDocument Sample", - "description": "CreateDocument creates a new document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: Document", + "description": "CreateDocument creates a new document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: Document", "file": "DocumentsClient/CreateDocument/main.go", "language": "GO", "clientMethod": { @@ -3682,7 +3682,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_DeleteDocument_sync", "title": "dialogflow DeleteDocument Sample", - "description": "DeleteDocument deletes the specified document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "DeleteDocument deletes the specified document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "DocumentsClient/DeleteDocument/main.go", "language": "GO", "clientMethod": { @@ -3728,7 +3728,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_ExportDocument_sync", "title": "dialogflow ExportDocument Sample", - "description": "ExportDocument exports a smart messaging candidate document into the specified\ndestination.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: Document", + "description": "ExportDocument exports a smart messaging candidate document into the specified\ndestination.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: Document", "file": "DocumentsClient/ExportDocument/main.go", "language": "GO", "clientMethod": { @@ -3912,7 +3912,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_ImportDocuments_sync", "title": "dialogflow ImportDocuments Sample", - "description": "ImportDocuments creates documents by importing data from external sources.\nDialogflow supports up to 350 documents in each request. If you try to\nimport more, Dialogflow will return an error.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: ImportDocumentsResponse", + "description": "ImportDocuments creates documents by importing data from external sources.\nDialogflow supports up to 350 documents in each request. If you try to\nimport more, Dialogflow will return an error.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: ImportDocumentsResponse", "file": "DocumentsClient/ImportDocuments/main.go", "language": "GO", "clientMethod": { @@ -4096,7 +4096,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_ReloadDocument_sync", "title": "dialogflow ReloadDocument Sample", - "description": "ReloadDocument reloads the specified document from its specified source, content_uri or\ncontent. The previously loaded content of the document will be deleted.\nNote: Even when the content of the document has not changed, there still\nmay be side effects because of internal implementation changes.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: Document\n\nNote: The projects.agent.knowledgeBases.documents resource is deprecated;\nonly use projects.knowledgeBases.documents.", + "description": "ReloadDocument reloads the specified document from its specified source, content_uri or\ncontent. The previously loaded content of the document will be deleted.\nNote: Even when the content of the document has not changed, there still\nmay be side effects because of internal implementation changes.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: Document\n\nNote: The projects.agent.knowledgeBases.documents resource is deprecated;\nonly use projects.knowledgeBases.documents.", "file": "DocumentsClient/ReloadDocument/main.go", "language": "GO", "clientMethod": { @@ -4142,7 +4142,7 @@ { "regionTag": "dialogflow_v2_generated_Documents_UpdateDocument_sync", "title": "dialogflow UpdateDocument Sample", - "description": "UpdateDocument updates the specified document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: KnowledgeOperationMetadata\n\n response: Document", + "description": "UpdateDocument updates the specified document.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: KnowledgeOperationMetadata\n\n\tresponse: Document", "file": "DocumentsClient/UpdateDocument/main.go", "language": "GO", "clientMethod": { @@ -4188,7 +4188,7 @@ { "regionTag": "dialogflow_v2_generated_EntityTypes_BatchCreateEntities_sync", "title": "dialogflow BatchCreateEntities Sample", - "description": "BatchCreateEntities creates multiple new entities in the specified entity type.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchCreateEntities creates multiple new entities in the specified entity type.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "EntityTypesClient/BatchCreateEntities/main.go", "language": "GO", "clientMethod": { @@ -4234,7 +4234,7 @@ { "regionTag": "dialogflow_v2_generated_EntityTypes_BatchDeleteEntities_sync", "title": "dialogflow BatchDeleteEntities Sample", - "description": "BatchDeleteEntities deletes entities in the specified entity type.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchDeleteEntities deletes entities in the specified entity type.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "EntityTypesClient/BatchDeleteEntities/main.go", "language": "GO", "clientMethod": { @@ -4280,7 +4280,7 @@ { "regionTag": "dialogflow_v2_generated_EntityTypes_BatchDeleteEntityTypes_sync", "title": "dialogflow BatchDeleteEntityTypes Sample", - "description": "BatchDeleteEntityTypes deletes entity types in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchDeleteEntityTypes deletes entity types in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "EntityTypesClient/BatchDeleteEntityTypes/main.go", "language": "GO", "clientMethod": { @@ -4326,7 +4326,7 @@ { "regionTag": "dialogflow_v2_generated_EntityTypes_BatchUpdateEntities_sync", "title": "dialogflow BatchUpdateEntities Sample", - "description": "BatchUpdateEntities updates or creates multiple entities in the specified entity type. This\nmethod does not affect entities in the entity type that aren’t explicitly\nspecified in the request.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchUpdateEntities updates or creates multiple entities in the specified entity type. This\nmethod does not affect entities in the entity type that aren’t explicitly\nspecified in the request.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "EntityTypesClient/BatchUpdateEntities/main.go", "language": "GO", "clientMethod": { @@ -4372,7 +4372,7 @@ { "regionTag": "dialogflow_v2_generated_EntityTypes_BatchUpdateEntityTypes_sync", "title": "dialogflow BatchUpdateEntityTypes Sample", - "description": "BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: BatchUpdateEntityTypesResponse\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: BatchUpdateEntityTypesResponse\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "EntityTypesClient/BatchUpdateEntityTypes/main.go", "language": "GO", "clientMethod": { @@ -5701,7 +5701,7 @@ { "regionTag": "dialogflow_v2_generated_Intents_BatchDeleteIntents_sync", "title": "dialogflow BatchDeleteIntents Sample", - "description": "BatchDeleteIntents deletes intents in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchDeleteIntents deletes intents in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "IntentsClient/BatchDeleteIntents/main.go", "language": "GO", "clientMethod": { @@ -5747,7 +5747,7 @@ { "regionTag": "dialogflow_v2_generated_Intents_BatchUpdateIntents_sync", "title": "dialogflow BatchUpdateIntents Sample", - "description": "BatchUpdateIntents updates/Creates multiple intents in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: BatchUpdateIntentsResponse\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", + "description": "BatchUpdateIntents updates/Creates multiple intents in the specified agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/es/docs/how/long-running-operations).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: BatchUpdateIntentsResponse\n\nNote: You should always train an agent prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/es/docs/training).", "file": "IntentsClient/BatchUpdateIntents/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 96abc8ee6aad..7e84ccaabdcb 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -150,7 +150,7 @@ { "regionTag": "dialogflow_v3_generated_Agents_ExportAgent_sync", "title": "dialogflow ExportAgent Sample", - "description": "ExportAgent exports the specified agent to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ExportAgentResponse", + "description": "ExportAgent exports the specified agent to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ExportAgentResponse", "file": "AgentsClient/ExportAgent/main.go", "language": "GO", "clientMethod": { @@ -518,7 +518,7 @@ { "regionTag": "dialogflow_v3_generated_Agents_RestoreAgent_sync", "title": "dialogflow RestoreAgent Sample", - "description": "RestoreAgent restores the specified agent from a binary file.\n\nReplaces the current agent with a new one. Note that all existing resources\nin agent (e.g. intents, entity types, flows) will be removed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train flows prior to sending them queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "RestoreAgent restores the specified agent from a binary file.\n\nReplaces the current agent with a new one. Note that all existing resources\nin agent (e.g. intents, entity types, flows) will be removed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train flows prior to sending them queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "AgentsClient/RestoreAgent/main.go", "language": "GO", "clientMethod": { @@ -1801,7 +1801,7 @@ { "regionTag": "dialogflow_v3_generated_Environments_CreateEnvironment_sync", "title": "dialogflow CreateEnvironment Sample", - "description": "CreateEnvironment creates an Environment in the specified Agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: Environment", + "description": "CreateEnvironment creates an Environment in the specified Agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: Environment", "file": "EnvironmentsClient/CreateEnvironment/main.go", "language": "GO", "clientMethod": { @@ -1892,7 +1892,7 @@ { "regionTag": "dialogflow_v3_generated_Environments_DeployFlow_sync", "title": "dialogflow DeployFlow Sample", - "description": "DeployFlow deploys a flow to the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: DeployFlowMetadata\n\n response: DeployFlowResponse", + "description": "DeployFlow deploys a flow to the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: DeployFlowMetadata\n\n\tresponse: DeployFlowResponse", "file": "EnvironmentsClient/DeployFlow/main.go", "language": "GO", "clientMethod": { @@ -2306,7 +2306,7 @@ { "regionTag": "dialogflow_v3_generated_Environments_RunContinuousTest_sync", "title": "dialogflow RunContinuousTest Sample", - "description": "RunContinuousTest kicks off a continuous test under the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: RunContinuousTestMetadata\n\n response: RunContinuousTestResponse", + "description": "RunContinuousTest kicks off a continuous test under the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: RunContinuousTestMetadata\n\n\tresponse: RunContinuousTestResponse", "file": "EnvironmentsClient/RunContinuousTest/main.go", "language": "GO", "clientMethod": { @@ -2352,7 +2352,7 @@ { "regionTag": "dialogflow_v3_generated_Environments_UpdateEnvironment_sync", "title": "dialogflow UpdateEnvironment Sample", - "description": "UpdateEnvironment updates the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: Environment", + "description": "UpdateEnvironment updates the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: Environment", "file": "EnvironmentsClient/UpdateEnvironment/main.go", "language": "GO", "clientMethod": { @@ -3084,7 +3084,7 @@ { "regionTag": "dialogflow_v3_generated_Flows_ExportFlow_sync", "title": "dialogflow ExportFlow Sample", - "description": "ExportFlow exports the specified flow to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ExportFlowResponse\n\nNote that resources (e.g. intents, entities, webhooks) that the flow\nreferences will also be exported.", + "description": "ExportFlow exports the specified flow to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ExportFlowResponse\n\nNote that resources (e.g. intents, entities, webhooks) that the flow\nreferences will also be exported.", "file": "FlowsClient/ExportFlow/main.go", "language": "GO", "clientMethod": { @@ -3314,7 +3314,7 @@ { "regionTag": "dialogflow_v3_generated_Flows_ImportFlow_sync", "title": "dialogflow ImportFlow Sample", - "description": "ImportFlow imports the specified flow to the specified agent from a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ImportFlowResponse\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "ImportFlow imports the specified flow to the specified agent from a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ImportFlowResponse\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "FlowsClient/ImportFlow/main.go", "language": "GO", "clientMethod": { @@ -3498,7 +3498,7 @@ { "regionTag": "dialogflow_v3_generated_Flows_TrainFlow_sync", "title": "dialogflow TrainFlow Sample", - "description": "TrainFlow trains the specified flow. Note that only the flow in ‘draft’ environment\nis trained.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "TrainFlow trains the specified flow. Note that only the flow in ‘draft’ environment\nis trained.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "FlowsClient/TrainFlow/main.go", "language": "GO", "clientMethod": { @@ -5921,7 +5921,7 @@ { "regionTag": "dialogflow_v3_generated_TestCases_BatchRunTestCases_sync", "title": "dialogflow BatchRunTestCases Sample", - "description": "BatchRunTestCases kicks off a batch run of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: BatchRunTestCasesMetadata\n\n response: BatchRunTestCasesResponse", + "description": "BatchRunTestCases kicks off a batch run of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: BatchRunTestCasesMetadata\n\n\tresponse: BatchRunTestCasesResponse", "file": "TestCasesClient/BatchRunTestCases/main.go", "language": "GO", "clientMethod": { @@ -6104,7 +6104,7 @@ { "regionTag": "dialogflow_v3_generated_TestCases_ExportTestCases_sync", "title": "dialogflow ExportTestCases Sample", - "description": "ExportTestCases exports the test cases under the agent to a Cloud Storage bucket or a local\nfile. Filter can be applied to export a subset of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ExportTestCasesMetadata\n\n response: ExportTestCasesResponse", + "description": "ExportTestCases exports the test cases under the agent to a Cloud Storage bucket or a local\nfile. Filter can be applied to export a subset of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ExportTestCasesMetadata\n\n\tresponse: ExportTestCasesResponse", "file": "TestCasesClient/ExportTestCases/main.go", "language": "GO", "clientMethod": { @@ -6334,7 +6334,7 @@ { "regionTag": "dialogflow_v3_generated_TestCases_ImportTestCases_sync", "title": "dialogflow ImportTestCases Sample", - "description": "ImportTestCases imports the test cases from a Cloud Storage bucket or a local file. It\nalways creates new test cases and won’t overwrite any existing ones. The\nprovided ID in the imported test case is neglected.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ImportTestCasesMetadata\n\n response: ImportTestCasesResponse", + "description": "ImportTestCases imports the test cases from a Cloud Storage bucket or a local file. It\nalways creates new test cases and won’t overwrite any existing ones. The\nprovided ID in the imported test case is neglected.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ImportTestCasesMetadata\n\n\tresponse: ImportTestCasesResponse", "file": "TestCasesClient/ImportTestCases/main.go", "language": "GO", "clientMethod": { @@ -6564,7 +6564,7 @@ { "regionTag": "dialogflow_v3_generated_TestCases_RunTestCase_sync", "title": "dialogflow RunTestCase Sample", - "description": "RunTestCase kicks off a test case run.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: RunTestCaseMetadata\n\n response: RunTestCaseResponse", + "description": "RunTestCase kicks off a test case run.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: RunTestCaseMetadata\n\n\tresponse: RunTestCaseResponse", "file": "TestCasesClient/RunTestCase/main.go", "language": "GO", "clientMethod": { @@ -7205,7 +7205,7 @@ { "regionTag": "dialogflow_v3_generated_Versions_CreateVersion_sync", "title": "dialogflow CreateVersion Sample", - "description": "CreateVersion creates a Version in the specified Flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: CreateVersionOperationMetadata\n\n response: Version", + "description": "CreateVersion creates a Version in the specified Flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: CreateVersionOperationMetadata\n\n\tresponse: Version", "file": "VersionsClient/CreateVersion/main.go", "language": "GO", "clientMethod": { @@ -7572,7 +7572,7 @@ { "regionTag": "dialogflow_v3_generated_Versions_LoadVersion_sync", "title": "dialogflow LoadVersion Sample", - "description": "LoadVersion loads resources in the specified version to the draft flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "LoadVersion loads resources in the specified version to the draft flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "VersionsClient/LoadVersion/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 2a8b373ad237..7060eb5ee889 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -150,7 +150,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Agents_ExportAgent_sync", "title": "dialogflow ExportAgent Sample", - "description": "ExportAgent exports the specified agent to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ExportAgentResponse", + "description": "ExportAgent exports the specified agent to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ExportAgentResponse", "file": "AgentsClient/ExportAgent/main.go", "language": "GO", "clientMethod": { @@ -518,7 +518,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Agents_RestoreAgent_sync", "title": "dialogflow RestoreAgent Sample", - "description": "RestoreAgent restores the specified agent from a binary file.\n\nReplaces the current agent with a new one. Note that all existing resources\nin agent (e.g. intents, entity types, flows) will be removed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "RestoreAgent restores the specified agent from a binary file.\n\nReplaces the current agent with a new one. Note that all existing resources\nin agent (e.g. intents, entity types, flows) will be removed.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "AgentsClient/RestoreAgent/main.go", "language": "GO", "clientMethod": { @@ -1801,7 +1801,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Environments_CreateEnvironment_sync", "title": "dialogflow CreateEnvironment Sample", - "description": "CreateEnvironment creates an Environment in the specified Agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: Environment", + "description": "CreateEnvironment creates an Environment in the specified Agent.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: Environment", "file": "EnvironmentsClient/CreateEnvironment/main.go", "language": "GO", "clientMethod": { @@ -1892,7 +1892,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Environments_DeployFlow_sync", "title": "dialogflow DeployFlow Sample", - "description": "DeployFlow deploys a flow to the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: DeployFlowMetadata\n\n response: DeployFlowResponse", + "description": "DeployFlow deploys a flow to the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: DeployFlowMetadata\n\n\tresponse: DeployFlowResponse", "file": "EnvironmentsClient/DeployFlow/main.go", "language": "GO", "clientMethod": { @@ -2306,7 +2306,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Environments_RunContinuousTest_sync", "title": "dialogflow RunContinuousTest Sample", - "description": "RunContinuousTest kicks off a continuous test under the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: RunContinuousTestMetadata\n\n response: RunContinuousTestResponse", + "description": "RunContinuousTest kicks off a continuous test under the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: RunContinuousTestMetadata\n\n\tresponse: RunContinuousTestResponse", "file": "EnvironmentsClient/RunContinuousTest/main.go", "language": "GO", "clientMethod": { @@ -2352,7 +2352,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Environments_UpdateEnvironment_sync", "title": "dialogflow UpdateEnvironment Sample", - "description": "UpdateEnvironment updates the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: Environment", + "description": "UpdateEnvironment updates the specified Environment.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: Environment", "file": "EnvironmentsClient/UpdateEnvironment/main.go", "language": "GO", "clientMethod": { @@ -3084,7 +3084,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Flows_ExportFlow_sync", "title": "dialogflow ExportFlow Sample", - "description": "ExportFlow exports the specified flow to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ExportFlowResponse\n\nNote that resources (e.g. intents, entities, webhooks) that the flow\nreferences will also be exported.", + "description": "ExportFlow exports the specified flow to a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ExportFlowResponse\n\nNote that resources (e.g. intents, entities, webhooks) that the flow\nreferences will also be exported.", "file": "FlowsClient/ExportFlow/main.go", "language": "GO", "clientMethod": { @@ -3314,7 +3314,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Flows_ImportFlow_sync", "title": "dialogflow ImportFlow Sample", - "description": "ImportFlow imports the specified flow to the specified agent from a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: ImportFlowResponse\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "ImportFlow imports the specified flow to the specified agent from a binary file.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: ImportFlowResponse\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "FlowsClient/ImportFlow/main.go", "language": "GO", "clientMethod": { @@ -3498,7 +3498,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Flows_TrainFlow_sync", "title": "dialogflow TrainFlow Sample", - "description": "TrainFlow trains the specified flow. Note that only the flow in ‘draft’ environment\nis trained.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", + "description": "TrainFlow trains the specified flow. Note that only the flow in ‘draft’ environment\nis trained.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)\n\nNote: You should always train a flow prior to sending it queries. See the\ntraining\ndocumentation (at https: //cloud.google.com/dialogflow/cx/docs/concept/training).", "file": "FlowsClient/TrainFlow/main.go", "language": "GO", "clientMethod": { @@ -5921,7 +5921,7 @@ { "regionTag": "dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_sync", "title": "dialogflow BatchRunTestCases Sample", - "description": "BatchRunTestCases kicks off a batch run of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: BatchRunTestCasesMetadata\n\n response: BatchRunTestCasesResponse", + "description": "BatchRunTestCases kicks off a batch run of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: BatchRunTestCasesMetadata\n\n\tresponse: BatchRunTestCasesResponse", "file": "TestCasesClient/BatchRunTestCases/main.go", "language": "GO", "clientMethod": { @@ -6104,7 +6104,7 @@ { "regionTag": "dialogflow_v3beta1_generated_TestCases_ExportTestCases_sync", "title": "dialogflow ExportTestCases Sample", - "description": "ExportTestCases exports the test cases under the agent to a Cloud Storage bucket or a local\nfile. Filter can be applied to export a subset of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ExportTestCasesMetadata\n\n response: ExportTestCasesResponse", + "description": "ExportTestCases exports the test cases under the agent to a Cloud Storage bucket or a local\nfile. Filter can be applied to export a subset of test cases.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ExportTestCasesMetadata\n\n\tresponse: ExportTestCasesResponse", "file": "TestCasesClient/ExportTestCases/main.go", "language": "GO", "clientMethod": { @@ -6334,7 +6334,7 @@ { "regionTag": "dialogflow_v3beta1_generated_TestCases_ImportTestCases_sync", "title": "dialogflow ImportTestCases Sample", - "description": "ImportTestCases imports the test cases from a Cloud Storage bucket or a local file. It\nalways creates new test cases and won’t overwrite any existing ones. The\nprovided ID in the imported test case is neglected.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: ImportTestCasesMetadata\n\n response: ImportTestCasesResponse", + "description": "ImportTestCases imports the test cases from a Cloud Storage bucket or a local file. It\nalways creates new test cases and won’t overwrite any existing ones. The\nprovided ID in the imported test case is neglected.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: ImportTestCasesMetadata\n\n\tresponse: ImportTestCasesResponse", "file": "TestCasesClient/ImportTestCases/main.go", "language": "GO", "clientMethod": { @@ -6564,7 +6564,7 @@ { "regionTag": "dialogflow_v3beta1_generated_TestCases_RunTestCase_sync", "title": "dialogflow RunTestCase Sample", - "description": "RunTestCase kicks off a test case run.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: RunTestCaseMetadata\n\n response: RunTestCaseResponse", + "description": "RunTestCase kicks off a test case run.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: RunTestCaseMetadata\n\n\tresponse: RunTestCaseResponse", "file": "TestCasesClient/RunTestCase/main.go", "language": "GO", "clientMethod": { @@ -7205,7 +7205,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Versions_CreateVersion_sync", "title": "dialogflow CreateVersion Sample", - "description": "CreateVersion creates a Version in the specified Flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: CreateVersionOperationMetadata\n\n response: Version", + "description": "CreateVersion creates a Version in the specified Flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: CreateVersionOperationMetadata\n\n\tresponse: Version", "file": "VersionsClient/CreateVersion/main.go", "language": "GO", "clientMethod": { @@ -7572,7 +7572,7 @@ { "regionTag": "dialogflow_v3beta1_generated_Versions_LoadVersion_sync", "title": "dialogflow LoadVersion Sample", - "description": "LoadVersion loads resources in the specified version to the draft flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n metadata: An empty Struct\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n response: An Empty\n message (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", + "description": "LoadVersion loads resources in the specified version to the draft flow.\n\nThis method is a long-running\noperation (at https: //cloud.google.com/dialogflow/cx/docs/how/long-running-operation).\nThe returned Operation type has the following method-specific fields: \n\n\tmetadata: An empty Struct\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n\n\tresponse: An Empty\n\tmessage (at https: //developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)", "file": "VersionsClient/LoadVersion/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/CancelOperation/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/CancelOperation/main.go new file mode 100644 index 000000000000..a63eb92cf9b4 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/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 documentai_v1_generated_DocumentProcessorService_CancelOperation_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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 documentai_v1_generated_DocumentProcessorService_CancelOperation_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/CreateProcessor/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/CreateProcessor/main.go new file mode 100644 index 000000000000..94f5cb2c4793 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/CreateProcessor/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 documentai_v1_generated_DocumentProcessorService_CreateProcessor_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.CreateProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#CreateProcessorRequest. + } + resp, err := c.CreateProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_CreateProcessor_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessor/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessor/main.go new file mode 100644 index 000000000000..c92d4f767c72 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessor/main.go @@ -0,0 +1,51 @@ +// 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 documentai_v1_generated_DocumentProcessorService_DeleteProcessor_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeleteProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeleteProcessorRequest. + } + op, err := c.DeleteProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessor_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessorVersion/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessorVersion/main.go new file mode 100644 index 000000000000..8ff3a6876a1b --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeleteProcessorVersion/main.go @@ -0,0 +1,51 @@ +// 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 documentai_v1_generated_DocumentProcessorService_DeleteProcessorVersion_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeleteProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeleteProcessorVersionRequest. + } + op, err := c.DeleteProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessorVersion_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeployProcessorVersion/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeployProcessorVersion/main.go new file mode 100644 index 000000000000..f652d509eee6 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DeployProcessorVersion/main.go @@ -0,0 +1,53 @@ +// 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 documentai_v1_generated_DocumentProcessorService_DeployProcessorVersion_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DeployProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DeployProcessorVersionRequest. + } + op, err := c.DeployProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_DeployProcessorVersion_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DisableProcessor/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DisableProcessor/main.go new file mode 100644 index 000000000000..4121b181d7dc --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/DisableProcessor/main.go @@ -0,0 +1,53 @@ +// 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 documentai_v1_generated_DocumentProcessorService_DisableProcessor_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.DisableProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#DisableProcessorRequest. + } + op, err := c.DisableProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_DisableProcessor_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/EnableProcessor/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/EnableProcessor/main.go new file mode 100644 index 000000000000..cbdb3bcde019 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/EnableProcessor/main.go @@ -0,0 +1,53 @@ +// 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 documentai_v1_generated_DocumentProcessorService_EnableProcessor_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.EnableProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#EnableProcessorRequest. + } + op, err := c.EnableProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_EnableProcessor_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/FetchProcessorTypes/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/FetchProcessorTypes/main.go new file mode 100644 index 000000000000..cdf6f9b19536 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/FetchProcessorTypes/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 documentai_v1_generated_DocumentProcessorService_FetchProcessorTypes_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.FetchProcessorTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#FetchProcessorTypesRequest. + } + resp, err := c.FetchProcessorTypes(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_FetchProcessorTypes_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetLocation/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetLocation/main.go new file mode 100644 index 000000000000..8b292dc2bda1 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetLocation/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 documentai_v1_generated_DocumentProcessorService_GetLocation_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_GetLocation_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetOperation/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetOperation/main.go new file mode 100644 index 000000000000..793db303687c --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/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 documentai_v1_generated_DocumentProcessorService_GetOperation_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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 documentai_v1_generated_DocumentProcessorService_GetOperation_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessor/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessor/main.go new file mode 100644 index 000000000000..e49824bb451f --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessor/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 documentai_v1_generated_DocumentProcessorService_GetProcessor_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.GetProcessorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#GetProcessorRequest. + } + resp, err := c.GetProcessor(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_GetProcessor_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessorVersion/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessorVersion/main.go new file mode 100644 index 000000000000..353e3640d0ea --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/GetProcessorVersion/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 documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.GetProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#GetProcessorVersionRequest. + } + resp, err := c.GetProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListLocations/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListLocations/main.go new file mode 100644 index 000000000000..d8d6c953d487 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListLocations/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 documentai_v1_generated_DocumentProcessorService_ListLocations_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END documentai_v1_generated_DocumentProcessorService_ListLocations_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListOperations/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListOperations/main.go new file mode 100644 index 000000000000..7e4c759d4b62 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/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 documentai_v1_generated_DocumentProcessorService_ListOperations_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(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 documentai_v1_generated_DocumentProcessorService_ListOperations_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorTypes/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorTypes/main.go new file mode 100644 index 000000000000..86a3156fe51a --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorTypes/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 documentai_v1_generated_DocumentProcessorService_ListProcessorTypes_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorTypesRequest. + } + it := c.ListProcessorTypes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END documentai_v1_generated_DocumentProcessorService_ListProcessorTypes_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorVersions/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorVersions/main.go new file mode 100644 index 000000000000..75e5198a8379 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessorVersions/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 documentai_v1_generated_DocumentProcessorService_ListProcessorVersions_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorVersionsRequest. + } + it := c.ListProcessorVersions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END documentai_v1_generated_DocumentProcessorService_ListProcessorVersions_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessors/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessors/main.go new file mode 100644 index 000000000000..0fb11ba1d609 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ListProcessors/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 documentai_v1_generated_DocumentProcessorService_ListProcessors_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + "google.golang.org/api/iterator" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.ListProcessorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#ListProcessorsRequest. + } + it := c.ListProcessors(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END documentai_v1_generated_DocumentProcessorService_ListProcessors_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/SetDefaultProcessorVersion/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/SetDefaultProcessorVersion/main.go new file mode 100644 index 000000000000..46870ecf36a2 --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/SetDefaultProcessorVersion/main.go @@ -0,0 +1,53 @@ +// 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 documentai_v1_generated_DocumentProcessorService_SetDefaultProcessorVersion_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.SetDefaultProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#SetDefaultProcessorVersionRequest. + } + op, err := c.SetDefaultProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_SetDefaultProcessorVersion_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/UndeployProcessorVersion/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/UndeployProcessorVersion/main.go new file mode 100644 index 000000000000..372987ff621a --- /dev/null +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/UndeployProcessorVersion/main.go @@ -0,0 +1,53 @@ +// 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 documentai_v1_generated_DocumentProcessorService_UndeployProcessorVersion_sync] + +package main + +import ( + "context" + + documentai "cloud.google.com/go/documentai/apiv1" + documentaipb "google.golang.org/genproto/googleapis/cloud/documentai/v1" +) + +func main() { + ctx := context.Background() + c, err := documentai.NewDocumentProcessorClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &documentaipb.UndeployProcessorVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/documentai/v1#UndeployProcessorVersionRequest. + } + op, err := c.UndeployProcessorVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END documentai_v1_generated_DocumentProcessorService_UndeployProcessorVersion_sync] diff --git a/internal/generated/snippets/documentai/apiv1/snippet_metadata.google.cloud.documentai.v1.json b/internal/generated/snippets/documentai/apiv1/snippet_metadata.google.cloud.documentai.v1.json index d8dafe42ea52..13e4a2b85282 100644 --- a/internal/generated/snippets/documentai/apiv1/snippet_metadata.google.cloud.documentai.v1.json +++ b/internal/generated/snippets/documentai/apiv1/snippet_metadata.google.cloud.documentai.v1.json @@ -57,6 +57,787 @@ } ] }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_CancelOperation_sync", + "title": "documentai CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "DocumentProcessorClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.CancelOperation", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_CreateProcessor_sync", + "title": "documentai CreateProcessor Sample", + "description": "CreateProcessor creates a processor from the type processor that the user chose.\nThe processor will be at “ENABLED” state by default after its creation.", + "file": "DocumentProcessorClient/CreateProcessor/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.CreateProcessor", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.CreateProcessorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "documentaipb.Processor", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "CreateProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_DeleteProcessor_sync", + "title": "documentai DeleteProcessor Sample", + "description": "DeleteProcessor deletes the processor, unloads all deployed model artifacts if it was\nenabled and then deletes all artifacts associated with this processor.", + "file": "DocumentProcessorClient/DeleteProcessor/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.DeleteProcessor", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.DeleteProcessorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteProcessorOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "DeleteProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_DeleteProcessorVersion_sync", + "title": "documentai DeleteProcessorVersion Sample", + "description": "DeleteProcessorVersion deletes the processor version, all artifacts under the processor version\nwill be deleted.", + "file": "DocumentProcessorClient/DeleteProcessorVersion/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.DeleteProcessorVersion", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.DeleteProcessorVersionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteProcessorVersionOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "DeleteProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_DeployProcessorVersion_sync", + "title": "documentai DeployProcessorVersion Sample", + "description": "DeployProcessorVersion deploys the processor version.", + "file": "DocumentProcessorClient/DeployProcessorVersion/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeployProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.DeployProcessorVersion", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.DeployProcessorVersionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeployProcessorVersionOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "DeployProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_DisableProcessor_sync", + "title": "documentai DisableProcessor Sample", + "description": "DisableProcessor disables a processor", + "file": "DocumentProcessorClient/DisableProcessor/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DisableProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.DisableProcessor", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.DisableProcessorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DisableProcessorOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "DisableProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_EnableProcessor_sync", + "title": "documentai EnableProcessor Sample", + "description": "EnableProcessor enables a processor", + "file": "DocumentProcessorClient/EnableProcessor/main.go", + "language": "GO", + "clientMethod": { + "shortName": "EnableProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.EnableProcessor", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.EnableProcessorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "EnableProcessorOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "EnableProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_FetchProcessorTypes_sync", + "title": "documentai FetchProcessorTypes Sample", + "description": "FetchProcessorTypes fetches processor types. Note that we do not use ListProcessorTypes here\nbecause it is not paginated.", + "file": "DocumentProcessorClient/FetchProcessorTypes/main.go", + "language": "GO", + "clientMethod": { + "shortName": "FetchProcessorTypes", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.FetchProcessorTypes", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.FetchProcessorTypesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "documentaipb.FetchProcessorTypesResponse", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "FetchProcessorTypes", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_GetLocation_sync", + "title": "documentai GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "DocumentProcessorClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetLocation", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_GetOperation_sync", + "title": "documentai GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "DocumentProcessorClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetOperation", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_GetProcessor_sync", + "title": "documentai GetProcessor Sample", + "description": "GetProcessor gets a processor detail.", + "file": "DocumentProcessorClient/GetProcessor/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.GetProcessor", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.GetProcessorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "documentaipb.Processor", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "GetProcessor", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetProcessor", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_sync", + "title": "documentai GetProcessorVersion Sample", + "description": "GetProcessorVersion gets a processor version detail.", + "file": "DocumentProcessorClient/GetProcessorVersion/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.GetProcessorVersion", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.GetProcessorVersionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "documentaipb.ProcessorVersion", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "GetProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListLocations_sync", + "title": "documentai ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "DocumentProcessorClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListLocations", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListOperations_sync", + "title": "documentai ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "DocumentProcessorClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListOperations", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListProcessorTypes_sync", + "title": "documentai ListProcessorTypes Sample", + "description": "ListProcessorTypes lists the processor types that exist.", + "file": "DocumentProcessorClient/ListProcessorTypes/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListProcessorTypes", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.ListProcessorTypes", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.ListProcessorTypesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ProcessorTypeIterator", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "ListProcessorTypes", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListProcessorVersions_sync", + "title": "documentai ListProcessorVersions Sample", + "description": "ListProcessorVersions lists all versions of a processor.", + "file": "DocumentProcessorClient/ListProcessorVersions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListProcessorVersions", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.ListProcessorVersions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.ListProcessorVersionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ProcessorVersionIterator", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "ListProcessorVersions", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListProcessorVersions", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListProcessors_sync", + "title": "documentai ListProcessors Sample", + "description": "ListProcessors lists all processors which belong to this project.", + "file": "DocumentProcessorClient/ListProcessors/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListProcessors", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.ListProcessors", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.ListProcessorsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ProcessorIterator", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "ListProcessors", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListProcessors", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, { "regionTag": "documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync", "title": "documentai ProcessDocument Sample", @@ -148,6 +929,98 @@ "type": "FULL" } ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_SetDefaultProcessorVersion_sync", + "title": "documentai SetDefaultProcessorVersion Sample", + "description": "SetDefaultProcessorVersion set the default (active) version of a Processor that will be used in\nProcessDocument and\nBatchProcessDocuments.", + "file": "DocumentProcessorClient/SetDefaultProcessorVersion/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetDefaultProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.SetDefaultProcessorVersion", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.SetDefaultProcessorVersionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "SetDefaultProcessorVersionOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "SetDefaultProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_UndeployProcessorVersion_sync", + "title": "documentai UndeployProcessorVersion Sample", + "description": "UndeployProcessorVersion undeploys the processor version.", + "file": "DocumentProcessorClient/UndeployProcessorVersion/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UndeployProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient.UndeployProcessorVersion", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "documentaipb.UndeployProcessorVersionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UndeployProcessorVersionOperation", + "client": { + "shortName": "DocumentProcessorClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorClient" + }, + "method": { + "shortName": "UndeployProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/internal/generated/snippets/domains/apiv1beta1/snippet_metadata.google.cloud.domains.v1beta1.json b/internal/generated/snippets/domains/apiv1beta1/snippet_metadata.google.cloud.domains.v1beta1.json index 166a3b4e318e..eb1bee63422b 100644 --- a/internal/generated/snippets/domains/apiv1beta1/snippet_metadata.google.cloud.domains.v1beta1.json +++ b/internal/generated/snippets/domains/apiv1beta1/snippet_metadata.google.cloud.domains.v1beta1.json @@ -152,7 +152,7 @@ { "regionTag": "domains_v1beta1_generated_Domains_DeleteRegistration_sync", "title": "domains DeleteRegistration Sample", - "description": "DeleteRegistration deletes a Registration resource.\n\nThis method works on any Registration resource using Subscription or\nCommitment billing (at /domains/pricing#billing-models), provided that the\nresource was created at least 1 day in the past.\n\nFor Registration resources using\nMonthly billing (at /domains/pricing#billing-models), this method works if: \n\n state is EXPORTED with expire_time in the past\n\n state is REGISTRATION_FAILED\n\n state is TRANSFER_FAILED\n\nWhen an active registration is successfully deleted, you can continue to\nuse the domain in Google Domains (at https: //domains.google/) until it\nexpires. The calling user becomes the domain’s sole owner in Google\nDomains, and permissions for the domain are subsequently managed there. The\ndomain does not renew automatically unless the new owner sets up billing in\nGoogle Domains.", + "description": "DeleteRegistration deletes a Registration resource.\n\nThis method works on any Registration resource using Subscription or\nCommitment billing (at /domains/pricing#billing-models), provided that the\nresource was created at least 1 day in the past.\n\nFor Registration resources using\nMonthly billing (at /domains/pricing#billing-models), this method works if: \n\n\tstate is EXPORTED with expire_time in the past\n\n\tstate is REGISTRATION_FAILED\n\n\tstate is TRANSFER_FAILED\n\nWhen an active registration is successfully deleted, you can continue to\nuse the domain in Google Domains (at https: //domains.google/) until it\nexpires. The calling user becomes the domain’s sole owner in Google\nDomains, and permissions for the domain are subsequently managed there. The\ndomain does not renew automatically unless the new owner sets up billing in\nGoogle Domains.", "file": "Client/DeleteRegistration/main.go", "language": "GO", "clientMethod": { @@ -658,7 +658,7 @@ { "regionTag": "domains_v1beta1_generated_Domains_UpdateRegistration_sync", "title": "domains UpdateRegistration Sample", - "description": "UpdateRegistration updates select fields of a Registration resource, notably labels. To\nupdate other fields, use the appropriate custom update method: \n\n To update management settings, see ConfigureManagementSettings\n\n To update DNS configuration, see ConfigureDnsSettings\n\n To update contact information, see ConfigureContactSettings", + "description": "UpdateRegistration updates select fields of a Registration resource, notably labels. To\nupdate other fields, use the appropriate custom update method: \n\n\tTo update management settings, see ConfigureManagementSettings\n\n\tTo update DNS configuration, see ConfigureDnsSettings\n\n\tTo update contact information, see ConfigureContactSettings", "file": "Client/UpdateRegistration/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json b/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json index db3a9215b15b..6e88f44961ac 100644 --- a/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json +++ b/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json @@ -198,7 +198,7 @@ { "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync", "title": "cloudfunctions GenerateUploadUrl Sample", - "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n Source file type should be a zip file.\n\n Source file size should not exceed 100MB limit.\n\n No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n content-type: application/zip\n\n x-goog-content-length-range: 0,104857600\n\nAnd this header SHOULD NOT be specified: \n\n Authorization: Bearer YOUR_TOKEN", + "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n\tSource file type should be a zip file.\n\n\tSource file size should not exceed 100MB limit.\n\n\tNo credentials should be attached - the signed URLs provide access to the\n\ttarget bucket using internal service identity; if credentials were\n\tattached, the identity from the credentials would be used, but that\n\tidentity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n\tcontent-type: application/zip\n\n\tx-goog-content-length-range: 0,104857600\n\nAnd this header SHOULD NOT be specified: \n\n\tAuthorization: Bearer YOUR_TOKEN", "file": "CloudFunctionsClient/GenerateUploadUrl/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json b/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json index 7aad2de0e5d6..a689f30e9a5e 100644 --- a/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json +++ b/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json @@ -152,7 +152,7 @@ { "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync", "title": "cloudfunctions GenerateUploadUrl Sample", - "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n Source file type should be a zip file.\n\n No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n content-type: application/zip\n\nAnd this header SHOULD NOT be specified: \n\n Authorization: Bearer YOUR_TOKEN", + "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n\tSource file type should be a zip file.\n\n\tNo credentials should be attached - the signed URLs provide access to the\n\ttarget bucket using internal service identity; if credentials were\n\tattached, the identity from the credentials would be used, but that\n\tidentity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n\tcontent-type: application/zip\n\nAnd this header SHOULD NOT be specified: \n\n\tAuthorization: Bearer YOUR_TOKEN", "file": "FunctionClient/GenerateUploadUrl/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json b/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json index e4e92a10fdd2..2b03e2239dfa 100644 --- a/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json +++ b/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json @@ -152,7 +152,7 @@ { "regionTag": "cloudfunctions_v2beta_generated_FunctionService_GenerateUploadUrl_sync", "title": "cloudfunctions GenerateUploadUrl Sample", - "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n Source file type should be a zip file.\n\n No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n content-type: application/zip\n\nAnd this header SHOULD NOT be specified: \n\n Authorization: Bearer YOUR_TOKEN", + "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n\tSource file type should be a zip file.\n\n\tNo credentials should be attached - the signed URLs provide access to the\n\ttarget bucket using internal service identity; if credentials were\n\tattached, the identity from the credentials would be used, but that\n\tidentity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n\tcontent-type: application/zip\n\nAnd this header SHOULD NOT be specified: \n\n\tAuthorization: Bearer YOUR_TOKEN", "file": "FunctionClient/GenerateUploadUrl/main.go", "language": "GO", "clientMethod": { diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 92a472c8fcdc..bf14eca6689d 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -119,8 +119,8 @@ require ( cloud.google.com/go/websecurityscanner v1.0.0 cloud.google.com/go/workflows v1.1.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - google.golang.org/api v0.91.0 - google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e + google.golang.org/api v0.92.0 + google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 ) require cloud.google.com/go/apigeeregistry v0.0.0-00010101000000-000000000000 diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index 7003e2fb8848..1b37443abc22 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -193,10 +193,10 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.87.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.88.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -229,14 +229,15 @@ google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220712132514-bdd2acd4974d/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220718134204-073382fd740c/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/genproto v0.0.0-20220719170305-83ca9fad585f/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220720214146-176da50484ac/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e h1:yXLYwnRRqNHIwwHZLiA9/aC9uieNrOF0owsijAiZJr8= google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 h1:zZnTt15U44/Txe/9cN/tVbteBkPMiyXK48hPsKRmqj4= +google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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.mod b/internal/godocfx/go.mod index d9bccf3aee6a..89d233102131 100644 --- a/internal/godocfx/go.mod +++ b/internal/godocfx/go.mod @@ -30,9 +30,9 @@ require ( golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect - google.golang.org/api v0.91.0 // indirect + google.golang.org/api v0.92.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e // indirect + google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c // indirect google.golang.org/grpc v1.48.0 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index f53e1a841eb0..4e92b364316f 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -235,8 +235,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= -google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -272,8 +272,8 @@ google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/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-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e h1:yXLYwnRRqNHIwwHZLiA9/aC9uieNrOF0owsijAiZJr8= -google.golang.org/genproto v0.0.0-20220808131553-a91ffa7f803e/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/storage/go.mod b/storage/go.mod index 6bc29b0bc201..eb2b32dc62ef 100644 --- a/storage/go.mod +++ b/storage/go.mod @@ -12,8 +12,8 @@ require ( github.com/googleapis/gax-go/v2 v2.4.0 golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.88.0 - google.golang.org/genproto v0.0.0-20220720214146-176da50484ac + google.golang.org/api v0.92.0 + google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 ) diff --git a/storage/go.sum b/storage/go.sum index d0ea5df14e09..a9ab0818cc94 100644 --- a/storage/go.sum +++ b/storage/go.sum @@ -505,8 +505,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.88.0 h1:MPwxQRqpyskYhr2iNyfsQ8R06eeyhe7UEuR30p136ZQ= -google.golang.org/api v0.88.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.92.0 h1:8JHk7q/+rJla+iRsWj9FQ9/wjv2M1SKtpKSdmLhxPT0= +google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -595,8 +595,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/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220720214146-176da50484ac h1:EOa+Yrhx1C0O+4pHeXeWrCwdI0tWI6IfUU56Vebs9wQ= -google.golang.org/genproto v0.0.0-20220720214146-176da50484ac/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= +google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= 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/storage/internal/apiv2/stubs/storage.pb.go b/storage/internal/apiv2/stubs/storage.pb.go index 37cf14ea2b5c..28c00714b243 100644 --- a/storage/internal/apiv2/stubs/storage.pb.go +++ b/storage/internal/apiv2/stubs/storage.pb.go @@ -1865,6 +1865,7 @@ type WriteObjectRequest struct { // The first message of each stream should set one of the following. // // Types that are assignable to FirstMessage: + // // *WriteObjectRequest_UploadId // *WriteObjectRequest_WriteObjectSpec FirstMessage isWriteObjectRequest_FirstMessage `protobuf_oneof:"first_message"` @@ -1885,6 +1886,7 @@ type WriteObjectRequest struct { // A portion of the data for the object. // // Types that are assignable to Data: + // // *WriteObjectRequest_ChecksummedData Data isWriteObjectRequest_Data `protobuf_oneof:"data"` // Checksums for the complete object. If the checksums computed by the service @@ -2039,6 +2041,7 @@ type WriteObjectResponse struct { // The response will set one of the following. // // Types that are assignable to WriteStatus: + // // *WriteObjectResponse_PersistedSize // *WriteObjectResponse_Resource WriteStatus isWriteObjectResponse_WriteStatus `protobuf_oneof:"write_status"` @@ -2338,6 +2341,7 @@ type QueryWriteStatusResponse struct { // The response will set one of the following. // // Types that are assignable to WriteStatus: + // // *QueryWriteStatusResponse_PersistedSize // *QueryWriteStatusResponse_Resource WriteStatus isQueryWriteStatusResponse_WriteStatus `protobuf_oneof:"write_status"`