diff --git a/accessapproval/apiv1/doc.go b/accessapproval/apiv1/doc.go index 73797bfec19a..c8891dfe24d8 100644 --- a/accessapproval/apiv1/doc.go +++ b/accessapproval/apiv1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/analytics/admin/apiv1alpha/doc.go b/analytics/admin/apiv1alpha/doc.go index 0773beac2cdd..bcafaf94261b 100644 --- a/analytics/admin/apiv1alpha/doc.go +++ b/analytics/admin/apiv1alpha/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/analytics/data/apiv1alpha/doc.go b/analytics/data/apiv1alpha/doc.go index 7211dbca23d9..9f9a4ea32501 100644 --- a/analytics/data/apiv1alpha/doc.go +++ b/analytics/data/apiv1alpha/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/appengine/apiv1/doc.go b/appengine/apiv1/doc.go index 5d9ab6ef5c54..7d4fec339521 100644 --- a/appengine/apiv1/doc.go +++ b/appengine/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/area120/tables/apiv1alpha1/doc.go b/area120/tables/apiv1alpha1/doc.go index 92b743558b89..c32596bf4899 100644 --- a/area120/tables/apiv1alpha1/doc.go +++ b/area120/tables/apiv1alpha1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/artifactregistry/apiv1beta2/doc.go b/artifactregistry/apiv1beta2/doc.go index 5e9e994fa014..f957321839dc 100644 --- a/artifactregistry/apiv1beta2/doc.go +++ b/artifactregistry/apiv1beta2/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/asset/apiv1/doc.go b/asset/apiv1/doc.go index 9ece094681d8..e42e925f257f 100644 --- a/asset/apiv1/doc.go +++ b/asset/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/asset/apiv1p2beta1/doc.go b/asset/apiv1p2beta1/doc.go index c5a0d4d9a3be..77ee807a9dcb 100644 --- a/asset/apiv1p2beta1/doc.go +++ b/asset/apiv1p2beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/asset/apiv1p5beta1/doc.go b/asset/apiv1p5beta1/doc.go index 1e7ce53efe42..1f91540781ca 100644 --- a/asset/apiv1p5beta1/doc.go +++ b/asset/apiv1p5beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/assuredworkloads/apiv1beta1/doc.go b/assuredworkloads/apiv1beta1/doc.go index 8615ed300ae3..e7b04697d872 100644 --- a/assuredworkloads/apiv1beta1/doc.go +++ b/assuredworkloads/apiv1beta1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/automl/apiv1/doc.go b/automl/apiv1/doc.go index f6741d19d6b9..9a3848e4428f 100644 --- a/automl/apiv1/doc.go +++ b/automl/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/automl/apiv1beta1/doc.go b/automl/apiv1beta1/doc.go index c6a015abb2d3..154f67632e0b 100644 --- a/automl/apiv1beta1/doc.go +++ b/automl/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/connection/apiv1/doc.go b/bigquery/connection/apiv1/doc.go index 0237973ef61b..fffe1d28f922 100644 --- a/bigquery/connection/apiv1/doc.go +++ b/bigquery/connection/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/connection/apiv1beta1/doc.go b/bigquery/connection/apiv1beta1/doc.go index f51db64a158c..6c9cad1d0a55 100644 --- a/bigquery/connection/apiv1beta1/doc.go +++ b/bigquery/connection/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/datatransfer/apiv1/doc.go b/bigquery/datatransfer/apiv1/doc.go index dda9bede6928..a3add8ae769f 100644 --- a/bigquery/datatransfer/apiv1/doc.go +++ b/bigquery/datatransfer/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/reservation/apiv1/doc.go b/bigquery/reservation/apiv1/doc.go index 5a9c836bca2e..89a01a5400e1 100644 --- a/bigquery/reservation/apiv1/doc.go +++ b/bigquery/reservation/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/reservation/apiv1beta1/doc.go b/bigquery/reservation/apiv1beta1/doc.go index 7771ccfbc3f2..51856e3aa36f 100644 --- a/bigquery/reservation/apiv1beta1/doc.go +++ b/bigquery/reservation/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1/doc.go b/bigquery/storage/apiv1/doc.go index 00f3cb91848e..0971e99f06c3 100644 --- a/bigquery/storage/apiv1/doc.go +++ b/bigquery/storage/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1alpha2/doc.go b/bigquery/storage/apiv1alpha2/doc.go index 243a909db0de..eec1c51243fd 100644 --- a/bigquery/storage/apiv1alpha2/doc.go +++ b/bigquery/storage/apiv1alpha2/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1beta1/doc.go b/bigquery/storage/apiv1beta1/doc.go index 89ee318ecfc3..f5f72da09304 100644 --- a/bigquery/storage/apiv1beta1/doc.go +++ b/bigquery/storage/apiv1beta1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1beta2/doc.go b/bigquery/storage/apiv1beta2/doc.go index 407eb7c65afe..b02b9f6fcf43 100644 --- a/bigquery/storage/apiv1beta2/doc.go +++ b/bigquery/storage/apiv1beta2/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/billing/apiv1/doc.go b/billing/apiv1/doc.go index d37e26f95eff..fc9dd2099a0a 100644 --- a/billing/apiv1/doc.go +++ b/billing/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/billing/budgets/apiv1/doc.go b/billing/budgets/apiv1/doc.go index d3fb9673871c..06b3c8346a7a 100644 --- a/billing/budgets/apiv1/doc.go +++ b/billing/budgets/apiv1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/billing/budgets/apiv1beta1/doc.go b/billing/budgets/apiv1beta1/doc.go index 6e6468d1a820..328ecd5a5a51 100644 --- a/billing/budgets/apiv1beta1/doc.go +++ b/billing/budgets/apiv1beta1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/binaryauthorization/apiv1beta1/doc.go b/binaryauthorization/apiv1beta1/doc.go index 47e2d22eae46..9e64eeaefaa8 100644 --- a/binaryauthorization/apiv1beta1/doc.go +++ b/binaryauthorization/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/channel/apiv1/doc.go b/channel/apiv1/doc.go index c09b9fff5a51..0486ca079e7c 100644 --- a/channel/apiv1/doc.go +++ b/channel/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudbuild/apiv1/v2/doc.go b/cloudbuild/apiv1/v2/doc.go index b772a20f069a..6e49b51fefce 100644 --- a/cloudbuild/apiv1/v2/doc.go +++ b/cloudbuild/apiv1/v2/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2/doc.go b/cloudtasks/apiv2/doc.go index 192c82a65e67..f51ba436fb30 100644 --- a/cloudtasks/apiv2/doc.go +++ b/cloudtasks/apiv2/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2beta2/doc.go b/cloudtasks/apiv2beta2/doc.go index 71cd99140eb6..3b0f0637d61b 100644 --- a/cloudtasks/apiv2beta2/doc.go +++ b/cloudtasks/apiv2beta2/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2beta3/doc.go b/cloudtasks/apiv2beta3/doc.go index 1f5f06f9a623..ff94a40a79df 100644 --- a/cloudtasks/apiv2beta3/doc.go +++ b/cloudtasks/apiv2beta3/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/container/apiv1/doc.go b/container/apiv1/doc.go index 3aee7fbb2abf..10b2afd13583 100644 --- a/container/apiv1/doc.go +++ b/container/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/containeranalysis/apiv1beta1/doc.go b/containeranalysis/apiv1beta1/doc.go index 8a8df80905ab..f1f45d82644e 100644 --- a/containeranalysis/apiv1beta1/doc.go +++ b/containeranalysis/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datacatalog/apiv1/doc.go b/datacatalog/apiv1/doc.go index 2dfa5f598f21..c57bd1b7f50a 100644 --- a/datacatalog/apiv1/doc.go +++ b/datacatalog/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datacatalog/apiv1beta1/doc.go b/datacatalog/apiv1beta1/doc.go index 8e4503870d34..0adc2c9a878b 100644 --- a/datacatalog/apiv1beta1/doc.go +++ b/datacatalog/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datalabeling/apiv1beta1/doc.go b/datalabeling/apiv1beta1/doc.go index 77743dcf2e18..cb74c03ca641 100644 --- a/datalabeling/apiv1beta1/doc.go +++ b/datalabeling/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dataproc/apiv1/doc.go b/dataproc/apiv1/doc.go index 03fd2d62b4bb..f7ac3c8dad8c 100644 --- a/dataproc/apiv1/doc.go +++ b/dataproc/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dataproc/apiv1beta2/doc.go b/dataproc/apiv1beta2/doc.go index 747f0c4990df..ba179a51aed0 100644 --- a/dataproc/apiv1beta2/doc.go +++ b/dataproc/apiv1beta2/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datastore/admin/apiv1/doc.go b/datastore/admin/apiv1/doc.go index 1dc4c1b2bf7d..2d29ab3d26f3 100644 --- a/datastore/admin/apiv1/doc.go +++ b/datastore/admin/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/debugger/apiv2/doc.go b/debugger/apiv2/doc.go index c6864bead5f7..566cd2c1e5d4 100644 --- a/debugger/apiv2/doc.go +++ b/debugger/apiv2/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/apiv2/doc.go b/dialogflow/apiv2/doc.go index 039dc5533a73..32806857ca06 100644 --- a/dialogflow/apiv2/doc.go +++ b/dialogflow/apiv2/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/cx/apiv3beta1/agents_client.go b/dialogflow/cx/apiv3beta1/agents_client.go index ea3a194172e2..5202ebac3311 100644 --- a/dialogflow/cx/apiv3beta1/agents_client.go +++ b/dialogflow/cx/apiv3beta1/agents_client.go @@ -43,13 +43,15 @@ var newAgentsClientHook clientHook // AgentsCallOptions contains the retry settings for each method of AgentsClient. type AgentsCallOptions struct { - ListAgents []gax.CallOption - GetAgent []gax.CallOption - CreateAgent []gax.CallOption - UpdateAgent []gax.CallOption - DeleteAgent []gax.CallOption - ExportAgent []gax.CallOption - RestoreAgent []gax.CallOption + ListAgents []gax.CallOption + GetAgent []gax.CallOption + CreateAgent []gax.CallOption + UpdateAgent []gax.CallOption + DeleteAgent []gax.CallOption + ExportAgent []gax.CallOption + RestoreAgent []gax.CallOption + ValidateAgent []gax.CallOption + GetAgentValidationResult []gax.CallOption } func defaultAgentsClientOptions() []option.ClientOption { @@ -143,6 +145,28 @@ func defaultAgentsCallOptions() *AgentsCallOptions { }) }), }, + ValidateAgent: []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, + }) + }), + }, + GetAgentValidationResult: []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, + }) + }), + }, } } @@ -414,6 +438,53 @@ func (c *AgentsClient) RestoreAgent(ctx context.Context, req *cxpb.RestoreAgentR }, nil } +// ValidateAgent validates the specified agent and creates or updates validation results. +// The agent in draft version is validated. Please call this API after the +// training is completed to get the complete validation results. +func (c *AgentsClient) ValidateAgent(ctx context.Context, req *cxpb.ValidateAgentRequest, opts ...gax.CallOption) (*cxpb.AgentValidationResult, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.ValidateAgent[0:len(c.CallOptions.ValidateAgent):len(c.CallOptions.ValidateAgent)], opts...) + var resp *cxpb.AgentValidationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.ValidateAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// GetAgentValidationResult gets the latest agent validation result. Agent validation is performed +// when ValidateAgent is called. +func (c *AgentsClient) GetAgentValidationResult(ctx context.Context, req *cxpb.GetAgentValidationResultRequest, opts ...gax.CallOption) (*cxpb.AgentValidationResult, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetAgentValidationResult[0:len(c.CallOptions.GetAgentValidationResult):len(c.CallOptions.GetAgentValidationResult)], opts...) + var resp *cxpb.AgentValidationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.GetAgentValidationResult(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // ExportAgentOperation manages a long-running operation from ExportAgent. type ExportAgentOperation struct { lro *longrunning.Operation diff --git a/dialogflow/cx/apiv3beta1/agents_client_example_test.go b/dialogflow/cx/apiv3beta1/agents_client_example_test.go index 5e8fdd2c5a51..561c834eade6 100644 --- a/dialogflow/cx/apiv3beta1/agents_client_example_test.go +++ b/dialogflow/cx/apiv3beta1/agents_client_example_test.go @@ -184,3 +184,43 @@ func ExampleAgentsClient_RestoreAgent() { // TODO: Handle error. } } + +func ExampleAgentsClient_ValidateAgent() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ValidateAgentRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.ValidateAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_GetAgentValidationResult() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.GetAgentValidationResultRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetAgentValidationResult(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/dialogflow/cx/apiv3beta1/doc.go b/dialogflow/cx/apiv3beta1/doc.go index 89a05ab2160b..1577d8211d8a 100644 --- a/dialogflow/cx/apiv3beta1/doc.go +++ b/dialogflow/cx/apiv3beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/cx/apiv3beta1/flows_client.go b/dialogflow/cx/apiv3beta1/flows_client.go index 7fdc2d8105c5..3fd322a5215c 100644 --- a/dialogflow/cx/apiv3beta1/flows_client.go +++ b/dialogflow/cx/apiv3beta1/flows_client.go @@ -43,12 +43,14 @@ var newFlowsClientHook clientHook // FlowsCallOptions contains the retry settings for each method of FlowsClient. type FlowsCallOptions struct { - CreateFlow []gax.CallOption - DeleteFlow []gax.CallOption - ListFlows []gax.CallOption - GetFlow []gax.CallOption - UpdateFlow []gax.CallOption - TrainFlow []gax.CallOption + CreateFlow []gax.CallOption + DeleteFlow []gax.CallOption + ListFlows []gax.CallOption + GetFlow []gax.CallOption + UpdateFlow []gax.CallOption + TrainFlow []gax.CallOption + ValidateFlow []gax.CallOption + GetFlowValidationResult []gax.CallOption } func defaultFlowsClientOptions() []option.ClientOption { @@ -131,6 +133,28 @@ func defaultFlowsCallOptions() *FlowsCallOptions { }) }), }, + ValidateFlow: []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, + }) + }), + }, + GetFlowValidationResult: []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, + }) + }), + }, } } @@ -376,6 +400,53 @@ func (c *FlowsClient) TrainFlow(ctx context.Context, req *cxpb.TrainFlowRequest, }, nil } +// ValidateFlow validates the specified flow and creates or updates validation results. +// Please call this API after the training is completed to get the complete +// validation results. +func (c *FlowsClient) ValidateFlow(ctx context.Context, req *cxpb.ValidateFlowRequest, opts ...gax.CallOption) (*cxpb.FlowValidationResult, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.ValidateFlow[0:len(c.CallOptions.ValidateFlow):len(c.CallOptions.ValidateFlow)], opts...) + var resp *cxpb.FlowValidationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.flowsClient.ValidateFlow(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// GetFlowValidationResult gets the latest flow validation result. Flow validation is performed +// when ValidateFlow is called. +func (c *FlowsClient) GetFlowValidationResult(ctx context.Context, req *cxpb.GetFlowValidationResultRequest, opts ...gax.CallOption) (*cxpb.FlowValidationResult, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetFlowValidationResult[0:len(c.CallOptions.GetFlowValidationResult):len(c.CallOptions.GetFlowValidationResult)], opts...) + var resp *cxpb.FlowValidationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.flowsClient.GetFlowValidationResult(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // TrainFlowOperation manages a long-running operation from TrainFlow. type TrainFlowOperation struct { lro *longrunning.Operation diff --git a/dialogflow/cx/apiv3beta1/flows_client_example_test.go b/dialogflow/cx/apiv3beta1/flows_client_example_test.go index f1792fcd4f3a..91e42ed10a82 100644 --- a/dialogflow/cx/apiv3beta1/flows_client_example_test.go +++ b/dialogflow/cx/apiv3beta1/flows_client_example_test.go @@ -159,3 +159,43 @@ func ExampleFlowsClient_TrainFlow() { // TODO: Handle error. } } + +func ExampleFlowsClient_ValidateFlow() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewFlowsClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ValidateFlowRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.ValidateFlow(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFlowsClient_GetFlowValidationResult() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewFlowsClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.GetFlowValidationResultRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetFlowValidationResult(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/dialogflow/cx/apiv3beta1/test_cases_client.go b/dialogflow/cx/apiv3beta1/test_cases_client.go new file mode 100644 index 000000000000..1db3636d052d --- /dev/null +++ b/dialogflow/cx/apiv3beta1/test_cases_client.go @@ -0,0 +1,943 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + "github.com/golang/protobuf/proto" + 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" + cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" +) + +var newTestCasesClientHook clientHook + +// TestCasesCallOptions contains the retry settings for each method of TestCasesClient. +type TestCasesCallOptions struct { + ListTestCases []gax.CallOption + BatchDeleteTestCases []gax.CallOption + GetTestCase []gax.CallOption + CreateTestCase []gax.CallOption + UpdateTestCase []gax.CallOption + RunTestCase []gax.CallOption + BatchRunTestCases []gax.CallOption + CalculateCoverage []gax.CallOption + ImportTestCases []gax.CallOption + ExportTestCases []gax.CallOption + ListTestCaseResults []gax.CallOption +} + +func defaultTestCasesClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + option.WithGRPCDialOption(grpc.WithDisableServiceConfig()), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultTestCasesCallOptions() *TestCasesCallOptions { + return &TestCasesCallOptions{ + ListTestCases: []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, + }) + }), + }, + BatchDeleteTestCases: []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, + }) + }), + }, + GetTestCase: []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, + }) + }), + }, + CreateTestCase: []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, + }) + }), + }, + UpdateTestCase: []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, + }) + }), + }, + RunTestCase: []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, + }) + }), + }, + BatchRunTestCases: []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, + }) + }), + }, + CalculateCoverage: []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, + }) + }), + }, + ImportTestCases: []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, + }) + }), + }, + ExportTestCases: []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, + }) + }), + }, + ListTestCaseResults: []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, + }) + }), + }, + } +} + +// TestCasesClient is a client for interacting with Dialogflow API. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type TestCasesClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // The gRPC API client. + testCasesClient cxpb.TestCasesClient + + // LROClient is used internally to handle longrunning operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient + + // The call options for this service. + CallOptions *TestCasesCallOptions + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewTestCasesClient creates a new test cases client. +// +// Service for managing [Test Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and +// [Test Case Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult]. +func NewTestCasesClient(ctx context.Context, opts ...option.ClientOption) (*TestCasesClient, error) { + clientOpts := defaultTestCasesClientOptions() + + if newTestCasesClientHook != nil { + hookOpts, err := newTestCasesClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + c := &TestCasesClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + CallOptions: defaultTestCasesCallOptions(), + + testCasesClient: cxpb.NewTestCasesClient(connPool), + } + c.setGoogleClientInfo() + + c.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + return c, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated. +func (c *TestCasesClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *TestCasesClient) Close() error { + return c.connPool.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *TestCasesClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// ListTestCases fetches a list of test cases for a given agent. +func (c *TestCasesClient) ListTestCases(ctx context.Context, req *cxpb.ListTestCasesRequest, opts ...gax.CallOption) *TestCaseIterator { + 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.ListTestCases[0:len(c.CallOptions.ListTestCases):len(c.CallOptions.ListTestCases)], opts...) + it := &TestCaseIterator{} + req = proto.Clone(req).(*cxpb.ListTestCasesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.TestCase, string, error) { + var resp *cxpb.ListTestCasesResponse + req.PageToken = pageToken + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.ListTestCases(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTestCases(), 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 +} + +// BatchDeleteTestCases batch deletes test cases. +func (c *TestCasesClient) BatchDeleteTestCases(ctx context.Context, req *cxpb.BatchDeleteTestCasesRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.BatchDeleteTestCases[0:len(c.CallOptions.BatchDeleteTestCases):len(c.CallOptions.BatchDeleteTestCases)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.testCasesClient.BatchDeleteTestCases(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +// GetTestCase gets a test case. +func (c *TestCasesClient) GetTestCase(ctx context.Context, req *cxpb.GetTestCaseRequest, opts ...gax.CallOption) (*cxpb.TestCase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetTestCase[0:len(c.CallOptions.GetTestCase):len(c.CallOptions.GetTestCase)], opts...) + var resp *cxpb.TestCase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.GetTestCase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// CreateTestCase creates a test case for the given agent. +func (c *TestCasesClient) CreateTestCase(ctx context.Context, req *cxpb.CreateTestCaseRequest, opts ...gax.CallOption) (*cxpb.TestCase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.CreateTestCase[0:len(c.CallOptions.CreateTestCase):len(c.CallOptions.CreateTestCase)], opts...) + var resp *cxpb.TestCase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.CreateTestCase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// UpdateTestCase updates the specified test case. +func (c *TestCasesClient) UpdateTestCase(ctx context.Context, req *cxpb.UpdateTestCaseRequest, opts ...gax.CallOption) (*cxpb.TestCase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "test_case.name", url.QueryEscape(req.GetTestCase().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.UpdateTestCase[0:len(c.CallOptions.UpdateTestCase):len(c.CallOptions.UpdateTestCase)], opts...) + var resp *cxpb.TestCase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.UpdateTestCase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// RunTestCase kicks off a test case run. +func (c *TestCasesClient) RunTestCase(ctx context.Context, req *cxpb.RunTestCaseRequest, opts ...gax.CallOption) (*RunTestCaseOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append(c.CallOptions.RunTestCase[0:len(c.CallOptions.RunTestCase):len(c.CallOptions.RunTestCase)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.RunTestCase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &RunTestCaseOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, resp), + }, nil +} + +// BatchRunTestCases kicks off a batch run of test cases. +func (c *TestCasesClient) BatchRunTestCases(ctx context.Context, req *cxpb.BatchRunTestCasesRequest, opts ...gax.CallOption) (*BatchRunTestCasesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.BatchRunTestCases[0:len(c.CallOptions.BatchRunTestCases):len(c.CallOptions.BatchRunTestCases)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.BatchRunTestCases(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchRunTestCasesOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, resp), + }, nil +} + +// CalculateCoverage calculates the test coverage for an agent. +func (c *TestCasesClient) CalculateCoverage(ctx context.Context, req *cxpb.CalculateCoverageRequest, opts ...gax.CallOption) (*cxpb.CalculateCoverageResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "agent", url.QueryEscape(req.GetAgent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.CalculateCoverage[0:len(c.CallOptions.CalculateCoverage):len(c.CallOptions.CalculateCoverage)], opts...) + var resp *cxpb.CalculateCoverageResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.CalculateCoverage(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ImportTestCases imports the test cases from a Cloud Storage bucket or a local file. It +// always creates new test cases and won’t overwite any existing ones. The +// provided ID in the imported test case is neglected. +func (c *TestCasesClient) ImportTestCases(ctx context.Context, req *cxpb.ImportTestCasesRequest, opts ...gax.CallOption) (*ImportTestCasesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.ImportTestCases[0:len(c.CallOptions.ImportTestCases):len(c.CallOptions.ImportTestCases)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.ImportTestCases(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportTestCasesOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, resp), + }, nil +} + +// ExportTestCases exports the test cases under the agent to a Cloud Storage bucket or a local +// file. Filter can be applied to export a subset of test cases. +func (c *TestCasesClient) ExportTestCases(ctx context.Context, req *cxpb.ExportTestCasesRequest, opts ...gax.CallOption) (*ExportTestCasesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.ExportTestCases[0:len(c.CallOptions.ExportTestCases):len(c.CallOptions.ExportTestCases)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.ExportTestCases(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ExportTestCasesOperation{ + lro: longrunning.InternalNewOperation(c.LROClient, resp), + }, nil +} + +// ListTestCaseResults fetches a list of results for a given test case. +func (c *TestCasesClient) ListTestCaseResults(ctx context.Context, req *cxpb.ListTestCaseResultsRequest, opts ...gax.CallOption) *TestCaseResultIterator { + 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.ListTestCaseResults[0:len(c.CallOptions.ListTestCaseResults):len(c.CallOptions.ListTestCaseResults)], opts...) + it := &TestCaseResultIterator{} + req = proto.Clone(req).(*cxpb.ListTestCaseResultsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*cxpb.TestCaseResult, string, error) { + var resp *cxpb.ListTestCaseResultsResponse + req.PageToken = pageToken + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.testCasesClient.ListTestCaseResults(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTestCaseResults(), 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 +} + +// BatchRunTestCasesOperation manages a long-running operation from BatchRunTestCases. +type BatchRunTestCasesOperation struct { + lro *longrunning.Operation +} + +// BatchRunTestCasesOperation returns a new BatchRunTestCasesOperation from a given name. +// The name must be that of a previously created BatchRunTestCasesOperation, possibly from a different process. +func (c *TestCasesClient) BatchRunTestCasesOperation(name string) *BatchRunTestCasesOperation { + return &BatchRunTestCasesOperation{ + 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 *BatchRunTestCasesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*cxpb.BatchRunTestCasesResponse, error) { + var resp cxpb.BatchRunTestCasesResponse + 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 *BatchRunTestCasesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*cxpb.BatchRunTestCasesResponse, error) { + var resp cxpb.BatchRunTestCasesResponse + 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 *BatchRunTestCasesOperation) Metadata() (*cxpb.BatchRunTestCasesMetadata, error) { + var meta cxpb.BatchRunTestCasesMetadata + 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 *BatchRunTestCasesOperation) 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 *BatchRunTestCasesOperation) Name() string { + return op.lro.Name() +} + +// ExportTestCasesOperation manages a long-running operation from ExportTestCases. +type ExportTestCasesOperation struct { + lro *longrunning.Operation +} + +// ExportTestCasesOperation returns a new ExportTestCasesOperation from a given name. +// The name must be that of a previously created ExportTestCasesOperation, possibly from a different process. +func (c *TestCasesClient) ExportTestCasesOperation(name string) *ExportTestCasesOperation { + return &ExportTestCasesOperation{ + 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 *ExportTestCasesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*cxpb.ExportTestCasesResponse, error) { + var resp cxpb.ExportTestCasesResponse + 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 *ExportTestCasesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*cxpb.ExportTestCasesResponse, error) { + var resp cxpb.ExportTestCasesResponse + 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 *ExportTestCasesOperation) Metadata() (*cxpb.ExportTestCasesMetadata, error) { + var meta cxpb.ExportTestCasesMetadata + 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 *ExportTestCasesOperation) 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 *ExportTestCasesOperation) Name() string { + return op.lro.Name() +} + +// ImportTestCasesOperation manages a long-running operation from ImportTestCases. +type ImportTestCasesOperation struct { + lro *longrunning.Operation +} + +// ImportTestCasesOperation returns a new ImportTestCasesOperation from a given name. +// The name must be that of a previously created ImportTestCasesOperation, possibly from a different process. +func (c *TestCasesClient) ImportTestCasesOperation(name string) *ImportTestCasesOperation { + return &ImportTestCasesOperation{ + 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 *ImportTestCasesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*cxpb.ImportTestCasesResponse, error) { + var resp cxpb.ImportTestCasesResponse + 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 *ImportTestCasesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*cxpb.ImportTestCasesResponse, error) { + var resp cxpb.ImportTestCasesResponse + 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 *ImportTestCasesOperation) Metadata() (*cxpb.ImportTestCasesMetadata, error) { + var meta cxpb.ImportTestCasesMetadata + 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 *ImportTestCasesOperation) 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 *ImportTestCasesOperation) Name() string { + return op.lro.Name() +} + +// RunTestCaseOperation manages a long-running operation from RunTestCase. +type RunTestCaseOperation struct { + lro *longrunning.Operation +} + +// RunTestCaseOperation returns a new RunTestCaseOperation from a given name. +// The name must be that of a previously created RunTestCaseOperation, possibly from a different process. +func (c *TestCasesClient) RunTestCaseOperation(name string) *RunTestCaseOperation { + return &RunTestCaseOperation{ + 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 *RunTestCaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*cxpb.RunTestCaseResponse, error) { + var resp cxpb.RunTestCaseResponse + 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 *RunTestCaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*cxpb.RunTestCaseResponse, error) { + var resp cxpb.RunTestCaseResponse + 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 *RunTestCaseOperation) Metadata() (*cxpb.RunTestCaseMetadata, error) { + var meta cxpb.RunTestCaseMetadata + 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 *RunTestCaseOperation) 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 *RunTestCaseOperation) Name() string { + return op.lro.Name() +} + +// TestCaseIterator manages a stream of *cxpb.TestCase. +type TestCaseIterator struct { + items []*cxpb.TestCase + 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 []*cxpb.TestCase, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TestCaseIterator) 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 *TestCaseIterator) Next() (*cxpb.TestCase, error) { + var item *cxpb.TestCase + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TestCaseIterator) bufLen() int { + return len(it.items) +} + +func (it *TestCaseIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TestCaseResultIterator manages a stream of *cxpb.TestCaseResult. +type TestCaseResultIterator struct { + items []*cxpb.TestCaseResult + 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 []*cxpb.TestCaseResult, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TestCaseResultIterator) 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 *TestCaseResultIterator) Next() (*cxpb.TestCaseResult, error) { + var item *cxpb.TestCaseResult + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TestCaseResultIterator) bufLen() int { + return len(it.items) +} + +func (it *TestCaseResultIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/cx/apiv3beta1/test_cases_client_example_test.go b/dialogflow/cx/apiv3beta1/test_cases_client_example_test.go new file mode 100644 index 000000000000..58b5a48a9471 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/test_cases_client_example_test.go @@ -0,0 +1,285 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package cx_test + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" + "google.golang.org/api/iterator" + cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" +) + +func ExampleNewTestCasesClient() { + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use client. + _ = c +} + +func ExampleTestCasesClient_ListTestCases() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + // import "google.golang.org/api/iterator" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ListTestCasesRequest{ + // TODO: Fill request struct fields. + } + it := c.ListTestCases(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleTestCasesClient_BatchDeleteTestCases() { + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.BatchDeleteTestCasesRequest{ + // TODO: Fill request struct fields. + } + err = c.BatchDeleteTestCases(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleTestCasesClient_GetTestCase() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.GetTestCaseRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetTestCase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_CreateTestCase() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.CreateTestCaseRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CreateTestCase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_UpdateTestCase() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.UpdateTestCaseRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateTestCase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_RunTestCase() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.RunTestCaseRequest{ + // TODO: Fill request struct fields. + } + op, err := c.RunTestCase(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_BatchRunTestCases() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.BatchRunTestCasesRequest{ + // TODO: Fill request struct fields. + } + op, err := c.BatchRunTestCases(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_CalculateCoverage() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.CalculateCoverageRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CalculateCoverage(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_ImportTestCases() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ImportTestCasesRequest{ + // TODO: Fill request struct fields. + } + op, err := c.ImportTestCases(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_ExportTestCases() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ExportTestCasesRequest{ + // TODO: Fill request struct fields. + } + op, err := c.ExportTestCases(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTestCasesClient_ListTestCaseResults() { + // import cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1" + // import "google.golang.org/api/iterator" + + ctx := context.Background() + c, err := cx.NewTestCasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &cxpb.ListTestCaseResultsRequest{ + // TODO: Fill request struct fields. + } + it := c.ListTestCaseResults(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/dlp/apiv2/doc.go b/dlp/apiv2/doc.go index de3889bdd85f..1e63de45c3a8 100644 --- a/dlp/apiv2/doc.go +++ b/dlp/apiv2/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/errorreporting/apiv1beta1/doc.go b/errorreporting/apiv1beta1/doc.go index 3e277d1cfde2..9566665846dc 100644 --- a/errorreporting/apiv1beta1/doc.go +++ b/errorreporting/apiv1beta1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/apiv1/admin/doc.go b/firestore/apiv1/admin/doc.go index 0ff7afa402f4..6fa45fa64177 100644 --- a/firestore/apiv1/admin/doc.go +++ b/firestore/apiv1/admin/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/apiv1/doc.go b/firestore/apiv1/doc.go index 44968d22f18e..bfa56d058b91 100644 --- a/firestore/apiv1/doc.go +++ b/firestore/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/functions/apiv1/doc.go b/functions/apiv1/doc.go index ad34359d225d..e2618037128c 100644 --- a/functions/apiv1/doc.go +++ b/functions/apiv1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/gaming/apiv1/doc.go b/gaming/apiv1/doc.go index c0e19e368578..a14faa1fee25 100644 --- a/gaming/apiv1/doc.go +++ b/gaming/apiv1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/gaming/apiv1beta/doc.go b/gaming/apiv1beta/doc.go index 74d26bbb62c0..1231d724d2ae 100644 --- a/gaming/apiv1beta/doc.go +++ b/gaming/apiv1beta/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/iam/credentials/apiv1/doc.go b/iam/credentials/apiv1/doc.go index 59b4be701e98..9f36fa7f792c 100644 --- a/iam/credentials/apiv1/doc.go +++ b/iam/credentials/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/iot/apiv1/doc.go b/iot/apiv1/doc.go index a8f122ab75ca..f0155aa202dd 100644 --- a/iot/apiv1/doc.go +++ b/iot/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/kms/apiv1/doc.go b/kms/apiv1/doc.go index 7bab4494e079..bec06b9c71ed 100644 --- a/kms/apiv1/doc.go +++ b/kms/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/language/apiv1/doc.go b/language/apiv1/doc.go index eac6d249a132..addb0e16d069 100644 --- a/language/apiv1/doc.go +++ b/language/apiv1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/language/apiv1beta2/doc.go b/language/apiv1beta2/doc.go index 6c4fc3baa7c0..e104d5dcb992 100644 --- a/language/apiv1beta2/doc.go +++ b/language/apiv1beta2/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/logging/apiv2/doc.go b/logging/apiv2/doc.go index c176d76276e2..3cac19fdc8f5 100644 --- a/logging/apiv2/doc.go +++ b/logging/apiv2/doc.go @@ -51,7 +51,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/longrunning/autogen/doc.go b/longrunning/autogen/doc.go index e579e06bb862..3f7df693a799 100644 --- a/longrunning/autogen/doc.go +++ b/longrunning/autogen/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/managedidentities/apiv1/doc.go b/managedidentities/apiv1/doc.go index 7232419b325b..5af01970c8ac 100644 --- a/managedidentities/apiv1/doc.go +++ b/managedidentities/apiv1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/memcache/apiv1/doc.go b/memcache/apiv1/doc.go index b0fa66949323..d9fc25b79b0e 100644 --- a/memcache/apiv1/doc.go +++ b/memcache/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/memcache/apiv1beta2/doc.go b/memcache/apiv1beta2/doc.go index f070e214aa43..de4d03237ab5 100644 --- a/memcache/apiv1beta2/doc.go +++ b/memcache/apiv1beta2/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/monitoring/apiv3/v2/doc.go b/monitoring/apiv3/v2/doc.go index 44fb2cc70817..4770ec795f0a 100644 --- a/monitoring/apiv3/v2/doc.go +++ b/monitoring/apiv3/v2/doc.go @@ -53,7 +53,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/monitoring/dashboard/apiv1/doc.go b/monitoring/dashboard/apiv1/doc.go index c5b237ca4721..42cbcfe87fbd 100644 --- a/monitoring/dashboard/apiv1/doc.go +++ b/monitoring/dashboard/apiv1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/notebooks/apiv1beta1/doc.go b/notebooks/apiv1beta1/doc.go index b1ba7673f4e9..35aad088c0fa 100644 --- a/notebooks/apiv1beta1/doc.go +++ b/notebooks/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/agentendpoint/apiv1/doc.go b/osconfig/agentendpoint/apiv1/doc.go index 33cb4f4eea0d..8e5f973dfcc8 100644 --- a/osconfig/agentendpoint/apiv1/doc.go +++ b/osconfig/agentendpoint/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/agentendpoint/apiv1beta/doc.go b/osconfig/agentendpoint/apiv1beta/doc.go index 1eaeb9305663..cc3ce35af8bd 100644 --- a/osconfig/agentendpoint/apiv1beta/doc.go +++ b/osconfig/agentendpoint/apiv1beta/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/apiv1/doc.go b/osconfig/apiv1/doc.go index d8d03bfa0ab0..71fb1e8d86f8 100644 --- a/osconfig/apiv1/doc.go +++ b/osconfig/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/apiv1beta/doc.go b/osconfig/apiv1beta/doc.go index a25baf5bbf38..127a5cb4d916 100644 --- a/osconfig/apiv1beta/doc.go +++ b/osconfig/apiv1beta/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/oslogin/apiv1/doc.go b/oslogin/apiv1/doc.go index 51c3f3817a2a..5ed7f06a8799 100644 --- a/oslogin/apiv1/doc.go +++ b/oslogin/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/oslogin/apiv1beta/doc.go b/oslogin/apiv1beta/doc.go index 80262788208b..9a81ba805bf5 100644 --- a/oslogin/apiv1beta/doc.go +++ b/oslogin/apiv1beta/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/phishingprotection/apiv1beta1/doc.go b/phishingprotection/apiv1beta1/doc.go index ac1cd89680dd..6427c9d84d42 100644 --- a/phishingprotection/apiv1beta1/doc.go +++ b/phishingprotection/apiv1beta1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/policytroubleshooter/apiv1/doc.go b/policytroubleshooter/apiv1/doc.go index 7f09c6279fa5..a6be59e468f8 100644 --- a/policytroubleshooter/apiv1/doc.go +++ b/policytroubleshooter/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/pubsub/apiv1/doc.go b/pubsub/apiv1/doc.go index d62115000f93..e952310d0b79 100644 --- a/pubsub/apiv1/doc.go +++ b/pubsub/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/pubsublite/apiv1/doc.go b/pubsublite/apiv1/doc.go index c60a3fa50a2a..14c54df9914f 100644 --- a/pubsublite/apiv1/doc.go +++ b/pubsublite/apiv1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recaptchaenterprise/apiv1/doc.go b/recaptchaenterprise/apiv1/doc.go index d57860dcb67f..e4bfbe8ae46c 100644 --- a/recaptchaenterprise/apiv1/doc.go +++ b/recaptchaenterprise/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recaptchaenterprise/apiv1beta1/doc.go b/recaptchaenterprise/apiv1beta1/doc.go index acf909ef0f23..fbbf26a68e57 100644 --- a/recaptchaenterprise/apiv1beta1/doc.go +++ b/recaptchaenterprise/apiv1beta1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1/doc.go b/recommender/apiv1/doc.go index aa82f0fea1c9..a3d82b108f93 100644 --- a/recommender/apiv1/doc.go +++ b/recommender/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1beta1/doc.go b/recommender/apiv1beta1/doc.go index 1382d6e1724e..098a36185592 100644 --- a/recommender/apiv1beta1/doc.go +++ b/recommender/apiv1beta1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/redis/apiv1/doc.go b/redis/apiv1/doc.go index 2313260c825f..e000afee51e9 100644 --- a/redis/apiv1/doc.go +++ b/redis/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/redis/apiv1beta1/doc.go b/redis/apiv1beta1/doc.go index 2442aded8b8f..8b835517a7fb 100644 --- a/redis/apiv1beta1/doc.go +++ b/redis/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/resourcemanager/apiv2/doc.go b/resourcemanager/apiv2/doc.go index a51192b4e991..870036b4d9fd 100644 --- a/resourcemanager/apiv2/doc.go +++ b/resourcemanager/apiv2/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/retail/apiv2/doc.go b/retail/apiv2/doc.go index 21c60a211cdb..3397c10b71f3 100644 --- a/retail/apiv2/doc.go +++ b/retail/apiv2/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/scheduler/apiv1/doc.go b/scheduler/apiv1/doc.go index a7a272fbf6ab..7b0aba6fd942 100644 --- a/scheduler/apiv1/doc.go +++ b/scheduler/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/scheduler/apiv1beta1/doc.go b/scheduler/apiv1beta1/doc.go index 52a9210a1a94..b6a8552825a6 100644 --- a/scheduler/apiv1beta1/doc.go +++ b/scheduler/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/secretmanager/apiv1/doc.go b/secretmanager/apiv1/doc.go index 99c9d75ccb0f..e591484d1fd3 100644 --- a/secretmanager/apiv1/doc.go +++ b/secretmanager/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/secretmanager/apiv1beta1/doc.go b/secretmanager/apiv1beta1/doc.go index c410a240c6e0..408f3fe8cbd7 100644 --- a/secretmanager/apiv1beta1/doc.go +++ b/secretmanager/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/security/privateca/apiv1beta1/doc.go b/security/privateca/apiv1beta1/doc.go index 8ff23bde7986..8e2d769dd963 100644 --- a/security/privateca/apiv1beta1/doc.go +++ b/security/privateca/apiv1beta1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1/doc.go b/securitycenter/apiv1/doc.go index b6be01ae90db..7b6771083551 100644 --- a/securitycenter/apiv1/doc.go +++ b/securitycenter/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1beta1/doc.go b/securitycenter/apiv1beta1/doc.go index f5ca9a419554..659200445833 100644 --- a/securitycenter/apiv1beta1/doc.go +++ b/securitycenter/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1p1beta1/doc.go b/securitycenter/apiv1p1beta1/doc.go index 6652195d1515..92d3e7205690 100644 --- a/securitycenter/apiv1p1beta1/doc.go +++ b/securitycenter/apiv1p1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/settings/apiv1beta1/doc.go b/securitycenter/settings/apiv1beta1/doc.go index d0e6a0fdde21..223b14b8cc80 100644 --- a/securitycenter/settings/apiv1beta1/doc.go +++ b/securitycenter/settings/apiv1beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/servicedirectory/apiv1/doc.go b/servicedirectory/apiv1/doc.go index a4755b286a1d..933e706f076c 100644 --- a/servicedirectory/apiv1/doc.go +++ b/servicedirectory/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/servicedirectory/apiv1beta1/doc.go b/servicedirectory/apiv1beta1/doc.go index 6b3b54285ed1..2564eecb4fcb 100644 --- a/servicedirectory/apiv1beta1/doc.go +++ b/servicedirectory/apiv1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/admin/database/apiv1/doc.go b/spanner/admin/database/apiv1/doc.go index 307874ed766c..29a858af1394 100644 --- a/spanner/admin/database/apiv1/doc.go +++ b/spanner/admin/database/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/admin/instance/apiv1/doc.go b/spanner/admin/instance/apiv1/doc.go index d5875432a4db..e2b5801a0b28 100644 --- a/spanner/admin/instance/apiv1/doc.go +++ b/spanner/admin/instance/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/apiv1/doc.go b/spanner/apiv1/doc.go index 66be1803b633..accfb9121ebb 100644 --- a/spanner/apiv1/doc.go +++ b/spanner/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/speech/apiv1/doc.go b/speech/apiv1/doc.go index 739cbabdb94d..6c702b45e598 100644 --- a/speech/apiv1/doc.go +++ b/speech/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/speech/apiv1p1beta1/doc.go b/speech/apiv1p1beta1/doc.go index e0771e2c4349..671de574fc7e 100644 --- a/speech/apiv1p1beta1/doc.go +++ b/speech/apiv1p1beta1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/talent/apiv4/doc.go b/talent/apiv4/doc.go index bc918e2c3a45..089efd54d45d 100644 --- a/talent/apiv4/doc.go +++ b/talent/apiv4/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/talent/apiv4beta1/doc.go b/talent/apiv4beta1/doc.go index f37c8be6f21c..39e4f121cfac 100644 --- a/talent/apiv4beta1/doc.go +++ b/talent/apiv4beta1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/texttospeech/apiv1/doc.go b/texttospeech/apiv1/doc.go index 7c1647798483..43cef60f98f7 100644 --- a/texttospeech/apiv1/doc.go +++ b/texttospeech/apiv1/doc.go @@ -49,7 +49,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/trace/apiv1/doc.go b/trace/apiv1/doc.go index 3e39a1440df2..7b82a8c256e6 100644 --- a/trace/apiv1/doc.go +++ b/trace/apiv1/doc.go @@ -52,7 +52,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/trace/apiv2/doc.go b/trace/apiv2/doc.go index f72ee2442191..f55d76ddb215 100644 --- a/trace/apiv2/doc.go +++ b/trace/apiv2/doc.go @@ -52,7 +52,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/translate/apiv3/doc.go b/translate/apiv3/doc.go index 3b9202f327dc..4eee192e4269 100644 --- a/translate/apiv3/doc.go +++ b/translate/apiv3/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/video/transcoder/apiv1beta1/doc.go b/video/transcoder/apiv1beta1/doc.go index a76798c40884..c16be15d1c5e 100644 --- a/video/transcoder/apiv1beta1/doc.go +++ b/video/transcoder/apiv1beta1/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/videointelligence/apiv1/doc.go b/videointelligence/apiv1/doc.go index bde24c2208a8..20d2601ceba2 100644 --- a/videointelligence/apiv1/doc.go +++ b/videointelligence/apiv1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/videointelligence/apiv1beta2/doc.go b/videointelligence/apiv1beta2/doc.go index a072e6d0db9e..45a344283520 100644 --- a/videointelligence/apiv1beta2/doc.go +++ b/videointelligence/apiv1beta2/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/vision/apiv1/doc.go b/vision/apiv1/doc.go index 7c0e9bf7d278..cd7bd978e2ff 100644 --- a/vision/apiv1/doc.go +++ b/vision/apiv1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/vision/apiv1p1beta1/doc.go b/vision/apiv1p1beta1/doc.go index 56af89deef43..6776bfcc6c53 100644 --- a/vision/apiv1p1beta1/doc.go +++ b/vision/apiv1p1beta1/doc.go @@ -50,7 +50,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/webrisk/apiv1/doc.go b/webrisk/apiv1/doc.go index a3c87442d48b..157253a680f7 100644 --- a/webrisk/apiv1/doc.go +++ b/webrisk/apiv1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/webrisk/apiv1beta1/doc.go b/webrisk/apiv1beta1/doc.go index 554d583a3112..a6771be28b69 100644 --- a/webrisk/apiv1beta1/doc.go +++ b/webrisk/apiv1beta1/doc.go @@ -46,7 +46,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/websecurityscanner/apiv1/doc.go b/websecurityscanner/apiv1/doc.go index 8ee51ca6ea57..65bcbcc0be40 100644 --- a/websecurityscanner/apiv1/doc.go +++ b/websecurityscanner/apiv1/doc.go @@ -48,7 +48,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/workflows/apiv1beta/doc.go b/workflows/apiv1beta/doc.go index 487fa19390be..3e08b2c676a1 100644 --- a/workflows/apiv1beta/doc.go +++ b/workflows/apiv1beta/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/workflows/executions/apiv1beta/doc.go b/workflows/executions/apiv1beta/doc.go index 9ba1b361073a..daeb70c923b1 100644 --- a/workflows/executions/apiv1beta/doc.go +++ b/workflows/executions/apiv1beta/doc.go @@ -44,7 +44,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20210120" +const versionClient = "20210121" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx)