diff --git a/samples/generated/v3/agents.create_agent.js b/samples/generated/v3/agents.create_agent.js index 4f2f20d2..068cddce 100644 --- a/samples/generated/v3/agents.create_agent.js +++ b/samples/generated/v3/agents.create_agent.js @@ -23,6 +23,9 @@ function main(parent, agent) { // [START dialogflow_v3_generated_Agents_CreateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.delete_agent.js b/samples/generated/v3/agents.delete_agent.js index c12d28a6..2c90d044 100644 --- a/samples/generated/v3/agents.delete_agent.js +++ b/samples/generated/v3/agents.delete_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_DeleteAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.export_agent.js b/samples/generated/v3/agents.export_agent.js index f028c286..8734d341 100644 --- a/samples/generated/v3/agents.export_agent.js +++ b/samples/generated/v3/agents.export_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_ExportAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.get_agent.js b/samples/generated/v3/agents.get_agent.js index 9a2c086d..404dd14f 100644 --- a/samples/generated/v3/agents.get_agent.js +++ b/samples/generated/v3/agents.get_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_GetAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.get_agent_validation_result.js b/samples/generated/v3/agents.get_agent_validation_result.js index a32684dd..2968c672 100644 --- a/samples/generated/v3/agents.get_agent_validation_result.js +++ b/samples/generated/v3/agents.get_agent_validation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_GetAgentValidationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.list_agents.js b/samples/generated/v3/agents.list_agents.js index d07b40ae..5b8b6ccc 100644 --- a/samples/generated/v3/agents.list_agents.js +++ b/samples/generated/v3/agents.list_agents.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Agents_ListAgents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.restore_agent.js b/samples/generated/v3/agents.restore_agent.js index 841939f4..52f91d3f 100644 --- a/samples/generated/v3/agents.restore_agent.js +++ b/samples/generated/v3/agents.restore_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_RestoreAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.update_agent.js b/samples/generated/v3/agents.update_agent.js index d48ef831..60380732 100644 --- a/samples/generated/v3/agents.update_agent.js +++ b/samples/generated/v3/agents.update_agent.js @@ -23,6 +23,9 @@ function main(agent) { // [START dialogflow_v3_generated_Agents_UpdateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/agents.validate_agent.js b/samples/generated/v3/agents.validate_agent.js index 987a8d0b..e156e0a9 100644 --- a/samples/generated/v3/agents.validate_agent.js +++ b/samples/generated/v3/agents.validate_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Agents_ValidateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/changelogs.get_changelog.js b/samples/generated/v3/changelogs.get_changelog.js index 968481ef..15c5f609 100644 --- a/samples/generated/v3/changelogs.get_changelog.js +++ b/samples/generated/v3/changelogs.get_changelog.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Changelogs_GetChangelog_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/changelogs.list_changelogs.js b/samples/generated/v3/changelogs.list_changelogs.js index 3b288a77..100b4856 100644 --- a/samples/generated/v3/changelogs.list_changelogs.js +++ b/samples/generated/v3/changelogs.list_changelogs.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Changelogs_ListChangelogs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/deployments.get_deployment.js b/samples/generated/v3/deployments.get_deployment.js index ce7e3de4..d989c076 100644 --- a/samples/generated/v3/deployments.get_deployment.js +++ b/samples/generated/v3/deployments.get_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Deployments_GetDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/deployments.list_deployments.js b/samples/generated/v3/deployments.list_deployments.js index 8f39ef5f..159234e1 100644 --- a/samples/generated/v3/deployments.list_deployments.js +++ b/samples/generated/v3/deployments.list_deployments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Deployments_ListDeployments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/entity_types.create_entity_type.js b/samples/generated/v3/entity_types.create_entity_type.js index 1f874148..4f52dfae 100644 --- a/samples/generated/v3/entity_types.create_entity_type.js +++ b/samples/generated/v3/entity_types.create_entity_type.js @@ -23,6 +23,9 @@ function main(parent, entityType) { // [START dialogflow_v3_generated_EntityTypes_CreateEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/entity_types.delete_entity_type.js b/samples/generated/v3/entity_types.delete_entity_type.js index d2b1011b..6f87a710 100644 --- a/samples/generated/v3/entity_types.delete_entity_type.js +++ b/samples/generated/v3/entity_types.delete_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_EntityTypes_DeleteEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/entity_types.get_entity_type.js b/samples/generated/v3/entity_types.get_entity_type.js index 4cf13524..32b72f8f 100644 --- a/samples/generated/v3/entity_types.get_entity_type.js +++ b/samples/generated/v3/entity_types.get_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_EntityTypes_GetEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/entity_types.list_entity_types.js b/samples/generated/v3/entity_types.list_entity_types.js index 843aa732..454acfdd 100644 --- a/samples/generated/v3/entity_types.list_entity_types.js +++ b/samples/generated/v3/entity_types.list_entity_types.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_EntityTypes_ListEntityTypes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/entity_types.update_entity_type.js b/samples/generated/v3/entity_types.update_entity_type.js index 567407c0..ac550115 100644 --- a/samples/generated/v3/entity_types.update_entity_type.js +++ b/samples/generated/v3/entity_types.update_entity_type.js @@ -23,6 +23,9 @@ function main(entityType) { // [START dialogflow_v3_generated_EntityTypes_UpdateEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.create_environment.js b/samples/generated/v3/environments.create_environment.js index 4aca1be9..f0534fba 100644 --- a/samples/generated/v3/environments.create_environment.js +++ b/samples/generated/v3/environments.create_environment.js @@ -23,6 +23,9 @@ function main(parent, environment) { // [START dialogflow_v3_generated_Environments_CreateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.delete_environment.js b/samples/generated/v3/environments.delete_environment.js index 696ba089..2b6c3259 100644 --- a/samples/generated/v3/environments.delete_environment.js +++ b/samples/generated/v3/environments.delete_environment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Environments_DeleteEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.deploy_flow.js b/samples/generated/v3/environments.deploy_flow.js index febe6b4a..6806abf9 100644 --- a/samples/generated/v3/environments.deploy_flow.js +++ b/samples/generated/v3/environments.deploy_flow.js @@ -23,6 +23,9 @@ function main(environment, flowVersion) { // [START dialogflow_v3_generated_Environments_DeployFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.get_environment.js b/samples/generated/v3/environments.get_environment.js index 2cc033bb..2e0fb94e 100644 --- a/samples/generated/v3/environments.get_environment.js +++ b/samples/generated/v3/environments.get_environment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Environments_GetEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.list_continuous_test_results.js b/samples/generated/v3/environments.list_continuous_test_results.js index b030e8c2..36e67092 100644 --- a/samples/generated/v3/environments.list_continuous_test_results.js +++ b/samples/generated/v3/environments.list_continuous_test_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Environments_ListContinuousTestResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.list_environments.js b/samples/generated/v3/environments.list_environments.js index 3edc87b7..aab6e0a8 100644 --- a/samples/generated/v3/environments.list_environments.js +++ b/samples/generated/v3/environments.list_environments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Environments_ListEnvironments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.lookup_environment_history.js b/samples/generated/v3/environments.lookup_environment_history.js index dba4d1a5..bb515966 100644 --- a/samples/generated/v3/environments.lookup_environment_history.js +++ b/samples/generated/v3/environments.lookup_environment_history.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Environments_LookupEnvironmentHistory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.run_continuous_test.js b/samples/generated/v3/environments.run_continuous_test.js index 00dc041e..a0c3b379 100644 --- a/samples/generated/v3/environments.run_continuous_test.js +++ b/samples/generated/v3/environments.run_continuous_test.js @@ -23,6 +23,9 @@ function main(environment) { // [START dialogflow_v3_generated_Environments_RunContinuousTest_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/environments.update_environment.js b/samples/generated/v3/environments.update_environment.js index 27264946..d9533660 100644 --- a/samples/generated/v3/environments.update_environment.js +++ b/samples/generated/v3/environments.update_environment.js @@ -23,6 +23,9 @@ function main(environment, updateMask) { // [START dialogflow_v3_generated_Environments_UpdateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.create_experiment.js b/samples/generated/v3/experiments.create_experiment.js index 468dd2f2..90afa7ff 100644 --- a/samples/generated/v3/experiments.create_experiment.js +++ b/samples/generated/v3/experiments.create_experiment.js @@ -23,6 +23,9 @@ function main(parent, experiment) { // [START dialogflow_v3_generated_Experiments_CreateExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.delete_experiment.js b/samples/generated/v3/experiments.delete_experiment.js index 27c6a8b2..b5c977c6 100644 --- a/samples/generated/v3/experiments.delete_experiment.js +++ b/samples/generated/v3/experiments.delete_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Experiments_DeleteExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.get_experiment.js b/samples/generated/v3/experiments.get_experiment.js index 7df61c37..0c09e13f 100644 --- a/samples/generated/v3/experiments.get_experiment.js +++ b/samples/generated/v3/experiments.get_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Experiments_GetExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.list_experiments.js b/samples/generated/v3/experiments.list_experiments.js index bf697de8..c4b02b66 100644 --- a/samples/generated/v3/experiments.list_experiments.js +++ b/samples/generated/v3/experiments.list_experiments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Experiments_ListExperiments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.start_experiment.js b/samples/generated/v3/experiments.start_experiment.js index a2cb124b..3e44e9d2 100644 --- a/samples/generated/v3/experiments.start_experiment.js +++ b/samples/generated/v3/experiments.start_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Experiments_StartExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.stop_experiment.js b/samples/generated/v3/experiments.stop_experiment.js index ba594470..f1ab9f8d 100644 --- a/samples/generated/v3/experiments.stop_experiment.js +++ b/samples/generated/v3/experiments.stop_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Experiments_StopExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/experiments.update_experiment.js b/samples/generated/v3/experiments.update_experiment.js index 927188da..c0d78556 100644 --- a/samples/generated/v3/experiments.update_experiment.js +++ b/samples/generated/v3/experiments.update_experiment.js @@ -23,6 +23,9 @@ function main(experiment, updateMask) { // [START dialogflow_v3_generated_Experiments_UpdateExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.create_flow.js b/samples/generated/v3/flows.create_flow.js index 5eb34931..543e87f6 100644 --- a/samples/generated/v3/flows.create_flow.js +++ b/samples/generated/v3/flows.create_flow.js @@ -23,6 +23,9 @@ function main(parent, flow) { // [START dialogflow_v3_generated_Flows_CreateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.delete_flow.js b/samples/generated/v3/flows.delete_flow.js index 5e88bfbc..438ec439 100644 --- a/samples/generated/v3/flows.delete_flow.js +++ b/samples/generated/v3/flows.delete_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_DeleteFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.export_flow.js b/samples/generated/v3/flows.export_flow.js index dc6ad6cb..c3cea869 100644 --- a/samples/generated/v3/flows.export_flow.js +++ b/samples/generated/v3/flows.export_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_ExportFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.get_flow.js b/samples/generated/v3/flows.get_flow.js index f19e66eb..c067cf79 100644 --- a/samples/generated/v3/flows.get_flow.js +++ b/samples/generated/v3/flows.get_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_GetFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.get_flow_validation_result.js b/samples/generated/v3/flows.get_flow_validation_result.js index be625958..9d34c29d 100644 --- a/samples/generated/v3/flows.get_flow_validation_result.js +++ b/samples/generated/v3/flows.get_flow_validation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_GetFlowValidationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.import_flow.js b/samples/generated/v3/flows.import_flow.js index a283e263..6fb24e55 100644 --- a/samples/generated/v3/flows.import_flow.js +++ b/samples/generated/v3/flows.import_flow.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Flows_ImportFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.list_flows.js b/samples/generated/v3/flows.list_flows.js index e3fd86fd..192659ca 100644 --- a/samples/generated/v3/flows.list_flows.js +++ b/samples/generated/v3/flows.list_flows.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Flows_ListFlows_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.train_flow.js b/samples/generated/v3/flows.train_flow.js index d7853b73..eb7bc7a2 100644 --- a/samples/generated/v3/flows.train_flow.js +++ b/samples/generated/v3/flows.train_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_TrainFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.update_flow.js b/samples/generated/v3/flows.update_flow.js index 8b391f8a..bf593c75 100644 --- a/samples/generated/v3/flows.update_flow.js +++ b/samples/generated/v3/flows.update_flow.js @@ -23,6 +23,9 @@ function main(flow) { // [START dialogflow_v3_generated_Flows_UpdateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/flows.validate_flow.js b/samples/generated/v3/flows.validate_flow.js index ba65eb69..66b5d9bf 100644 --- a/samples/generated/v3/flows.validate_flow.js +++ b/samples/generated/v3/flows.validate_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Flows_ValidateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/intents.create_intent.js b/samples/generated/v3/intents.create_intent.js index bba81387..946e7ade 100644 --- a/samples/generated/v3/intents.create_intent.js +++ b/samples/generated/v3/intents.create_intent.js @@ -23,6 +23,9 @@ function main(parent, intent) { // [START dialogflow_v3_generated_Intents_CreateIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/intents.delete_intent.js b/samples/generated/v3/intents.delete_intent.js index aa63d2f9..65a3032f 100644 --- a/samples/generated/v3/intents.delete_intent.js +++ b/samples/generated/v3/intents.delete_intent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Intents_DeleteIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/intents.get_intent.js b/samples/generated/v3/intents.get_intent.js index 14652ab9..722292fa 100644 --- a/samples/generated/v3/intents.get_intent.js +++ b/samples/generated/v3/intents.get_intent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Intents_GetIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/intents.list_intents.js b/samples/generated/v3/intents.list_intents.js index 59b84a4e..6c1cb178 100644 --- a/samples/generated/v3/intents.list_intents.js +++ b/samples/generated/v3/intents.list_intents.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Intents_ListIntents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/intents.update_intent.js b/samples/generated/v3/intents.update_intent.js index 2071272a..bd87f38f 100644 --- a/samples/generated/v3/intents.update_intent.js +++ b/samples/generated/v3/intents.update_intent.js @@ -23,6 +23,9 @@ function main(intent) { // [START dialogflow_v3_generated_Intents_UpdateIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/pages.create_page.js b/samples/generated/v3/pages.create_page.js index f1fd0cd6..0b9d9431 100644 --- a/samples/generated/v3/pages.create_page.js +++ b/samples/generated/v3/pages.create_page.js @@ -23,6 +23,9 @@ function main(parent, page) { // [START dialogflow_v3_generated_Pages_CreatePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/pages.delete_page.js b/samples/generated/v3/pages.delete_page.js index f28e94e2..73102472 100644 --- a/samples/generated/v3/pages.delete_page.js +++ b/samples/generated/v3/pages.delete_page.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Pages_DeletePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/pages.get_page.js b/samples/generated/v3/pages.get_page.js index f2353210..371c9d6b 100644 --- a/samples/generated/v3/pages.get_page.js +++ b/samples/generated/v3/pages.get_page.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Pages_GetPage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/pages.list_pages.js b/samples/generated/v3/pages.list_pages.js index be8aa40c..7d559331 100644 --- a/samples/generated/v3/pages.list_pages.js +++ b/samples/generated/v3/pages.list_pages.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Pages_ListPages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/pages.update_page.js b/samples/generated/v3/pages.update_page.js index eee96034..dd11b1db 100644 --- a/samples/generated/v3/pages.update_page.js +++ b/samples/generated/v3/pages.update_page.js @@ -23,6 +23,9 @@ function main(page) { // [START dialogflow_v3_generated_Pages_UpdatePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/security_settings_service.create_security_settings.js b/samples/generated/v3/security_settings_service.create_security_settings.js index 92cf3f66..2a02371b 100644 --- a/samples/generated/v3/security_settings_service.create_security_settings.js +++ b/samples/generated/v3/security_settings_service.create_security_settings.js @@ -23,6 +23,9 @@ function main(parent, securitySettings) { // [START dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/security_settings_service.delete_security_settings.js b/samples/generated/v3/security_settings_service.delete_security_settings.js index 92b2c173..28e8bc06 100644 --- a/samples/generated/v3/security_settings_service.delete_security_settings.js +++ b/samples/generated/v3/security_settings_service.delete_security_settings.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/security_settings_service.get_security_settings.js b/samples/generated/v3/security_settings_service.get_security_settings.js index 0d9f5488..63114556 100644 --- a/samples/generated/v3/security_settings_service.get_security_settings.js +++ b/samples/generated/v3/security_settings_service.get_security_settings.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/security_settings_service.list_security_settings.js b/samples/generated/v3/security_settings_service.list_security_settings.js index afb9570f..510fc9ae 100644 --- a/samples/generated/v3/security_settings_service.list_security_settings.js +++ b/samples/generated/v3/security_settings_service.list_security_settings.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/security_settings_service.update_security_settings.js b/samples/generated/v3/security_settings_service.update_security_settings.js index 0c67b0c8..9aafb915 100644 --- a/samples/generated/v3/security_settings_service.update_security_settings.js +++ b/samples/generated/v3/security_settings_service.update_security_settings.js @@ -23,6 +23,9 @@ function main(securitySettings, updateMask) { // [START dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/session_entity_types.create_session_entity_type.js b/samples/generated/v3/session_entity_types.create_session_entity_type.js index 620588dc..36acc528 100644 --- a/samples/generated/v3/session_entity_types.create_session_entity_type.js +++ b/samples/generated/v3/session_entity_types.create_session_entity_type.js @@ -23,6 +23,9 @@ function main(parent, sessionEntityType) { // [START dialogflow_v3_generated_SessionEntityTypes_CreateSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/session_entity_types.delete_session_entity_type.js b/samples/generated/v3/session_entity_types.delete_session_entity_type.js index 3eed3a68..d3faf189 100644 --- a/samples/generated/v3/session_entity_types.delete_session_entity_type.js +++ b/samples/generated/v3/session_entity_types.delete_session_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/session_entity_types.get_session_entity_type.js b/samples/generated/v3/session_entity_types.get_session_entity_type.js index 0c077261..e16ac97b 100644 --- a/samples/generated/v3/session_entity_types.get_session_entity_type.js +++ b/samples/generated/v3/session_entity_types.get_session_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/session_entity_types.list_session_entity_types.js b/samples/generated/v3/session_entity_types.list_session_entity_types.js index 9541e200..f3c22923 100644 --- a/samples/generated/v3/session_entity_types.list_session_entity_types.js +++ b/samples/generated/v3/session_entity_types.list_session_entity_types.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/session_entity_types.update_session_entity_type.js b/samples/generated/v3/session_entity_types.update_session_entity_type.js index 61d62239..dbeba796 100644 --- a/samples/generated/v3/session_entity_types.update_session_entity_type.js +++ b/samples/generated/v3/session_entity_types.update_session_entity_type.js @@ -23,6 +23,9 @@ function main(sessionEntityType) { // [START dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/sessions.detect_intent.js b/samples/generated/v3/sessions.detect_intent.js index 701f0043..b377084e 100644 --- a/samples/generated/v3/sessions.detect_intent.js +++ b/samples/generated/v3/sessions.detect_intent.js @@ -23,6 +23,9 @@ function main(session, queryInput) { // [START dialogflow_v3_generated_Sessions_DetectIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/sessions.fulfill_intent.js b/samples/generated/v3/sessions.fulfill_intent.js index 717d5bce..e4510801 100644 --- a/samples/generated/v3/sessions.fulfill_intent.js +++ b/samples/generated/v3/sessions.fulfill_intent.js @@ -23,6 +23,9 @@ function main() { // [START dialogflow_v3_generated_Sessions_FulfillIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/sessions.match_intent.js b/samples/generated/v3/sessions.match_intent.js index 083ad12c..2ddb3848 100644 --- a/samples/generated/v3/sessions.match_intent.js +++ b/samples/generated/v3/sessions.match_intent.js @@ -23,6 +23,9 @@ function main(session, queryInput) { // [START dialogflow_v3_generated_Sessions_MatchIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/sessions.streaming_detect_intent.js b/samples/generated/v3/sessions.streaming_detect_intent.js index 7334a8e9..5e0173aa 100644 --- a/samples/generated/v3/sessions.streaming_detect_intent.js +++ b/samples/generated/v3/sessions.streaming_detect_intent.js @@ -23,6 +23,9 @@ function main(queryInput) { // [START dialogflow_v3_generated_Sessions_StreamingDetectIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 73f16e8c..628c4074 100644 --- a/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -290,7 +290,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -342,7 +342,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -386,7 +386,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -430,7 +430,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 88, "type": "FULL" } ], @@ -482,7 +482,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -522,7 +522,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -570,7 +570,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -662,7 +662,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -754,7 +754,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -802,7 +802,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -894,7 +894,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1022,7 +1022,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1062,7 +1062,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1110,7 +1110,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1150,7 +1150,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1198,7 +1198,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1242,7 +1242,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1290,7 +1290,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1330,7 +1330,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -1374,7 +1374,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1418,7 +1418,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1458,7 +1458,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1498,7 +1498,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1538,7 +1538,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -1586,7 +1586,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -1630,7 +1630,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -1682,7 +1682,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1726,7 +1726,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -1774,7 +1774,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -1814,7 +1814,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1858,7 +1858,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1902,7 +1902,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -1954,7 +1954,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -2002,7 +2002,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -2058,7 +2058,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -2102,7 +2102,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -2150,7 +2150,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -2198,7 +2198,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2238,7 +2238,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 88, "type": "FULL" } ], @@ -2290,7 +2290,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -2334,7 +2334,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -2382,7 +2382,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -2430,7 +2430,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -2474,7 +2474,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2518,7 +2518,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2558,7 +2558,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -2602,7 +2602,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -2650,7 +2650,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2690,7 +2690,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -2738,7 +2738,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2778,7 +2778,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -2822,7 +2822,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -2866,7 +2866,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2906,7 +2906,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -2958,7 +2958,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 90, "type": "FULL" } ], @@ -3014,7 +3014,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -3062,7 +3062,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -3110,7 +3110,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -3162,7 +3162,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -3206,7 +3206,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3246,7 +3246,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -3290,7 +3290,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -3334,7 +3334,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -3378,7 +3378,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -3426,7 +3426,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -3470,7 +3470,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -3518,7 +3518,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 82, "type": "FULL" } ], @@ -3570,7 +3570,7 @@ "segments": [ { "start": 25, - "end": 86, + "end": 89, "type": "FULL" } ], @@ -3622,7 +3622,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3662,7 +3662,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -3714,7 +3714,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -3758,7 +3758,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -3806,7 +3806,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -3854,7 +3854,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -3898,7 +3898,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -3946,7 +3946,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3986,7 +3986,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -4030,7 +4030,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -4074,7 +4074,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -4114,7 +4114,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -4158,7 +4158,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -4206,7 +4206,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -4254,7 +4254,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -4294,7 +4294,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -4338,7 +4338,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -4382,7 +4382,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], diff --git a/samples/generated/v3/test_cases.batch_delete_test_cases.js b/samples/generated/v3/test_cases.batch_delete_test_cases.js index 0c9177e2..9a693427 100644 --- a/samples/generated/v3/test_cases.batch_delete_test_cases.js +++ b/samples/generated/v3/test_cases.batch_delete_test_cases.js @@ -23,6 +23,9 @@ function main(parent, names) { // [START dialogflow_v3_generated_TestCases_BatchDeleteTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.batch_run_test_cases.js b/samples/generated/v3/test_cases.batch_run_test_cases.js index f0a15bc2..d64aa077 100644 --- a/samples/generated/v3/test_cases.batch_run_test_cases.js +++ b/samples/generated/v3/test_cases.batch_run_test_cases.js @@ -23,6 +23,9 @@ function main(parent, testCases) { // [START dialogflow_v3_generated_TestCases_BatchRunTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.calculate_coverage.js b/samples/generated/v3/test_cases.calculate_coverage.js index ce077bb4..c6ab071c 100644 --- a/samples/generated/v3/test_cases.calculate_coverage.js +++ b/samples/generated/v3/test_cases.calculate_coverage.js @@ -23,6 +23,9 @@ function main(agent, type) { // [START dialogflow_v3_generated_TestCases_CalculateCoverage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.create_test_case.js b/samples/generated/v3/test_cases.create_test_case.js index 60a2d331..1afb269c 100644 --- a/samples/generated/v3/test_cases.create_test_case.js +++ b/samples/generated/v3/test_cases.create_test_case.js @@ -23,6 +23,9 @@ function main(parent, testCase) { // [START dialogflow_v3_generated_TestCases_CreateTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.export_test_cases.js b/samples/generated/v3/test_cases.export_test_cases.js index 4443f8a9..9a853a98 100644 --- a/samples/generated/v3/test_cases.export_test_cases.js +++ b/samples/generated/v3/test_cases.export_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_TestCases_ExportTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.get_test_case.js b/samples/generated/v3/test_cases.get_test_case.js index c727e27e..22386f78 100644 --- a/samples/generated/v3/test_cases.get_test_case.js +++ b/samples/generated/v3/test_cases.get_test_case.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_TestCases_GetTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.get_test_case_result.js b/samples/generated/v3/test_cases.get_test_case_result.js index 487fefe3..f335ad62 100644 --- a/samples/generated/v3/test_cases.get_test_case_result.js +++ b/samples/generated/v3/test_cases.get_test_case_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_TestCases_GetTestCaseResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.import_test_cases.js b/samples/generated/v3/test_cases.import_test_cases.js index ef61a4aa..35bbd594 100644 --- a/samples/generated/v3/test_cases.import_test_cases.js +++ b/samples/generated/v3/test_cases.import_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_TestCases_ImportTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.list_test_case_results.js b/samples/generated/v3/test_cases.list_test_case_results.js index e3d0f298..f31d9648 100644 --- a/samples/generated/v3/test_cases.list_test_case_results.js +++ b/samples/generated/v3/test_cases.list_test_case_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_TestCases_ListTestCaseResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.list_test_cases.js b/samples/generated/v3/test_cases.list_test_cases.js index f35e2ec6..3467f5ad 100644 --- a/samples/generated/v3/test_cases.list_test_cases.js +++ b/samples/generated/v3/test_cases.list_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_TestCases_ListTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.run_test_case.js b/samples/generated/v3/test_cases.run_test_case.js index fc3f4b22..c8528cc0 100644 --- a/samples/generated/v3/test_cases.run_test_case.js +++ b/samples/generated/v3/test_cases.run_test_case.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_TestCases_RunTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/test_cases.update_test_case.js b/samples/generated/v3/test_cases.update_test_case.js index be671a8c..67f8c0c2 100644 --- a/samples/generated/v3/test_cases.update_test_case.js +++ b/samples/generated/v3/test_cases.update_test_case.js @@ -23,6 +23,9 @@ function main(testCase, updateMask) { // [START dialogflow_v3_generated_TestCases_UpdateTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/transition_route_groups.create_transition_route_group.js b/samples/generated/v3/transition_route_groups.create_transition_route_group.js index f57f7151..fe335428 100644 --- a/samples/generated/v3/transition_route_groups.create_transition_route_group.js +++ b/samples/generated/v3/transition_route_groups.create_transition_route_group.js @@ -23,6 +23,9 @@ function main(parent, transitionRouteGroup) { // [START dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/transition_route_groups.delete_transition_route_group.js b/samples/generated/v3/transition_route_groups.delete_transition_route_group.js index e559e299..9b54a3dc 100644 --- a/samples/generated/v3/transition_route_groups.delete_transition_route_group.js +++ b/samples/generated/v3/transition_route_groups.delete_transition_route_group.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/transition_route_groups.get_transition_route_group.js b/samples/generated/v3/transition_route_groups.get_transition_route_group.js index 3175e256..e7bead1d 100644 --- a/samples/generated/v3/transition_route_groups.get_transition_route_group.js +++ b/samples/generated/v3/transition_route_groups.get_transition_route_group.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_TransitionRouteGroups_GetTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/transition_route_groups.list_transition_route_groups.js b/samples/generated/v3/transition_route_groups.list_transition_route_groups.js index 4f88664f..2ce31c19 100644 --- a/samples/generated/v3/transition_route_groups.list_transition_route_groups.js +++ b/samples/generated/v3/transition_route_groups.list_transition_route_groups.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/transition_route_groups.update_transition_route_group.js b/samples/generated/v3/transition_route_groups.update_transition_route_group.js index 94893aba..79fc1146 100644 --- a/samples/generated/v3/transition_route_groups.update_transition_route_group.js +++ b/samples/generated/v3/transition_route_groups.update_transition_route_group.js @@ -23,6 +23,9 @@ function main(transitionRouteGroup) { // [START dialogflow_v3_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.compare_versions.js b/samples/generated/v3/versions.compare_versions.js index a9b6ba31..1a8090c4 100644 --- a/samples/generated/v3/versions.compare_versions.js +++ b/samples/generated/v3/versions.compare_versions.js @@ -23,6 +23,9 @@ function main(baseVersion, targetVersion) { // [START dialogflow_v3_generated_Versions_CompareVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.create_version.js b/samples/generated/v3/versions.create_version.js index d02e0a38..c656857a 100644 --- a/samples/generated/v3/versions.create_version.js +++ b/samples/generated/v3/versions.create_version.js @@ -23,6 +23,9 @@ function main(parent, version) { // [START dialogflow_v3_generated_Versions_CreateVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.delete_version.js b/samples/generated/v3/versions.delete_version.js index b157b394..90fefa36 100644 --- a/samples/generated/v3/versions.delete_version.js +++ b/samples/generated/v3/versions.delete_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Versions_DeleteVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.get_version.js b/samples/generated/v3/versions.get_version.js index 2ab11126..79471b24 100644 --- a/samples/generated/v3/versions.get_version.js +++ b/samples/generated/v3/versions.get_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Versions_GetVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.list_versions.js b/samples/generated/v3/versions.list_versions.js index 1a30032d..93c2142b 100644 --- a/samples/generated/v3/versions.list_versions.js +++ b/samples/generated/v3/versions.list_versions.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Versions_ListVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.load_version.js b/samples/generated/v3/versions.load_version.js index 59435a42..64491551 100644 --- a/samples/generated/v3/versions.load_version.js +++ b/samples/generated/v3/versions.load_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Versions_LoadVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/versions.update_version.js b/samples/generated/v3/versions.update_version.js index 9613f328..26dfc8c1 100644 --- a/samples/generated/v3/versions.update_version.js +++ b/samples/generated/v3/versions.update_version.js @@ -23,6 +23,9 @@ function main(version, updateMask) { // [START dialogflow_v3_generated_Versions_UpdateVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/webhooks.create_webhook.js b/samples/generated/v3/webhooks.create_webhook.js index e3ae9655..f32b855e 100644 --- a/samples/generated/v3/webhooks.create_webhook.js +++ b/samples/generated/v3/webhooks.create_webhook.js @@ -23,6 +23,9 @@ function main(parent, webhook) { // [START dialogflow_v3_generated_Webhooks_CreateWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/webhooks.delete_webhook.js b/samples/generated/v3/webhooks.delete_webhook.js index 9972c7e2..d6edef52 100644 --- a/samples/generated/v3/webhooks.delete_webhook.js +++ b/samples/generated/v3/webhooks.delete_webhook.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Webhooks_DeleteWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/webhooks.get_webhook.js b/samples/generated/v3/webhooks.get_webhook.js index 2c18d509..1b919a8b 100644 --- a/samples/generated/v3/webhooks.get_webhook.js +++ b/samples/generated/v3/webhooks.get_webhook.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3_generated_Webhooks_GetWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/webhooks.list_webhooks.js b/samples/generated/v3/webhooks.list_webhooks.js index 3ced6d4d..7a3f804d 100644 --- a/samples/generated/v3/webhooks.list_webhooks.js +++ b/samples/generated/v3/webhooks.list_webhooks.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3_generated_Webhooks_ListWebhooks_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3/webhooks.update_webhook.js b/samples/generated/v3/webhooks.update_webhook.js index 5682045b..6ea85dcb 100644 --- a/samples/generated/v3/webhooks.update_webhook.js +++ b/samples/generated/v3/webhooks.update_webhook.js @@ -23,6 +23,9 @@ function main(webhook) { // [START dialogflow_v3_generated_Webhooks_UpdateWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.create_agent.js b/samples/generated/v3beta1/agents.create_agent.js index 2b73ce00..2ef0c379 100644 --- a/samples/generated/v3beta1/agents.create_agent.js +++ b/samples/generated/v3beta1/agents.create_agent.js @@ -23,6 +23,9 @@ function main(parent, agent) { // [START dialogflow_v3beta1_generated_Agents_CreateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.delete_agent.js b/samples/generated/v3beta1/agents.delete_agent.js index 7dc94aea..3488c60a 100644 --- a/samples/generated/v3beta1/agents.delete_agent.js +++ b/samples/generated/v3beta1/agents.delete_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_DeleteAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.export_agent.js b/samples/generated/v3beta1/agents.export_agent.js index 176a83de..d88b214d 100644 --- a/samples/generated/v3beta1/agents.export_agent.js +++ b/samples/generated/v3beta1/agents.export_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_ExportAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.get_agent.js b/samples/generated/v3beta1/agents.get_agent.js index a7ac79ed..5d51d5af 100644 --- a/samples/generated/v3beta1/agents.get_agent.js +++ b/samples/generated/v3beta1/agents.get_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_GetAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.get_agent_validation_result.js b/samples/generated/v3beta1/agents.get_agent_validation_result.js index a1f6ccbf..1eabe965 100644 --- a/samples/generated/v3beta1/agents.get_agent_validation_result.js +++ b/samples/generated/v3beta1/agents.get_agent_validation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_GetAgentValidationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.list_agents.js b/samples/generated/v3beta1/agents.list_agents.js index d9991258..347505d5 100644 --- a/samples/generated/v3beta1/agents.list_agents.js +++ b/samples/generated/v3beta1/agents.list_agents.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Agents_ListAgents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.restore_agent.js b/samples/generated/v3beta1/agents.restore_agent.js index cb0ed139..e25f26bb 100644 --- a/samples/generated/v3beta1/agents.restore_agent.js +++ b/samples/generated/v3beta1/agents.restore_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_RestoreAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.update_agent.js b/samples/generated/v3beta1/agents.update_agent.js index 92b2527b..811fd5a9 100644 --- a/samples/generated/v3beta1/agents.update_agent.js +++ b/samples/generated/v3beta1/agents.update_agent.js @@ -23,6 +23,9 @@ function main(agent) { // [START dialogflow_v3beta1_generated_Agents_UpdateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/agents.validate_agent.js b/samples/generated/v3beta1/agents.validate_agent.js index 6a9c7d9d..3b106db3 100644 --- a/samples/generated/v3beta1/agents.validate_agent.js +++ b/samples/generated/v3beta1/agents.validate_agent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Agents_ValidateAgent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/changelogs.get_changelog.js b/samples/generated/v3beta1/changelogs.get_changelog.js index 784fd0c8..44e6f03e 100644 --- a/samples/generated/v3beta1/changelogs.get_changelog.js +++ b/samples/generated/v3beta1/changelogs.get_changelog.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Changelogs_GetChangelog_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/changelogs.list_changelogs.js b/samples/generated/v3beta1/changelogs.list_changelogs.js index b51b71da..e045559f 100644 --- a/samples/generated/v3beta1/changelogs.list_changelogs.js +++ b/samples/generated/v3beta1/changelogs.list_changelogs.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Changelogs_ListChangelogs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/deployments.get_deployment.js b/samples/generated/v3beta1/deployments.get_deployment.js index 101f7da0..87edcc8d 100644 --- a/samples/generated/v3beta1/deployments.get_deployment.js +++ b/samples/generated/v3beta1/deployments.get_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Deployments_GetDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/deployments.list_deployments.js b/samples/generated/v3beta1/deployments.list_deployments.js index 57c66710..0a529ad9 100644 --- a/samples/generated/v3beta1/deployments.list_deployments.js +++ b/samples/generated/v3beta1/deployments.list_deployments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Deployments_ListDeployments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/entity_types.create_entity_type.js b/samples/generated/v3beta1/entity_types.create_entity_type.js index 108a6b94..541c6bb0 100644 --- a/samples/generated/v3beta1/entity_types.create_entity_type.js +++ b/samples/generated/v3beta1/entity_types.create_entity_type.js @@ -23,6 +23,9 @@ function main(parent, entityType) { // [START dialogflow_v3beta1_generated_EntityTypes_CreateEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/entity_types.delete_entity_type.js b/samples/generated/v3beta1/entity_types.delete_entity_type.js index f228608c..8382ebb3 100644 --- a/samples/generated/v3beta1/entity_types.delete_entity_type.js +++ b/samples/generated/v3beta1/entity_types.delete_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_EntityTypes_DeleteEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/entity_types.get_entity_type.js b/samples/generated/v3beta1/entity_types.get_entity_type.js index f9df9000..41ad8df2 100644 --- a/samples/generated/v3beta1/entity_types.get_entity_type.js +++ b/samples/generated/v3beta1/entity_types.get_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_EntityTypes_GetEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/entity_types.list_entity_types.js b/samples/generated/v3beta1/entity_types.list_entity_types.js index 95fb79d6..7732bf92 100644 --- a/samples/generated/v3beta1/entity_types.list_entity_types.js +++ b/samples/generated/v3beta1/entity_types.list_entity_types.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_EntityTypes_ListEntityTypes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/entity_types.update_entity_type.js b/samples/generated/v3beta1/entity_types.update_entity_type.js index 26a0a957..17ce2eb8 100644 --- a/samples/generated/v3beta1/entity_types.update_entity_type.js +++ b/samples/generated/v3beta1/entity_types.update_entity_type.js @@ -23,6 +23,9 @@ function main(entityType) { // [START dialogflow_v3beta1_generated_EntityTypes_UpdateEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.create_environment.js b/samples/generated/v3beta1/environments.create_environment.js index 1aad4e3a..f20ceae9 100644 --- a/samples/generated/v3beta1/environments.create_environment.js +++ b/samples/generated/v3beta1/environments.create_environment.js @@ -23,6 +23,9 @@ function main(parent, environment) { // [START dialogflow_v3beta1_generated_Environments_CreateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.delete_environment.js b/samples/generated/v3beta1/environments.delete_environment.js index b15cec8f..3969d154 100644 --- a/samples/generated/v3beta1/environments.delete_environment.js +++ b/samples/generated/v3beta1/environments.delete_environment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Environments_DeleteEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.deploy_flow.js b/samples/generated/v3beta1/environments.deploy_flow.js index e4f42592..918d0f66 100644 --- a/samples/generated/v3beta1/environments.deploy_flow.js +++ b/samples/generated/v3beta1/environments.deploy_flow.js @@ -23,6 +23,9 @@ function main(environment, flowVersion) { // [START dialogflow_v3beta1_generated_Environments_DeployFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.get_environment.js b/samples/generated/v3beta1/environments.get_environment.js index 6ae39466..a8293d03 100644 --- a/samples/generated/v3beta1/environments.get_environment.js +++ b/samples/generated/v3beta1/environments.get_environment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Environments_GetEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.list_continuous_test_results.js b/samples/generated/v3beta1/environments.list_continuous_test_results.js index de0e552c..da5f6b16 100644 --- a/samples/generated/v3beta1/environments.list_continuous_test_results.js +++ b/samples/generated/v3beta1/environments.list_continuous_test_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Environments_ListContinuousTestResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.list_environments.js b/samples/generated/v3beta1/environments.list_environments.js index bb76daf0..2468e2da 100644 --- a/samples/generated/v3beta1/environments.list_environments.js +++ b/samples/generated/v3beta1/environments.list_environments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Environments_ListEnvironments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.lookup_environment_history.js b/samples/generated/v3beta1/environments.lookup_environment_history.js index 35ca9e2f..45fd61ac 100644 --- a/samples/generated/v3beta1/environments.lookup_environment_history.js +++ b/samples/generated/v3beta1/environments.lookup_environment_history.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Environments_LookupEnvironmentHistory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.run_continuous_test.js b/samples/generated/v3beta1/environments.run_continuous_test.js index d83ddcbc..819da4ce 100644 --- a/samples/generated/v3beta1/environments.run_continuous_test.js +++ b/samples/generated/v3beta1/environments.run_continuous_test.js @@ -23,6 +23,9 @@ function main(environment) { // [START dialogflow_v3beta1_generated_Environments_RunContinuousTest_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/environments.update_environment.js b/samples/generated/v3beta1/environments.update_environment.js index 68ae61e2..7398cb6c 100644 --- a/samples/generated/v3beta1/environments.update_environment.js +++ b/samples/generated/v3beta1/environments.update_environment.js @@ -23,6 +23,9 @@ function main(environment, updateMask) { // [START dialogflow_v3beta1_generated_Environments_UpdateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.create_experiment.js b/samples/generated/v3beta1/experiments.create_experiment.js index 37e1c6ba..42bc0f29 100644 --- a/samples/generated/v3beta1/experiments.create_experiment.js +++ b/samples/generated/v3beta1/experiments.create_experiment.js @@ -23,6 +23,9 @@ function main(parent, experiment) { // [START dialogflow_v3beta1_generated_Experiments_CreateExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.delete_experiment.js b/samples/generated/v3beta1/experiments.delete_experiment.js index c4c0eb77..dab0c690 100644 --- a/samples/generated/v3beta1/experiments.delete_experiment.js +++ b/samples/generated/v3beta1/experiments.delete_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Experiments_DeleteExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.get_experiment.js b/samples/generated/v3beta1/experiments.get_experiment.js index e852f484..c8561a46 100644 --- a/samples/generated/v3beta1/experiments.get_experiment.js +++ b/samples/generated/v3beta1/experiments.get_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Experiments_GetExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.list_experiments.js b/samples/generated/v3beta1/experiments.list_experiments.js index 703f4b9f..900991b8 100644 --- a/samples/generated/v3beta1/experiments.list_experiments.js +++ b/samples/generated/v3beta1/experiments.list_experiments.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Experiments_ListExperiments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.start_experiment.js b/samples/generated/v3beta1/experiments.start_experiment.js index 5d4f076c..3a4b9f05 100644 --- a/samples/generated/v3beta1/experiments.start_experiment.js +++ b/samples/generated/v3beta1/experiments.start_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Experiments_StartExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.stop_experiment.js b/samples/generated/v3beta1/experiments.stop_experiment.js index 32f08dc7..a9be3837 100644 --- a/samples/generated/v3beta1/experiments.stop_experiment.js +++ b/samples/generated/v3beta1/experiments.stop_experiment.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Experiments_StopExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/experiments.update_experiment.js b/samples/generated/v3beta1/experiments.update_experiment.js index 06c0bd87..41ee943d 100644 --- a/samples/generated/v3beta1/experiments.update_experiment.js +++ b/samples/generated/v3beta1/experiments.update_experiment.js @@ -23,6 +23,9 @@ function main(experiment, updateMask) { // [START dialogflow_v3beta1_generated_Experiments_UpdateExperiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.create_flow.js b/samples/generated/v3beta1/flows.create_flow.js index 7320abb7..5294d656 100644 --- a/samples/generated/v3beta1/flows.create_flow.js +++ b/samples/generated/v3beta1/flows.create_flow.js @@ -23,6 +23,9 @@ function main(parent, flow) { // [START dialogflow_v3beta1_generated_Flows_CreateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.delete_flow.js b/samples/generated/v3beta1/flows.delete_flow.js index 9b1296c7..7689c861 100644 --- a/samples/generated/v3beta1/flows.delete_flow.js +++ b/samples/generated/v3beta1/flows.delete_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_DeleteFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.export_flow.js b/samples/generated/v3beta1/flows.export_flow.js index 1aca67f2..872d3a45 100644 --- a/samples/generated/v3beta1/flows.export_flow.js +++ b/samples/generated/v3beta1/flows.export_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_ExportFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.get_flow.js b/samples/generated/v3beta1/flows.get_flow.js index a021c7b4..13d4d282 100644 --- a/samples/generated/v3beta1/flows.get_flow.js +++ b/samples/generated/v3beta1/flows.get_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_GetFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.get_flow_validation_result.js b/samples/generated/v3beta1/flows.get_flow_validation_result.js index e6aabf42..2c64af1a 100644 --- a/samples/generated/v3beta1/flows.get_flow_validation_result.js +++ b/samples/generated/v3beta1/flows.get_flow_validation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_GetFlowValidationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.import_flow.js b/samples/generated/v3beta1/flows.import_flow.js index d3f827b0..a63deb3e 100644 --- a/samples/generated/v3beta1/flows.import_flow.js +++ b/samples/generated/v3beta1/flows.import_flow.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Flows_ImportFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.list_flows.js b/samples/generated/v3beta1/flows.list_flows.js index f537206a..34c99aba 100644 --- a/samples/generated/v3beta1/flows.list_flows.js +++ b/samples/generated/v3beta1/flows.list_flows.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Flows_ListFlows_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.train_flow.js b/samples/generated/v3beta1/flows.train_flow.js index ca12c2b4..ec85defe 100644 --- a/samples/generated/v3beta1/flows.train_flow.js +++ b/samples/generated/v3beta1/flows.train_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_TrainFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.update_flow.js b/samples/generated/v3beta1/flows.update_flow.js index 6c9119b8..caac92dc 100644 --- a/samples/generated/v3beta1/flows.update_flow.js +++ b/samples/generated/v3beta1/flows.update_flow.js @@ -23,6 +23,9 @@ function main(flow) { // [START dialogflow_v3beta1_generated_Flows_UpdateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/flows.validate_flow.js b/samples/generated/v3beta1/flows.validate_flow.js index 583692ef..cf3a1e86 100644 --- a/samples/generated/v3beta1/flows.validate_flow.js +++ b/samples/generated/v3beta1/flows.validate_flow.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Flows_ValidateFlow_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/intents.create_intent.js b/samples/generated/v3beta1/intents.create_intent.js index c317951c..5917cf8d 100644 --- a/samples/generated/v3beta1/intents.create_intent.js +++ b/samples/generated/v3beta1/intents.create_intent.js @@ -23,6 +23,9 @@ function main(parent, intent) { // [START dialogflow_v3beta1_generated_Intents_CreateIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/intents.delete_intent.js b/samples/generated/v3beta1/intents.delete_intent.js index 26644e88..3b0e6126 100644 --- a/samples/generated/v3beta1/intents.delete_intent.js +++ b/samples/generated/v3beta1/intents.delete_intent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Intents_DeleteIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/intents.get_intent.js b/samples/generated/v3beta1/intents.get_intent.js index 5b10d233..af6faacb 100644 --- a/samples/generated/v3beta1/intents.get_intent.js +++ b/samples/generated/v3beta1/intents.get_intent.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Intents_GetIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/intents.list_intents.js b/samples/generated/v3beta1/intents.list_intents.js index 3ea6385a..4c652997 100644 --- a/samples/generated/v3beta1/intents.list_intents.js +++ b/samples/generated/v3beta1/intents.list_intents.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Intents_ListIntents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/intents.update_intent.js b/samples/generated/v3beta1/intents.update_intent.js index 072cdb2e..7fc906a6 100644 --- a/samples/generated/v3beta1/intents.update_intent.js +++ b/samples/generated/v3beta1/intents.update_intent.js @@ -23,6 +23,9 @@ function main(intent) { // [START dialogflow_v3beta1_generated_Intents_UpdateIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/pages.create_page.js b/samples/generated/v3beta1/pages.create_page.js index 129c2d0c..5913d58a 100644 --- a/samples/generated/v3beta1/pages.create_page.js +++ b/samples/generated/v3beta1/pages.create_page.js @@ -23,6 +23,9 @@ function main(parent, page) { // [START dialogflow_v3beta1_generated_Pages_CreatePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/pages.delete_page.js b/samples/generated/v3beta1/pages.delete_page.js index b9518a11..a38b3a7a 100644 --- a/samples/generated/v3beta1/pages.delete_page.js +++ b/samples/generated/v3beta1/pages.delete_page.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Pages_DeletePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/pages.get_page.js b/samples/generated/v3beta1/pages.get_page.js index edc49b4e..446f2100 100644 --- a/samples/generated/v3beta1/pages.get_page.js +++ b/samples/generated/v3beta1/pages.get_page.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Pages_GetPage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/pages.list_pages.js b/samples/generated/v3beta1/pages.list_pages.js index cf05426f..67651659 100644 --- a/samples/generated/v3beta1/pages.list_pages.js +++ b/samples/generated/v3beta1/pages.list_pages.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Pages_ListPages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/pages.update_page.js b/samples/generated/v3beta1/pages.update_page.js index 0422cf6a..3fa68b3f 100644 --- a/samples/generated/v3beta1/pages.update_page.js +++ b/samples/generated/v3beta1/pages.update_page.js @@ -23,6 +23,9 @@ function main(page) { // [START dialogflow_v3beta1_generated_Pages_UpdatePage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/security_settings_service.create_security_settings.js b/samples/generated/v3beta1/security_settings_service.create_security_settings.js index 0dc6615a..7958cc05 100644 --- a/samples/generated/v3beta1/security_settings_service.create_security_settings.js +++ b/samples/generated/v3beta1/security_settings_service.create_security_settings.js @@ -23,6 +23,9 @@ function main(parent, securitySettings) { // [START dialogflow_v3beta1_generated_SecuritySettingsService_CreateSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/security_settings_service.delete_security_settings.js b/samples/generated/v3beta1/security_settings_service.delete_security_settings.js index 6912ba44..4d327389 100644 --- a/samples/generated/v3beta1/security_settings_service.delete_security_settings.js +++ b/samples/generated/v3beta1/security_settings_service.delete_security_settings.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_SecuritySettingsService_DeleteSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/security_settings_service.get_security_settings.js b/samples/generated/v3beta1/security_settings_service.get_security_settings.js index 5a5a1def..56ba230a 100644 --- a/samples/generated/v3beta1/security_settings_service.get_security_settings.js +++ b/samples/generated/v3beta1/security_settings_service.get_security_settings.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_SecuritySettingsService_GetSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/security_settings_service.list_security_settings.js b/samples/generated/v3beta1/security_settings_service.list_security_settings.js index 3ee2910a..442693ad 100644 --- a/samples/generated/v3beta1/security_settings_service.list_security_settings.js +++ b/samples/generated/v3beta1/security_settings_service.list_security_settings.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_SecuritySettingsService_ListSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/security_settings_service.update_security_settings.js b/samples/generated/v3beta1/security_settings_service.update_security_settings.js index 172f076f..b93dadf9 100644 --- a/samples/generated/v3beta1/security_settings_service.update_security_settings.js +++ b/samples/generated/v3beta1/security_settings_service.update_security_settings.js @@ -23,6 +23,9 @@ function main(securitySettings, updateMask) { // [START dialogflow_v3beta1_generated_SecuritySettingsService_UpdateSecuritySettings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js b/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js index 4b0f771e..06ca0d19 100644 --- a/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js +++ b/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js @@ -23,6 +23,9 @@ function main(parent, sessionEntityType) { // [START dialogflow_v3beta1_generated_SessionEntityTypes_CreateSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js b/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js index 49e3ca87..0729ff51 100644 --- a/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js +++ b/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_SessionEntityTypes_DeleteSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js b/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js index 0009b7d1..d90e492d 100644 --- a/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js +++ b/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_SessionEntityTypes_GetSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js b/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js index bd52810d..e6b5a2f0 100644 --- a/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js +++ b/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_SessionEntityTypes_ListSessionEntityTypes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js b/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js index de8d4e17..410a54d2 100644 --- a/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js +++ b/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js @@ -23,6 +23,9 @@ function main(sessionEntityType) { // [START dialogflow_v3beta1_generated_SessionEntityTypes_UpdateSessionEntityType_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/sessions.detect_intent.js b/samples/generated/v3beta1/sessions.detect_intent.js index 236b36b5..756705ca 100644 --- a/samples/generated/v3beta1/sessions.detect_intent.js +++ b/samples/generated/v3beta1/sessions.detect_intent.js @@ -23,6 +23,9 @@ function main(session, queryInput) { // [START dialogflow_v3beta1_generated_Sessions_DetectIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/sessions.fulfill_intent.js b/samples/generated/v3beta1/sessions.fulfill_intent.js index f91979b9..362db911 100644 --- a/samples/generated/v3beta1/sessions.fulfill_intent.js +++ b/samples/generated/v3beta1/sessions.fulfill_intent.js @@ -23,6 +23,9 @@ function main() { // [START dialogflow_v3beta1_generated_Sessions_FulfillIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/sessions.match_intent.js b/samples/generated/v3beta1/sessions.match_intent.js index bb99d08b..229b7e3d 100644 --- a/samples/generated/v3beta1/sessions.match_intent.js +++ b/samples/generated/v3beta1/sessions.match_intent.js @@ -23,6 +23,9 @@ function main(session, queryInput) { // [START dialogflow_v3beta1_generated_Sessions_MatchIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/sessions.streaming_detect_intent.js b/samples/generated/v3beta1/sessions.streaming_detect_intent.js index 8ef00b07..2ef4cf56 100644 --- a/samples/generated/v3beta1/sessions.streaming_detect_intent.js +++ b/samples/generated/v3beta1/sessions.streaming_detect_intent.js @@ -23,6 +23,9 @@ function main(queryInput) { // [START dialogflow_v3beta1_generated_Sessions_StreamingDetectIntent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 85782827..b75d6a90 100644 --- a/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -290,7 +290,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -342,7 +342,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -386,7 +386,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -430,7 +430,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 88, "type": "FULL" } ], @@ -482,7 +482,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -522,7 +522,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -570,7 +570,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -662,7 +662,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -754,7 +754,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -802,7 +802,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -894,7 +894,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1022,7 +1022,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1062,7 +1062,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1110,7 +1110,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1150,7 +1150,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1198,7 +1198,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1242,7 +1242,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -1290,7 +1290,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1330,7 +1330,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -1374,7 +1374,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1418,7 +1418,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1458,7 +1458,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1498,7 +1498,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1538,7 +1538,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -1586,7 +1586,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -1630,7 +1630,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -1682,7 +1682,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1726,7 +1726,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -1774,7 +1774,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -1814,7 +1814,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1858,7 +1858,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1902,7 +1902,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -1954,7 +1954,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -2002,7 +2002,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -2058,7 +2058,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -2102,7 +2102,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -2150,7 +2150,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -2198,7 +2198,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2238,7 +2238,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 88, "type": "FULL" } ], @@ -2290,7 +2290,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -2334,7 +2334,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -2382,7 +2382,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -2430,7 +2430,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -2474,7 +2474,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2518,7 +2518,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2558,7 +2558,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -2602,7 +2602,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -2650,7 +2650,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -2690,7 +2690,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -2738,7 +2738,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2778,7 +2778,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -2822,7 +2822,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -2866,7 +2866,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -2906,7 +2906,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -2958,7 +2958,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 90, "type": "FULL" } ], @@ -3014,7 +3014,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -3062,7 +3062,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -3110,7 +3110,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -3162,7 +3162,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -3206,7 +3206,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3246,7 +3246,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -3290,7 +3290,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -3334,7 +3334,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -3378,7 +3378,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -3426,7 +3426,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -3470,7 +3470,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -3518,7 +3518,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 82, "type": "FULL" } ], @@ -3570,7 +3570,7 @@ "segments": [ { "start": 25, - "end": 86, + "end": 89, "type": "FULL" } ], @@ -3622,7 +3622,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3662,7 +3662,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -3714,7 +3714,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -3758,7 +3758,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -3806,7 +3806,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -3854,7 +3854,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -3898,7 +3898,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -3946,7 +3946,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -3986,7 +3986,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -4030,7 +4030,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -4074,7 +4074,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -4114,7 +4114,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -4158,7 +4158,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -4206,7 +4206,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -4254,7 +4254,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -4294,7 +4294,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -4338,7 +4338,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -4382,7 +4382,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], diff --git a/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js b/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js index 87597100..f6fb0858 100644 --- a/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js +++ b/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js @@ -23,6 +23,9 @@ function main(parent, names) { // [START dialogflow_v3beta1_generated_TestCases_BatchDeleteTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.batch_run_test_cases.js b/samples/generated/v3beta1/test_cases.batch_run_test_cases.js index 703c4808..6c73ceeb 100644 --- a/samples/generated/v3beta1/test_cases.batch_run_test_cases.js +++ b/samples/generated/v3beta1/test_cases.batch_run_test_cases.js @@ -23,6 +23,9 @@ function main(parent, testCases) { // [START dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.calculate_coverage.js b/samples/generated/v3beta1/test_cases.calculate_coverage.js index 82d87dca..03f652d4 100644 --- a/samples/generated/v3beta1/test_cases.calculate_coverage.js +++ b/samples/generated/v3beta1/test_cases.calculate_coverage.js @@ -23,6 +23,9 @@ function main(agent, type) { // [START dialogflow_v3beta1_generated_TestCases_CalculateCoverage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.create_test_case.js b/samples/generated/v3beta1/test_cases.create_test_case.js index 01b9c90d..e7f3c551 100644 --- a/samples/generated/v3beta1/test_cases.create_test_case.js +++ b/samples/generated/v3beta1/test_cases.create_test_case.js @@ -23,6 +23,9 @@ function main(parent, testCase) { // [START dialogflow_v3beta1_generated_TestCases_CreateTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.export_test_cases.js b/samples/generated/v3beta1/test_cases.export_test_cases.js index a750a915..165ad989 100644 --- a/samples/generated/v3beta1/test_cases.export_test_cases.js +++ b/samples/generated/v3beta1/test_cases.export_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_TestCases_ExportTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.get_test_case.js b/samples/generated/v3beta1/test_cases.get_test_case.js index f4c87535..705220d0 100644 --- a/samples/generated/v3beta1/test_cases.get_test_case.js +++ b/samples/generated/v3beta1/test_cases.get_test_case.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_TestCases_GetTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.get_test_case_result.js b/samples/generated/v3beta1/test_cases.get_test_case_result.js index 9cf74db4..9bddb50f 100644 --- a/samples/generated/v3beta1/test_cases.get_test_case_result.js +++ b/samples/generated/v3beta1/test_cases.get_test_case_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_TestCases_GetTestCaseResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.import_test_cases.js b/samples/generated/v3beta1/test_cases.import_test_cases.js index da69c883..4c0e47f1 100644 --- a/samples/generated/v3beta1/test_cases.import_test_cases.js +++ b/samples/generated/v3beta1/test_cases.import_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_TestCases_ImportTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.list_test_case_results.js b/samples/generated/v3beta1/test_cases.list_test_case_results.js index f1986e4c..de4e3184 100644 --- a/samples/generated/v3beta1/test_cases.list_test_case_results.js +++ b/samples/generated/v3beta1/test_cases.list_test_case_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_TestCases_ListTestCaseResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.list_test_cases.js b/samples/generated/v3beta1/test_cases.list_test_cases.js index 26ded902..e14220b0 100644 --- a/samples/generated/v3beta1/test_cases.list_test_cases.js +++ b/samples/generated/v3beta1/test_cases.list_test_cases.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_TestCases_ListTestCases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.run_test_case.js b/samples/generated/v3beta1/test_cases.run_test_case.js index 7bf98c7a..1890a653 100644 --- a/samples/generated/v3beta1/test_cases.run_test_case.js +++ b/samples/generated/v3beta1/test_cases.run_test_case.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_TestCases_RunTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/test_cases.update_test_case.js b/samples/generated/v3beta1/test_cases.update_test_case.js index a3405e78..f152b611 100644 --- a/samples/generated/v3beta1/test_cases.update_test_case.js +++ b/samples/generated/v3beta1/test_cases.update_test_case.js @@ -23,6 +23,9 @@ function main(testCase, updateMask) { // [START dialogflow_v3beta1_generated_TestCases_UpdateTestCase_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js b/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js index 845c942d..c502d96e 100644 --- a/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js +++ b/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js @@ -23,6 +23,9 @@ function main(parent, transitionRouteGroup) { // [START dialogflow_v3beta1_generated_TransitionRouteGroups_CreateTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js b/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js index 57d9b538..d6a5b1a2 100644 --- a/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js +++ b/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js b/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js index 5f001c96..02b56fbf 100644 --- a/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js +++ b/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_TransitionRouteGroups_GetTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js b/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js index ac4629ef..5e87626a 100644 --- a/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js +++ b/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_TransitionRouteGroups_ListTransitionRouteGroups_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js b/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js index 568d4c38..a6b857b2 100644 --- a/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js +++ b/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js @@ -23,6 +23,9 @@ function main(transitionRouteGroup) { // [START dialogflow_v3beta1_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.compare_versions.js b/samples/generated/v3beta1/versions.compare_versions.js index b68439eb..ae9fc697 100644 --- a/samples/generated/v3beta1/versions.compare_versions.js +++ b/samples/generated/v3beta1/versions.compare_versions.js @@ -23,6 +23,9 @@ function main(baseVersion, targetVersion) { // [START dialogflow_v3beta1_generated_Versions_CompareVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.create_version.js b/samples/generated/v3beta1/versions.create_version.js index 1a78cb44..45aa8692 100644 --- a/samples/generated/v3beta1/versions.create_version.js +++ b/samples/generated/v3beta1/versions.create_version.js @@ -23,6 +23,9 @@ function main(parent, version) { // [START dialogflow_v3beta1_generated_Versions_CreateVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.delete_version.js b/samples/generated/v3beta1/versions.delete_version.js index bc92eea2..4fa5851a 100644 --- a/samples/generated/v3beta1/versions.delete_version.js +++ b/samples/generated/v3beta1/versions.delete_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Versions_DeleteVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.get_version.js b/samples/generated/v3beta1/versions.get_version.js index c4b77e09..f65e3ca5 100644 --- a/samples/generated/v3beta1/versions.get_version.js +++ b/samples/generated/v3beta1/versions.get_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Versions_GetVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.list_versions.js b/samples/generated/v3beta1/versions.list_versions.js index fb2ccb99..b779b25b 100644 --- a/samples/generated/v3beta1/versions.list_versions.js +++ b/samples/generated/v3beta1/versions.list_versions.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Versions_ListVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.load_version.js b/samples/generated/v3beta1/versions.load_version.js index 28957b7b..f0784cac 100644 --- a/samples/generated/v3beta1/versions.load_version.js +++ b/samples/generated/v3beta1/versions.load_version.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Versions_LoadVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/versions.update_version.js b/samples/generated/v3beta1/versions.update_version.js index 0357617c..b976e6b6 100644 --- a/samples/generated/v3beta1/versions.update_version.js +++ b/samples/generated/v3beta1/versions.update_version.js @@ -23,6 +23,9 @@ function main(version, updateMask) { // [START dialogflow_v3beta1_generated_Versions_UpdateVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/webhooks.create_webhook.js b/samples/generated/v3beta1/webhooks.create_webhook.js index 83bbb593..533ad561 100644 --- a/samples/generated/v3beta1/webhooks.create_webhook.js +++ b/samples/generated/v3beta1/webhooks.create_webhook.js @@ -23,6 +23,9 @@ function main(parent, webhook) { // [START dialogflow_v3beta1_generated_Webhooks_CreateWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/webhooks.delete_webhook.js b/samples/generated/v3beta1/webhooks.delete_webhook.js index f468eb5a..fe73fa8d 100644 --- a/samples/generated/v3beta1/webhooks.delete_webhook.js +++ b/samples/generated/v3beta1/webhooks.delete_webhook.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Webhooks_DeleteWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/webhooks.get_webhook.js b/samples/generated/v3beta1/webhooks.get_webhook.js index ed4116da..2a1cd491 100644 --- a/samples/generated/v3beta1/webhooks.get_webhook.js +++ b/samples/generated/v3beta1/webhooks.get_webhook.js @@ -23,6 +23,9 @@ function main(name) { // [START dialogflow_v3beta1_generated_Webhooks_GetWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/webhooks.list_webhooks.js b/samples/generated/v3beta1/webhooks.list_webhooks.js index 58369f72..5b85ba87 100644 --- a/samples/generated/v3beta1/webhooks.list_webhooks.js +++ b/samples/generated/v3beta1/webhooks.list_webhooks.js @@ -23,6 +23,9 @@ function main(parent) { // [START dialogflow_v3beta1_generated_Webhooks_ListWebhooks_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v3beta1/webhooks.update_webhook.js b/samples/generated/v3beta1/webhooks.update_webhook.js index 785fb546..dcea4057 100644 --- a/samples/generated/v3beta1/webhooks.update_webhook.js +++ b/samples/generated/v3beta1/webhooks.update_webhook.js @@ -23,6 +23,9 @@ function main(webhook) { // [START dialogflow_v3beta1_generated_Webhooks_UpdateWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/src/v3/agents_client.ts b/src/v3/agents_client.ts index e8461d70..fa71366b 100644 --- a/src/v3/agents_client.ts +++ b/src/v3/agents_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -404,7 +403,8 @@ export class AgentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1202,7 +1202,7 @@ export class AgentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportAgent, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.ExportAgentResponse, @@ -1367,7 +1367,7 @@ export class AgentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restoreAgent, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1515,7 +1515,7 @@ export class AgentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAgents.createStream( - this.innerApiCalls.listAgents as gax.GaxCall, + this.innerApiCalls.listAgents as GaxCall, request, callSettings ); @@ -1565,7 +1565,7 @@ export class AgentsClient { this.initialize(); return this.descriptors.page.listAgents.asyncIterate( this.innerApiCalls['listAgents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/changelogs_client.ts b/src/v3/changelogs_client.ts index 0022f688..c660df96 100644 --- a/src/v3/changelogs_client.ts +++ b/src/v3/changelogs_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './changelogs_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -367,7 +366,8 @@ export class ChangelogsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -709,7 +709,7 @@ export class ChangelogsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listChangelogs.createStream( - this.innerApiCalls.listChangelogs as gax.GaxCall, + this.innerApiCalls.listChangelogs as GaxCall, request, callSettings ); @@ -780,7 +780,7 @@ export class ChangelogsClient { this.initialize(); return this.descriptors.page.listChangelogs.asyncIterate( this.innerApiCalls['listChangelogs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/deployments_client.ts b/src/v3/deployments_client.ts index 5aedf12b..eac0427a 100644 --- a/src/v3/deployments_client.ts +++ b/src/v3/deployments_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './deployments_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -367,7 +366,8 @@ export class DeploymentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -669,7 +669,7 @@ export class DeploymentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeployments.createStream( - this.innerApiCalls.listDeployments as gax.GaxCall, + this.innerApiCalls.listDeployments as GaxCall, request, callSettings ); @@ -720,7 +720,7 @@ export class DeploymentsClient { this.initialize(); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/entity_types_client.ts b/src/v3/entity_types_client.ts index 1b93f945..a334fc12 100644 --- a/src/v3/entity_types_client.ts +++ b/src/v3/entity_types_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './entity_types_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -373,7 +372,8 @@ export class EntityTypesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1039,7 +1039,7 @@ export class EntityTypesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEntityTypes.createStream( - this.innerApiCalls.listEntityTypes as gax.GaxCall, + this.innerApiCalls.listEntityTypes as GaxCall, request, callSettings ); @@ -1102,7 +1102,7 @@ export class EntityTypesClient { this.initialize(); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/environments_client.ts b/src/v3/environments_client.ts index 74357e7a..76a5877d 100644 --- a/src/v3/environments_client.ts +++ b/src/v3/environments_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -436,7 +435,8 @@ export class EnvironmentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -835,7 +835,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.Environment, @@ -982,7 +982,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.Environment, @@ -1127,7 +1127,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.runContinuousTest, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse, @@ -1277,7 +1277,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deployFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.DeployFlowResponse, @@ -1425,7 +1425,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as gax.GaxCall, + this.innerApiCalls.listEnvironments as GaxCall, request, callSettings ); @@ -1475,7 +1475,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1626,7 +1626,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.lookupEnvironmentHistory.createStream( - this.innerApiCalls.lookupEnvironmentHistory as gax.GaxCall, + this.innerApiCalls.lookupEnvironmentHistory as GaxCall, request, callSettings ); @@ -1677,7 +1677,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.lookupEnvironmentHistory.asyncIterate( this.innerApiCalls['lookupEnvironmentHistory'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1828,7 +1828,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listContinuousTestResults.createStream( - this.innerApiCalls.listContinuousTestResults as gax.GaxCall, + this.innerApiCalls.listContinuousTestResults as GaxCall, request, callSettings ); @@ -1879,7 +1879,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listContinuousTestResults.asyncIterate( this.innerApiCalls['listContinuousTestResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/experiments_client.ts b/src/v3/experiments_client.ts index dd82ebff..fb8cc95f 100644 --- a/src/v3/experiments_client.ts +++ b/src/v3/experiments_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './experiments_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -375,7 +374,8 @@ export class ExperimentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1146,7 +1146,7 @@ export class ExperimentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listExperiments.createStream( - this.innerApiCalls.listExperiments as gax.GaxCall, + this.innerApiCalls.listExperiments as GaxCall, request, callSettings ); @@ -1197,7 +1197,7 @@ export class ExperimentsClient { this.initialize(); return this.descriptors.page.listExperiments.asyncIterate( this.innerApiCalls['listExperiments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/flows_client.ts b/src/v3/flows_client.ts index c6d9af5b..700347f2 100644 --- a/src/v3/flows_client.ts +++ b/src/v3/flows_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -416,7 +415,8 @@ export class FlowsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1255,7 +1255,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.trainFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1419,7 +1419,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.ImportFlowResponse, @@ -1582,7 +1582,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.ExportFlowResponse, @@ -1758,7 +1758,7 @@ export class FlowsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listFlows.createStream( - this.innerApiCalls.listFlows as gax.GaxCall, + this.innerApiCalls.listFlows as GaxCall, request, callSettings ); @@ -1822,7 +1822,7 @@ export class FlowsClient { this.initialize(); return this.descriptors.page.listFlows.asyncIterate( this.innerApiCalls['listFlows'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/intents_client.ts b/src/v3/intents_client.ts index 0e8973ce..904ac62f 100644 --- a/src/v3/intents_client.ts +++ b/src/v3/intents_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './intents_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -373,7 +372,8 @@ export class IntentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1017,7 +1017,7 @@ export class IntentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listIntents.createStream( - this.innerApiCalls.listIntents as gax.GaxCall, + this.innerApiCalls.listIntents as GaxCall, request, callSettings ); @@ -1080,7 +1080,7 @@ export class IntentsClient { this.initialize(); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/pages_client.ts b/src/v3/pages_client.ts index f4659451..0e9350f8 100644 --- a/src/v3/pages_client.ts +++ b/src/v3/pages_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './pages_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -373,7 +372,8 @@ export class PagesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1082,7 +1082,7 @@ export class PagesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPages.createStream( - this.innerApiCalls.listPages as gax.GaxCall, + this.innerApiCalls.listPages as GaxCall, request, callSettings ); @@ -1155,7 +1155,7 @@ export class PagesClient { this.initialize(); return this.descriptors.page.listPages.asyncIterate( this.innerApiCalls['listPages'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/security_settings_service_client.ts b/src/v3/security_settings_service_client.ts index b3f0dc40..377f5f90 100644 --- a/src/v3/security_settings_service_client.ts +++ b/src/v3/security_settings_service_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './security_settings_service_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -391,7 +390,8 @@ export class SecuritySettingsServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1010,7 +1010,7 @@ export class SecuritySettingsServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSecuritySettings.createStream( - this.innerApiCalls.listSecuritySettings as gax.GaxCall, + this.innerApiCalls.listSecuritySettings as GaxCall, request, callSettings ); @@ -1060,7 +1060,7 @@ export class SecuritySettingsServiceClient { this.initialize(); return this.descriptors.page.listSecuritySettings.asyncIterate( this.innerApiCalls['listSecuritySettings'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/session_entity_types_client.ts b/src/v3/session_entity_types_client.ts index 57e913a2..ca91357f 100644 --- a/src/v3/session_entity_types_client.ts +++ b/src/v3/session_entity_types_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './session_entity_types_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -377,7 +376,8 @@ export class SessionEntityTypesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1023,7 +1023,7 @@ export class SessionEntityTypesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSessionEntityTypes.createStream( - this.innerApiCalls.listSessionEntityTypes as gax.GaxCall, + this.innerApiCalls.listSessionEntityTypes as GaxCall, request, callSettings ); @@ -1077,7 +1077,7 @@ export class SessionEntityTypesClient { this.initialize(); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/sessions_client.ts b/src/v3/sessions_client.ts index 069e1193..cdb35a32 100644 --- a/src/v3/sessions_client.ts +++ b/src/v3/sessions_client.ts @@ -38,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './sessions_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -381,7 +381,8 @@ export class SessionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/src/v3/test_cases_client.ts b/src/v3/test_cases_client.ts index 1b0e18a8..ec3c11ce 100644 --- a/src/v3/test_cases_client.ts +++ b/src/v3/test_cases_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -435,7 +434,8 @@ export class TestCasesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1225,7 +1225,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.runTestCase, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.RunTestCaseResponse, @@ -1377,7 +1377,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.batchRunTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse, @@ -1536,7 +1536,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse, @@ -1707,7 +1707,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse, @@ -1861,7 +1861,7 @@ export class TestCasesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTestCases.createStream( - this.innerApiCalls.listTestCases as gax.GaxCall, + this.innerApiCalls.listTestCases as GaxCall, request, callSettings ); @@ -1914,7 +1914,7 @@ export class TestCasesClient { this.initialize(); return this.descriptors.page.listTestCases.asyncIterate( this.innerApiCalls['listTestCases'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2113,7 +2113,7 @@ export class TestCasesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTestCaseResults.createStream( - this.innerApiCalls.listTestCaseResults as gax.GaxCall, + this.innerApiCalls.listTestCaseResults as GaxCall, request, callSettings ); @@ -2190,7 +2190,7 @@ export class TestCasesClient { this.initialize(); return this.descriptors.page.listTestCaseResults.asyncIterate( this.innerApiCalls['listTestCaseResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/transition_route_groups_client.ts b/src/v3/transition_route_groups_client.ts index 1975cf95..f63be052 100644 --- a/src/v3/transition_route_groups_client.ts +++ b/src/v3/transition_route_groups_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './transition_route_groups_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -375,7 +374,8 @@ export class TransitionRouteGroupsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1087,7 +1087,7 @@ export class TransitionRouteGroupsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTransitionRouteGroups.createStream( - this.innerApiCalls.listTransitionRouteGroups as gax.GaxCall, + this.innerApiCalls.listTransitionRouteGroups as GaxCall, request, callSettings ); @@ -1152,7 +1152,7 @@ export class TransitionRouteGroupsClient { this.initialize(); return this.descriptors.page.listTransitionRouteGroups.asyncIterate( this.innerApiCalls['listTransitionRouteGroups'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/versions_client.ts b/src/v3/versions_client.ts index c48a85f0..9f847c27 100644 --- a/src/v3/versions_client.ts +++ b/src/v3/versions_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -402,7 +401,8 @@ export class VersionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -997,7 +997,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3.Version, @@ -1147,7 +1147,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.loadVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1297,7 +1297,7 @@ export class VersionsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVersions.createStream( - this.innerApiCalls.listVersions as gax.GaxCall, + this.innerApiCalls.listVersions as GaxCall, request, callSettings ); @@ -1348,7 +1348,7 @@ export class VersionsClient { this.initialize(); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3/webhooks_client.ts b/src/v3/webhooks_client.ts index d355afc1..06861f14 100644 --- a/src/v3/webhooks_client.ts +++ b/src/v3/webhooks_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './webhooks_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -380,7 +379,8 @@ export class WebhooksClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -971,7 +971,7 @@ export class WebhooksClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWebhooks.createStream( - this.innerApiCalls.listWebhooks as gax.GaxCall, + this.innerApiCalls.listWebhooks as GaxCall, request, callSettings ); @@ -1021,7 +1021,7 @@ export class WebhooksClient { this.initialize(); return this.descriptors.page.listWebhooks.asyncIterate( this.innerApiCalls['listWebhooks'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/agents_client.ts b/src/v3beta1/agents_client.ts index 752c8b4a..c7e9d21e 100644 --- a/src/v3beta1/agents_client.ts +++ b/src/v3beta1/agents_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -406,7 +405,8 @@ export class AgentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1216,7 +1216,7 @@ export class AgentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportAgent, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse, @@ -1381,7 +1381,7 @@ export class AgentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restoreAgent, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1529,7 +1529,7 @@ export class AgentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAgents.createStream( - this.innerApiCalls.listAgents as gax.GaxCall, + this.innerApiCalls.listAgents as GaxCall, request, callSettings ); @@ -1579,7 +1579,7 @@ export class AgentsClient { this.initialize(); return this.descriptors.page.listAgents.asyncIterate( this.innerApiCalls['listAgents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/changelogs_client.ts b/src/v3beta1/changelogs_client.ts index 88c9b267..a7d31ce3 100644 --- a/src/v3beta1/changelogs_client.ts +++ b/src/v3beta1/changelogs_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './changelogs_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -369,7 +368,8 @@ export class ChangelogsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -717,7 +717,7 @@ export class ChangelogsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listChangelogs.createStream( - this.innerApiCalls.listChangelogs as gax.GaxCall, + this.innerApiCalls.listChangelogs as GaxCall, request, callSettings ); @@ -788,7 +788,7 @@ export class ChangelogsClient { this.initialize(); return this.descriptors.page.listChangelogs.asyncIterate( this.innerApiCalls['listChangelogs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/deployments_client.ts b/src/v3beta1/deployments_client.ts index e737c543..1f0b7790 100644 --- a/src/v3beta1/deployments_client.ts +++ b/src/v3beta1/deployments_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './deployments_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -369,7 +368,8 @@ export class DeploymentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -677,7 +677,7 @@ export class DeploymentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeployments.createStream( - this.innerApiCalls.listDeployments as gax.GaxCall, + this.innerApiCalls.listDeployments as GaxCall, request, callSettings ); @@ -728,7 +728,7 @@ export class DeploymentsClient { this.initialize(); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/entity_types_client.ts b/src/v3beta1/entity_types_client.ts index 9239db5f..c59ea605 100644 --- a/src/v3beta1/entity_types_client.ts +++ b/src/v3beta1/entity_types_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './entity_types_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -375,7 +374,8 @@ export class EntityTypesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1061,7 +1061,7 @@ export class EntityTypesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEntityTypes.createStream( - this.innerApiCalls.listEntityTypes as gax.GaxCall, + this.innerApiCalls.listEntityTypes as GaxCall, request, callSettings ); @@ -1124,7 +1124,7 @@ export class EntityTypesClient { this.initialize(); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/environments_client.ts b/src/v3beta1/environments_client.ts index 9acf5052..42553f4c 100644 --- a/src/v3beta1/environments_client.ts +++ b/src/v3beta1/environments_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -438,7 +437,8 @@ export class EnvironmentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -843,7 +843,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.Environment, @@ -990,7 +990,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.Environment, @@ -1135,7 +1135,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.runContinuousTest, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse, @@ -1285,7 +1285,7 @@ export class EnvironmentsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deployFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse, @@ -1433,7 +1433,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as gax.GaxCall, + this.innerApiCalls.listEnvironments as GaxCall, request, callSettings ); @@ -1483,7 +1483,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1634,7 +1634,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.lookupEnvironmentHistory.createStream( - this.innerApiCalls.lookupEnvironmentHistory as gax.GaxCall, + this.innerApiCalls.lookupEnvironmentHistory as GaxCall, request, callSettings ); @@ -1685,7 +1685,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.lookupEnvironmentHistory.asyncIterate( this.innerApiCalls['lookupEnvironmentHistory'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1836,7 +1836,7 @@ export class EnvironmentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listContinuousTestResults.createStream( - this.innerApiCalls.listContinuousTestResults as gax.GaxCall, + this.innerApiCalls.listContinuousTestResults as GaxCall, request, callSettings ); @@ -1887,7 +1887,7 @@ export class EnvironmentsClient { this.initialize(); return this.descriptors.page.listContinuousTestResults.asyncIterate( this.innerApiCalls['listContinuousTestResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/experiments_client.ts b/src/v3beta1/experiments_client.ts index 92e322db..47bba531 100644 --- a/src/v3beta1/experiments_client.ts +++ b/src/v3beta1/experiments_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './experiments_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -377,7 +376,8 @@ export class ExperimentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1184,7 +1184,7 @@ export class ExperimentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listExperiments.createStream( - this.innerApiCalls.listExperiments as gax.GaxCall, + this.innerApiCalls.listExperiments as GaxCall, request, callSettings ); @@ -1235,7 +1235,7 @@ export class ExperimentsClient { this.initialize(); return this.descriptors.page.listExperiments.asyncIterate( this.innerApiCalls['listExperiments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/flows_client.ts b/src/v3beta1/flows_client.ts index 1569fac5..c78e34dd 100644 --- a/src/v3beta1/flows_client.ts +++ b/src/v3beta1/flows_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -418,7 +417,8 @@ export class FlowsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1269,7 +1269,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.trainFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1433,7 +1433,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse, @@ -1596,7 +1596,7 @@ export class FlowsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportFlow, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse, @@ -1772,7 +1772,7 @@ export class FlowsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listFlows.createStream( - this.innerApiCalls.listFlows as gax.GaxCall, + this.innerApiCalls.listFlows as GaxCall, request, callSettings ); @@ -1836,7 +1836,7 @@ export class FlowsClient { this.initialize(); return this.descriptors.page.listFlows.asyncIterate( this.innerApiCalls['listFlows'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/intents_client.ts b/src/v3beta1/intents_client.ts index e2efb5d1..2fc59d56 100644 --- a/src/v3beta1/intents_client.ts +++ b/src/v3beta1/intents_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './intents_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -375,7 +374,8 @@ export class IntentsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1043,7 +1043,7 @@ export class IntentsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listIntents.createStream( - this.innerApiCalls.listIntents as gax.GaxCall, + this.innerApiCalls.listIntents as GaxCall, request, callSettings ); @@ -1106,7 +1106,7 @@ export class IntentsClient { this.initialize(); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/pages_client.ts b/src/v3beta1/pages_client.ts index 4f582832..99414124 100644 --- a/src/v3beta1/pages_client.ts +++ b/src/v3beta1/pages_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './pages_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -375,7 +374,8 @@ export class PagesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1078,7 +1078,7 @@ export class PagesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPages.createStream( - this.innerApiCalls.listPages as gax.GaxCall, + this.innerApiCalls.listPages as GaxCall, request, callSettings ); @@ -1151,7 +1151,7 @@ export class PagesClient { this.initialize(); return this.descriptors.page.listPages.asyncIterate( this.innerApiCalls['listPages'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/security_settings_service_client.ts b/src/v3beta1/security_settings_service_client.ts index 627fb875..ea038d65 100644 --- a/src/v3beta1/security_settings_service_client.ts +++ b/src/v3beta1/security_settings_service_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './security_settings_service_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -393,7 +392,8 @@ export class SecuritySettingsServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1012,7 +1012,7 @@ export class SecuritySettingsServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSecuritySettings.createStream( - this.innerApiCalls.listSecuritySettings as gax.GaxCall, + this.innerApiCalls.listSecuritySettings as GaxCall, request, callSettings ); @@ -1062,7 +1062,7 @@ export class SecuritySettingsServiceClient { this.initialize(); return this.descriptors.page.listSecuritySettings.asyncIterate( this.innerApiCalls['listSecuritySettings'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/session_entity_types_client.ts b/src/v3beta1/session_entity_types_client.ts index f0951f0a..bf691ceb 100644 --- a/src/v3beta1/session_entity_types_client.ts +++ b/src/v3beta1/session_entity_types_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './session_entity_types_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -379,7 +378,8 @@ export class SessionEntityTypesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1025,7 +1025,7 @@ export class SessionEntityTypesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSessionEntityTypes.createStream( - this.innerApiCalls.listSessionEntityTypes as gax.GaxCall, + this.innerApiCalls.listSessionEntityTypes as GaxCall, request, callSettings ); @@ -1079,7 +1079,7 @@ export class SessionEntityTypesClient { this.initialize(); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/sessions_client.ts b/src/v3beta1/sessions_client.ts index 2c691801..ccb6c8c0 100644 --- a/src/v3beta1/sessions_client.ts +++ b/src/v3beta1/sessions_client.ts @@ -38,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './sessions_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -383,7 +383,8 @@ export class SessionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/src/v3beta1/test_cases_client.ts b/src/v3beta1/test_cases_client.ts index a2eba83a..45c17464 100644 --- a/src/v3beta1/test_cases_client.ts +++ b/src/v3beta1/test_cases_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -437,7 +436,8 @@ export class TestCasesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1239,7 +1239,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.runTestCase, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse, @@ -1391,7 +1391,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.batchRunTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse, @@ -1550,7 +1550,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse, @@ -1721,7 +1721,7 @@ export class TestCasesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.exportTestCases, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse, @@ -1875,7 +1875,7 @@ export class TestCasesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTestCases.createStream( - this.innerApiCalls.listTestCases as gax.GaxCall, + this.innerApiCalls.listTestCases as GaxCall, request, callSettings ); @@ -1928,7 +1928,7 @@ export class TestCasesClient { this.initialize(); return this.descriptors.page.listTestCases.asyncIterate( this.innerApiCalls['listTestCases'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2127,7 +2127,7 @@ export class TestCasesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTestCaseResults.createStream( - this.innerApiCalls.listTestCaseResults as gax.GaxCall, + this.innerApiCalls.listTestCaseResults as GaxCall, request, callSettings ); @@ -2204,7 +2204,7 @@ export class TestCasesClient { this.initialize(); return this.descriptors.page.listTestCaseResults.asyncIterate( this.innerApiCalls['listTestCaseResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/transition_route_groups_client.ts b/src/v3beta1/transition_route_groups_client.ts index f1e02a24..61cf57a0 100644 --- a/src/v3beta1/transition_route_groups_client.ts +++ b/src/v3beta1/transition_route_groups_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './transition_route_groups_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -377,7 +376,8 @@ export class TransitionRouteGroupsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1087,7 +1087,7 @@ export class TransitionRouteGroupsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTransitionRouteGroups.createStream( - this.innerApiCalls.listTransitionRouteGroups as gax.GaxCall, + this.innerApiCalls.listTransitionRouteGroups as GaxCall, request, callSettings ); @@ -1151,7 +1151,7 @@ export class TransitionRouteGroupsClient { this.initialize(); return this.descriptors.page.listTransitionRouteGroups.asyncIterate( this.innerApiCalls['listTransitionRouteGroups'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/versions_client.ts b/src/v3beta1/versions_client.ts index 1a384c52..e9c03b35 100644 --- a/src/v3beta1/versions_client.ts +++ b/src/v3beta1/versions_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -404,7 +403,8 @@ export class VersionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1017,7 +1017,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dialogflow.cx.v3beta1.Version, @@ -1167,7 +1167,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.loadVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1317,7 +1317,7 @@ export class VersionsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVersions.createStream( - this.innerApiCalls.listVersions as gax.GaxCall, + this.innerApiCalls.listVersions as GaxCall, request, callSettings ); @@ -1368,7 +1368,7 @@ export class VersionsClient { this.initialize(); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v3beta1/webhooks_client.ts b/src/v3beta1/webhooks_client.ts index 1bf1d154..bceb1dab 100644 --- a/src/v3beta1/webhooks_client.ts +++ b/src/v3beta1/webhooks_client.ts @@ -31,7 +31,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -40,7 +39,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './webhooks_client_config.json'; -import {operationsProtos} from 'google-gax'; + const version = require('../../../package.json').version; /** @@ -382,7 +381,8 @@ export class WebhooksClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -991,7 +991,7 @@ export class WebhooksClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWebhooks.createStream( - this.innerApiCalls.listWebhooks as gax.GaxCall, + this.innerApiCalls.listWebhooks as GaxCall, request, callSettings ); @@ -1041,7 +1041,7 @@ export class WebhooksClient { this.initialize(); return this.descriptors.page.listWebhooks.asyncIterate( this.innerApiCalls['listWebhooks'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/test/gapic_agents_v3.ts b/test/gapic_agents_v3.ts index f835849a..d7152f34 100644 --- a/test/gapic_agents_v3.ts +++ b/test/gapic_agents_v3.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3.AgentsClient', () => { - it('has servicePath', () => { - const servicePath = agentsModule.v3.AgentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = agentsModule.v3.AgentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = agentsModule.v3.AgentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = agentsModule.v3.AgentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new agentsModule.v3.AgentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = agentsModule.v3.AgentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new agentsModule.v3.AgentsClient({ - fallback: true, + it('has port', () => { + const port = agentsModule.v3.AgentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new agentsModule.v3.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new agentsModule.v3.AgentsClient(); + assert(client); }); - assert.strictEqual(client.agentsStub, undefined); - await client.initialize(); - assert(client.agentsStub); - }); - it('has close method for the initialized client', done => { - const client = new agentsModule.v3.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new agentsModule.v3.AgentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.agentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.agentsStub, undefined); + await client.initialize(); + assert(client.agentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new agentsModule.v3.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.agentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.agentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.agentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new agentsModule.v3.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new agentsModule.v3.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getAgent', () => { diff --git a/test/gapic_agents_v3beta1.ts b/test/gapic_agents_v3beta1.ts index 486b96ab..a1646cd3 100644 --- a/test/gapic_agents_v3beta1.ts +++ b/test/gapic_agents_v3beta1.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3beta1.AgentsClient', () => { - it('has servicePath', () => { - const servicePath = agentsModule.v3beta1.AgentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = agentsModule.v3beta1.AgentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = agentsModule.v3beta1.AgentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = agentsModule.v3beta1.AgentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new agentsModule.v3beta1.AgentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = agentsModule.v3beta1.AgentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new agentsModule.v3beta1.AgentsClient({ - fallback: true, + it('has port', () => { + const port = agentsModule.v3beta1.AgentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new agentsModule.v3beta1.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new agentsModule.v3beta1.AgentsClient(); + assert(client); }); - assert.strictEqual(client.agentsStub, undefined); - await client.initialize(); - assert(client.agentsStub); - }); - it('has close method for the initialized client', done => { - const client = new agentsModule.v3beta1.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new agentsModule.v3beta1.AgentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.agentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.agentsStub, undefined); + await client.initialize(); + assert(client.agentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new agentsModule.v3beta1.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.agentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.agentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.agentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new agentsModule.v3beta1.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new agentsModule.v3beta1.AgentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getAgent', () => { diff --git a/test/gapic_changelogs_v3.ts b/test/gapic_changelogs_v3.ts index 86d99a2f..2582d95a 100644 --- a/test/gapic_changelogs_v3.ts +++ b/test/gapic_changelogs_v3.ts @@ -25,12 +25,7 @@ import * as changelogsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.ChangelogsClient', () => { - it('has servicePath', () => { - const servicePath = changelogsModule.v3.ChangelogsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = changelogsModule.v3.ChangelogsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = changelogsModule.v3.ChangelogsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new changelogsModule.v3.ChangelogsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = changelogsModule.v3.ChangelogsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new changelogsModule.v3.ChangelogsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = changelogsModule.v3.ChangelogsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new changelogsModule.v3.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = changelogsModule.v3.ChangelogsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.changelogsStub, undefined); - await client.initialize(); - assert(client.changelogsStub); - }); - it('has close method for the initialized client', done => { - const client = new changelogsModule.v3.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new changelogsModule.v3.ChangelogsClient(); + assert(client); }); - client.initialize(); - assert(client.changelogsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new changelogsModule.v3.ChangelogsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new changelogsModule.v3.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.changelogsStub, undefined); + await client.initialize(); + assert(client.changelogsStub); }); - assert.strictEqual(client.changelogsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.changelogsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new changelogsModule.v3.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.changelogsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new changelogsModule.v3.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getChangelog', () => { diff --git a/test/gapic_changelogs_v3beta1.ts b/test/gapic_changelogs_v3beta1.ts index f1aaaaf6..e778becf 100644 --- a/test/gapic_changelogs_v3beta1.ts +++ b/test/gapic_changelogs_v3beta1.ts @@ -25,12 +25,7 @@ import * as changelogsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3beta1.ChangelogsClient', () => { - it('has servicePath', () => { - const servicePath = changelogsModule.v3beta1.ChangelogsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = changelogsModule.v3beta1.ChangelogsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = changelogsModule.v3beta1.ChangelogsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new changelogsModule.v3beta1.ChangelogsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = changelogsModule.v3beta1.ChangelogsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new changelogsModule.v3beta1.ChangelogsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = changelogsModule.v3beta1.ChangelogsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new changelogsModule.v3beta1.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = changelogsModule.v3beta1.ChangelogsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.changelogsStub, undefined); - await client.initialize(); - assert(client.changelogsStub); - }); - it('has close method for the initialized client', done => { - const client = new changelogsModule.v3beta1.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new changelogsModule.v3beta1.ChangelogsClient(); + assert(client); }); - client.initialize(); - assert(client.changelogsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new changelogsModule.v3beta1.ChangelogsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new changelogsModule.v3beta1.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.changelogsStub, undefined); + await client.initialize(); + assert(client.changelogsStub); }); - assert.strictEqual(client.changelogsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.changelogsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new changelogsModule.v3beta1.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.changelogsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new changelogsModule.v3beta1.ChangelogsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getChangelog', () => { diff --git a/test/gapic_deployments_v3.ts b/test/gapic_deployments_v3.ts index 0c645191..9f27533c 100644 --- a/test/gapic_deployments_v3.ts +++ b/test/gapic_deployments_v3.ts @@ -25,12 +25,7 @@ import * as deploymentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.DeploymentsClient', () => { - it('has servicePath', () => { - const servicePath = deploymentsModule.v3.DeploymentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = deploymentsModule.v3.DeploymentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = deploymentsModule.v3.DeploymentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new deploymentsModule.v3.DeploymentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = deploymentsModule.v3.DeploymentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new deploymentsModule.v3.DeploymentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = deploymentsModule.v3.DeploymentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new deploymentsModule.v3.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = deploymentsModule.v3.DeploymentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.deploymentsStub, undefined); - await client.initialize(); - assert(client.deploymentsStub); - }); - it('has close method for the initialized client', done => { - const client = new deploymentsModule.v3.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new deploymentsModule.v3.DeploymentsClient(); + assert(client); }); - client.initialize(); - assert(client.deploymentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new deploymentsModule.v3.DeploymentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new deploymentsModule.v3.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentsStub, undefined); + await client.initialize(); + assert(client.deploymentsStub); }); - assert.strictEqual(client.deploymentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.deploymentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new deploymentsModule.v3.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new deploymentsModule.v3.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getDeployment', () => { diff --git a/test/gapic_deployments_v3beta1.ts b/test/gapic_deployments_v3beta1.ts index 3b517a6f..d78fbc3d 100644 --- a/test/gapic_deployments_v3beta1.ts +++ b/test/gapic_deployments_v3beta1.ts @@ -25,12 +25,7 @@ import * as deploymentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,103 @@ function stubAsyncIterationCall( } describe('v3beta1.DeploymentsClient', () => { - it('has servicePath', () => { - const servicePath = deploymentsModule.v3beta1.DeploymentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = deploymentsModule.v3beta1.DeploymentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = deploymentsModule.v3beta1.DeploymentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new deploymentsModule.v3beta1.DeploymentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + deploymentsModule.v3beta1.DeploymentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + deploymentsModule.v3beta1.DeploymentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = deploymentsModule.v3beta1.DeploymentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.deploymentsStub, undefined); - await client.initialize(); - assert(client.deploymentsStub); - }); - it('has close method for the initialized client', done => { - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new deploymentsModule.v3beta1.DeploymentsClient(); + assert(client); }); - client.initialize(); - assert(client.deploymentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentsStub, undefined); + await client.initialize(); + assert(client.deploymentsStub); }); - assert.strictEqual(client.deploymentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.deploymentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new deploymentsModule.v3beta1.DeploymentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getDeployment', () => { diff --git a/test/gapic_entity_types_v3.ts b/test/gapic_entity_types_v3.ts index c5b51ce8..d956c5c9 100644 --- a/test/gapic_entity_types_v3.ts +++ b/test/gapic_entity_types_v3.ts @@ -25,12 +25,7 @@ import * as entitytypesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.EntityTypesClient', () => { - it('has servicePath', () => { - const servicePath = entitytypesModule.v3.EntityTypesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = entitytypesModule.v3.EntityTypesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = entitytypesModule.v3.EntityTypesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = entitytypesModule.v3.EntityTypesClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new entitytypesModule.v3.EntityTypesClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = entitytypesModule.v3.EntityTypesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new entitytypesModule.v3.EntityTypesClient({ - fallback: true, + it('has port', () => { + const port = entitytypesModule.v3.EntityTypesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new entitytypesModule.v3.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new entitytypesModule.v3.EntityTypesClient(); + assert(client); }); - assert.strictEqual(client.entityTypesStub, undefined); - await client.initialize(); - assert(client.entityTypesStub); - }); - it('has close method for the initialized client', done => { - const client = new entitytypesModule.v3.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new entitytypesModule.v3.EntityTypesClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.entityTypesStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.entityTypesStub, undefined); + await client.initialize(); + assert(client.entityTypesStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new entitytypesModule.v3.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.entityTypesStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.entityTypesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.entityTypesStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new entitytypesModule.v3.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new entitytypesModule.v3.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getEntityType', () => { diff --git a/test/gapic_entity_types_v3beta1.ts b/test/gapic_entity_types_v3beta1.ts index ffe8bbfd..b3a23353 100644 --- a/test/gapic_entity_types_v3beta1.ts +++ b/test/gapic_entity_types_v3beta1.ts @@ -25,12 +25,7 @@ import * as entitytypesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,103 @@ function stubAsyncIterationCall( } describe('v3beta1.EntityTypesClient', () => { - it('has servicePath', () => { - const servicePath = entitytypesModule.v3beta1.EntityTypesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = entitytypesModule.v3beta1.EntityTypesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = entitytypesModule.v3beta1.EntityTypesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + entitytypesModule.v3beta1.EntityTypesClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new entitytypesModule.v3beta1.EntityTypesClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + entitytypesModule.v3beta1.EntityTypesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - fallback: true, + it('has port', () => { + const port = entitytypesModule.v3beta1.EntityTypesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new entitytypesModule.v3beta1.EntityTypesClient(); + assert(client); }); - assert.strictEqual(client.entityTypesStub, undefined); - await client.initialize(); - assert(client.entityTypesStub); - }); - it('has close method for the initialized client', done => { - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.entityTypesStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.entityTypesStub, undefined); + await client.initialize(); + assert(client.entityTypesStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.entityTypesStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.entityTypesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.entityTypesStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new entitytypesModule.v3beta1.EntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getEntityType', () => { diff --git a/test/gapic_environments_v3.ts b/test/gapic_environments_v3.ts index 19e17a99..abba1a49 100644 --- a/test/gapic_environments_v3.ts +++ b/test/gapic_environments_v3.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3.EnvironmentsClient', () => { - it('has servicePath', () => { - const servicePath = environmentsModule.v3.EnvironmentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = environmentsModule.v3.EnvironmentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = environmentsModule.v3.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v3.EnvironmentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = environmentsModule.v3.EnvironmentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v3.EnvironmentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = environmentsModule.v3.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v3.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = environmentsModule.v3.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - it('has close method for the initialized client', done => { - const client = new environmentsModule.v3.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new environmentsModule.v3.EnvironmentsClient(); + assert(client); }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v3.EnvironmentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v3.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v3.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v3.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getEnvironment', () => { diff --git a/test/gapic_environments_v3beta1.ts b/test/gapic_environments_v3beta1.ts index d3c6125e..41026385 100644 --- a/test/gapic_environments_v3beta1.ts +++ b/test/gapic_environments_v3beta1.ts @@ -150,101 +150,103 @@ function stubAsyncIterationCall( } describe('v3beta1.EnvironmentsClient', () => { - it('has servicePath', () => { - const servicePath = - environmentsModule.v3beta1.EnvironmentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - environmentsModule.v3beta1.EnvironmentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = environmentsModule.v3beta1.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v3beta1.EnvironmentsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + environmentsModule.v3beta1.EnvironmentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + environmentsModule.v3beta1.EnvironmentsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = environmentsModule.v3beta1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - it('has close method for the initialized client', done => { - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new environmentsModule.v3beta1.EnvironmentsClient(); + assert(client); }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v3beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getEnvironment', () => { diff --git a/test/gapic_experiments_v3.ts b/test/gapic_experiments_v3.ts index b86b5393..ec7a436a 100644 --- a/test/gapic_experiments_v3.ts +++ b/test/gapic_experiments_v3.ts @@ -25,12 +25,7 @@ import * as experimentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.ExperimentsClient', () => { - it('has servicePath', () => { - const servicePath = experimentsModule.v3.ExperimentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = experimentsModule.v3.ExperimentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = experimentsModule.v3.ExperimentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = experimentsModule.v3.ExperimentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new experimentsModule.v3.ExperimentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = experimentsModule.v3.ExperimentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new experimentsModule.v3.ExperimentsClient({ - fallback: true, + it('has port', () => { + const port = experimentsModule.v3.ExperimentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new experimentsModule.v3.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new experimentsModule.v3.ExperimentsClient(); + assert(client); }); - assert.strictEqual(client.experimentsStub, undefined); - await client.initialize(); - assert(client.experimentsStub); - }); - it('has close method for the initialized client', done => { - const client = new experimentsModule.v3.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new experimentsModule.v3.ExperimentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.experimentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + await client.initialize(); + assert(client.experimentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new experimentsModule.v3.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.experimentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.experimentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new experimentsModule.v3.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new experimentsModule.v3.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getExperiment', () => { diff --git a/test/gapic_experiments_v3beta1.ts b/test/gapic_experiments_v3beta1.ts index 451db827..4830f7fb 100644 --- a/test/gapic_experiments_v3beta1.ts +++ b/test/gapic_experiments_v3beta1.ts @@ -25,12 +25,7 @@ import * as experimentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,103 @@ function stubAsyncIterationCall( } describe('v3beta1.ExperimentsClient', () => { - it('has servicePath', () => { - const servicePath = experimentsModule.v3beta1.ExperimentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = experimentsModule.v3beta1.ExperimentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = experimentsModule.v3beta1.ExperimentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + experimentsModule.v3beta1.ExperimentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new experimentsModule.v3beta1.ExperimentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + experimentsModule.v3beta1.ExperimentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new experimentsModule.v3beta1.ExperimentsClient({ - fallback: true, + it('has port', () => { + const port = experimentsModule.v3beta1.ExperimentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new experimentsModule.v3beta1.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new experimentsModule.v3beta1.ExperimentsClient(); + assert(client); }); - assert.strictEqual(client.experimentsStub, undefined); - await client.initialize(); - assert(client.experimentsStub); - }); - it('has close method for the initialized client', done => { - const client = new experimentsModule.v3beta1.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.experimentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + await client.initialize(); + assert(client.experimentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new experimentsModule.v3beta1.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.experimentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.experimentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new experimentsModule.v3beta1.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new experimentsModule.v3beta1.ExperimentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getExperiment', () => { diff --git a/test/gapic_flows_v3.ts b/test/gapic_flows_v3.ts index 91469af6..77e05c93 100644 --- a/test/gapic_flows_v3.ts +++ b/test/gapic_flows_v3.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3.FlowsClient', () => { - it('has servicePath', () => { - const servicePath = flowsModule.v3.FlowsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = flowsModule.v3.FlowsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = flowsModule.v3.FlowsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new flowsModule.v3.FlowsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = flowsModule.v3.FlowsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new flowsModule.v3.FlowsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = flowsModule.v3.FlowsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new flowsModule.v3.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = flowsModule.v3.FlowsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.flowsStub, undefined); - await client.initialize(); - assert(client.flowsStub); - }); - it('has close method for the initialized client', done => { - const client = new flowsModule.v3.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new flowsModule.v3.FlowsClient(); + assert(client); }); - client.initialize(); - assert(client.flowsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new flowsModule.v3.FlowsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new flowsModule.v3.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.flowsStub, undefined); + await client.initialize(); + assert(client.flowsStub); }); - assert.strictEqual(client.flowsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.flowsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new flowsModule.v3.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.flowsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new flowsModule.v3.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createFlow', () => { diff --git a/test/gapic_flows_v3beta1.ts b/test/gapic_flows_v3beta1.ts index b1593b32..66966621 100644 --- a/test/gapic_flows_v3beta1.ts +++ b/test/gapic_flows_v3beta1.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3beta1.FlowsClient', () => { - it('has servicePath', () => { - const servicePath = flowsModule.v3beta1.FlowsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = flowsModule.v3beta1.FlowsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = flowsModule.v3beta1.FlowsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new flowsModule.v3beta1.FlowsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = flowsModule.v3beta1.FlowsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new flowsModule.v3beta1.FlowsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = flowsModule.v3beta1.FlowsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new flowsModule.v3beta1.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = flowsModule.v3beta1.FlowsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.flowsStub, undefined); - await client.initialize(); - assert(client.flowsStub); - }); - it('has close method for the initialized client', done => { - const client = new flowsModule.v3beta1.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new flowsModule.v3beta1.FlowsClient(); + assert(client); }); - client.initialize(); - assert(client.flowsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new flowsModule.v3beta1.FlowsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new flowsModule.v3beta1.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.flowsStub, undefined); + await client.initialize(); + assert(client.flowsStub); }); - assert.strictEqual(client.flowsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.flowsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new flowsModule.v3beta1.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.flowsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new flowsModule.v3beta1.FlowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createFlow', () => { diff --git a/test/gapic_intents_v3.ts b/test/gapic_intents_v3.ts index 932e4fb5..8a5f1bd5 100644 --- a/test/gapic_intents_v3.ts +++ b/test/gapic_intents_v3.ts @@ -25,12 +25,7 @@ import * as intentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.IntentsClient', () => { - it('has servicePath', () => { - const servicePath = intentsModule.v3.IntentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = intentsModule.v3.IntentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = intentsModule.v3.IntentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = intentsModule.v3.IntentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new intentsModule.v3.IntentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = intentsModule.v3.IntentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new intentsModule.v3.IntentsClient({ - fallback: true, + it('has port', () => { + const port = intentsModule.v3.IntentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new intentsModule.v3.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new intentsModule.v3.IntentsClient(); + assert(client); }); - assert.strictEqual(client.intentsStub, undefined); - await client.initialize(); - assert(client.intentsStub); - }); - it('has close method for the initialized client', done => { - const client = new intentsModule.v3.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new intentsModule.v3.IntentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.intentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.intentsStub, undefined); + await client.initialize(); + assert(client.intentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new intentsModule.v3.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.intentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.intentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.intentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new intentsModule.v3.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new intentsModule.v3.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getIntent', () => { diff --git a/test/gapic_intents_v3beta1.ts b/test/gapic_intents_v3beta1.ts index b62875d8..4e5600e8 100644 --- a/test/gapic_intents_v3beta1.ts +++ b/test/gapic_intents_v3beta1.ts @@ -25,12 +25,7 @@ import * as intentsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3beta1.IntentsClient', () => { - it('has servicePath', () => { - const servicePath = intentsModule.v3beta1.IntentsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = intentsModule.v3beta1.IntentsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = intentsModule.v3beta1.IntentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = intentsModule.v3beta1.IntentsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new intentsModule.v3beta1.IntentsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = intentsModule.v3beta1.IntentsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new intentsModule.v3beta1.IntentsClient({ - fallback: true, + it('has port', () => { + const port = intentsModule.v3beta1.IntentsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new intentsModule.v3beta1.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new intentsModule.v3beta1.IntentsClient(); + assert(client); }); - assert.strictEqual(client.intentsStub, undefined); - await client.initialize(); - assert(client.intentsStub); - }); - it('has close method for the initialized client', done => { - const client = new intentsModule.v3beta1.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new intentsModule.v3beta1.IntentsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.intentsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.intentsStub, undefined); + await client.initialize(); + assert(client.intentsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new intentsModule.v3beta1.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.intentsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.intentsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.intentsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new intentsModule.v3beta1.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new intentsModule.v3beta1.IntentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getIntent', () => { diff --git a/test/gapic_pages_v3.ts b/test/gapic_pages_v3.ts index 109a5550..660dd288 100644 --- a/test/gapic_pages_v3.ts +++ b/test/gapic_pages_v3.ts @@ -25,12 +25,7 @@ import * as pagesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.PagesClient', () => { - it('has servicePath', () => { - const servicePath = pagesModule.v3.PagesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = pagesModule.v3.PagesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = pagesModule.v3.PagesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = pagesModule.v3.PagesClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new pagesModule.v3.PagesClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = pagesModule.v3.PagesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new pagesModule.v3.PagesClient({ - fallback: true, + it('has port', () => { + const port = pagesModule.v3.PagesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new pagesModule.v3.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new pagesModule.v3.PagesClient(); + assert(client); }); - assert.strictEqual(client.pagesStub, undefined); - await client.initialize(); - assert(client.pagesStub); - }); - it('has close method for the initialized client', done => { - const client = new pagesModule.v3.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new pagesModule.v3.PagesClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.pagesStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.pagesStub, undefined); + await client.initialize(); + assert(client.pagesStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new pagesModule.v3.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.pagesStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.pagesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.pagesStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new pagesModule.v3.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new pagesModule.v3.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getPage', () => { diff --git a/test/gapic_pages_v3beta1.ts b/test/gapic_pages_v3beta1.ts index 72dfbe02..bd90b33d 100644 --- a/test/gapic_pages_v3beta1.ts +++ b/test/gapic_pages_v3beta1.ts @@ -25,12 +25,7 @@ import * as pagesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3beta1.PagesClient', () => { - it('has servicePath', () => { - const servicePath = pagesModule.v3beta1.PagesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = pagesModule.v3beta1.PagesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = pagesModule.v3beta1.PagesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = pagesModule.v3beta1.PagesClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new pagesModule.v3beta1.PagesClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = pagesModule.v3beta1.PagesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new pagesModule.v3beta1.PagesClient({ - fallback: true, + it('has port', () => { + const port = pagesModule.v3beta1.PagesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new pagesModule.v3beta1.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new pagesModule.v3beta1.PagesClient(); + assert(client); }); - assert.strictEqual(client.pagesStub, undefined); - await client.initialize(); - assert(client.pagesStub); - }); - it('has close method for the initialized client', done => { - const client = new pagesModule.v3beta1.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new pagesModule.v3beta1.PagesClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.pagesStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.pagesStub, undefined); + await client.initialize(); + assert(client.pagesStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new pagesModule.v3beta1.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.pagesStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.pagesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.pagesStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new pagesModule.v3beta1.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new pagesModule.v3beta1.PagesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getPage', () => { diff --git a/test/gapic_security_settings_service_v3.ts b/test/gapic_security_settings_service_v3.ts index 05779fbb..4fb89370 100644 --- a/test/gapic_security_settings_service_v3.ts +++ b/test/gapic_security_settings_service_v3.ts @@ -25,12 +25,7 @@ import * as securitysettingsserviceModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,111 +113,113 @@ function stubAsyncIterationCall( } describe('v3.SecuritySettingsServiceClient', () => { - it('has servicePath', () => { - const servicePath = - securitysettingsserviceModule.v3.SecuritySettingsServiceClient - .servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + securitysettingsserviceModule.v3.SecuritySettingsServiceClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - securitysettingsserviceModule.v3.SecuritySettingsServiceClient - .apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + securitysettingsserviceModule.v3.SecuritySettingsServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - securitysettingsserviceModule.v3.SecuritySettingsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + securitysettingsserviceModule.v3.SecuritySettingsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.securitySettingsServiceStub, undefined); - await client.initialize(); - assert(client.securitySettingsServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.securitySettingsServiceStub, undefined); + await client.initialize(); + assert(client.securitySettingsServiceStub); + }); - it('has close method for the initialized client', done => { - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.securitySettingsServiceStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.securitySettingsServiceStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.securitySettingsServiceStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.securitySettingsServiceStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createSecuritySettings', () => { diff --git a/test/gapic_security_settings_service_v3beta1.ts b/test/gapic_security_settings_service_v3beta1.ts index 14c92c6b..7548cca0 100644 --- a/test/gapic_security_settings_service_v3beta1.ts +++ b/test/gapic_security_settings_service_v3beta1.ts @@ -25,12 +25,7 @@ import * as securitysettingsserviceModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,111 +113,126 @@ function stubAsyncIterationCall( } describe('v3beta1.SecuritySettingsServiceClient', () => { - it('has servicePath', () => { - const servicePath = - securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient - .servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient - .apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient + .port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + fallback: true, + } + ); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.securitySettingsServiceStub, undefined); - await client.initialize(); - assert(client.securitySettingsServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.securitySettingsServiceStub, undefined); + await client.initialize(); + assert(client.securitySettingsServiceStub); + }); - it('has close method for the initialized client', done => { - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.securitySettingsServiceStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.securitySettingsServiceStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.securitySettingsServiceStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.securitySettingsServiceStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createSecuritySettings', () => { diff --git a/test/gapic_session_entity_types_v3.ts b/test/gapic_session_entity_types_v3.ts index 270596df..a4aa9b68 100644 --- a/test/gapic_session_entity_types_v3.ts +++ b/test/gapic_session_entity_types_v3.ts @@ -25,12 +25,7 @@ import * as sessionentitytypesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,101 +113,103 @@ function stubAsyncIterationCall( } describe('v3.SessionEntityTypesClient', () => { - it('has servicePath', () => { - const servicePath = - sessionentitytypesModule.v3.SessionEntityTypesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - sessionentitytypesModule.v3.SessionEntityTypesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = sessionentitytypesModule.v3.SessionEntityTypesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + sessionentitytypesModule.v3.SessionEntityTypesClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + sessionentitytypesModule.v3.SessionEntityTypesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - fallback: true, + it('has port', () => { + const port = sessionentitytypesModule.v3.SessionEntityTypesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient(); + assert(client); }); - assert.strictEqual(client.sessionEntityTypesStub, undefined); - await client.initialize(); - assert(client.sessionEntityTypesStub); - }); - it('has close method for the initialized client', done => { - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.sessionEntityTypesStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionEntityTypesStub, undefined); + await client.initialize(); + assert(client.sessionEntityTypesStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.sessionEntityTypesStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.sessionEntityTypesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionEntityTypesStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getSessionEntityType', () => { diff --git a/test/gapic_session_entity_types_v3beta1.ts b/test/gapic_session_entity_types_v3beta1.ts index f4ec221d..e3da2eb9 100644 --- a/test/gapic_session_entity_types_v3beta1.ts +++ b/test/gapic_session_entity_types_v3beta1.ts @@ -25,12 +25,7 @@ import * as sessionentitytypesModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,108 +113,111 @@ function stubAsyncIterationCall( } describe('v3beta1.SessionEntityTypesClient', () => { - it('has servicePath', () => { - const servicePath = - sessionentitytypesModule.v3beta1.SessionEntityTypesClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + sessionentitytypesModule.v3beta1.SessionEntityTypesClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - sessionentitytypesModule.v3beta1.SessionEntityTypesClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + sessionentitytypesModule.v3beta1.SessionEntityTypesClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = sessionentitytypesModule.v3beta1.SessionEntityTypesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + sessionentitytypesModule.v3beta1.SessionEntityTypesClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.sessionEntityTypesStub, undefined); - await client.initialize(); - assert(client.sessionEntityTypesStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionEntityTypesStub, undefined); + await client.initialize(); + assert(client.sessionEntityTypesStub); + }); - it('has close method for the initialized client', done => { - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.sessionEntityTypesStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.sessionEntityTypesStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionEntityTypesStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.sessionEntityTypesStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getSessionEntityType', () => { diff --git a/test/gapic_sessions_v3.ts b/test/gapic_sessions_v3.ts index d7994779..0c57a3cd 100644 --- a/test/gapic_sessions_v3.ts +++ b/test/gapic_sessions_v3.ts @@ -25,12 +25,7 @@ import * as sessionsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -94,99 +89,101 @@ function stubAsyncIterationCall( } describe('v3.SessionsClient', () => { - it('has servicePath', () => { - const servicePath = sessionsModule.v3.SessionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = sessionsModule.v3.SessionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = sessionsModule.v3.SessionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new sessionsModule.v3.SessionsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = sessionsModule.v3.SessionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new sessionsModule.v3.SessionsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = sessionsModule.v3.SessionsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new sessionsModule.v3.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = sessionsModule.v3.SessionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.sessionsStub, undefined); - await client.initialize(); - assert(client.sessionsStub); - }); - it('has close method for the initialized client', done => { - const client = new sessionsModule.v3.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new sessionsModule.v3.SessionsClient(); + assert(client); }); - client.initialize(); - assert(client.sessionsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new sessionsModule.v3.SessionsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new sessionsModule.v3.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionsStub, undefined); + await client.initialize(); + assert(client.sessionsStub); }); - assert.strictEqual(client.sessionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.sessionsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionsModule.v3.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionsModule.v3.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('detectIntent', () => { diff --git a/test/gapic_sessions_v3beta1.ts b/test/gapic_sessions_v3beta1.ts index e3b6a63f..71f683bf 100644 --- a/test/gapic_sessions_v3beta1.ts +++ b/test/gapic_sessions_v3beta1.ts @@ -25,12 +25,7 @@ import * as sessionsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -94,99 +89,101 @@ function stubAsyncIterationCall( } describe('v3beta1.SessionsClient', () => { - it('has servicePath', () => { - const servicePath = sessionsModule.v3beta1.SessionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = sessionsModule.v3beta1.SessionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = sessionsModule.v3beta1.SessionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new sessionsModule.v3beta1.SessionsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = sessionsModule.v3beta1.SessionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new sessionsModule.v3beta1.SessionsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = sessionsModule.v3beta1.SessionsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new sessionsModule.v3beta1.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = sessionsModule.v3beta1.SessionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.sessionsStub, undefined); - await client.initialize(); - assert(client.sessionsStub); - }); - it('has close method for the initialized client', done => { - const client = new sessionsModule.v3beta1.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new sessionsModule.v3beta1.SessionsClient(); + assert(client); }); - client.initialize(); - assert(client.sessionsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new sessionsModule.v3beta1.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionsStub, undefined); + await client.initialize(); + assert(client.sessionsStub); }); - assert.strictEqual(client.sessionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.sessionsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionsModule.v3beta1.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.sessionsStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new sessionsModule.v3beta1.SessionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('detectIntent', () => { diff --git a/test/gapic_test_cases_v3.ts b/test/gapic_test_cases_v3.ts index 484a2bbe..48c3d1ec 100644 --- a/test/gapic_test_cases_v3.ts +++ b/test/gapic_test_cases_v3.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3.TestCasesClient', () => { - it('has servicePath', () => { - const servicePath = testcasesModule.v3.TestCasesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = testcasesModule.v3.TestCasesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = testcasesModule.v3.TestCasesClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new testcasesModule.v3.TestCasesClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = testcasesModule.v3.TestCasesClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new testcasesModule.v3.TestCasesClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = testcasesModule.v3.TestCasesClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new testcasesModule.v3.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = testcasesModule.v3.TestCasesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.testCasesStub, undefined); - await client.initialize(); - assert(client.testCasesStub); - }); - it('has close method for the initialized client', done => { - const client = new testcasesModule.v3.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new testcasesModule.v3.TestCasesClient(); + assert(client); }); - client.initialize(); - assert(client.testCasesStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new testcasesModule.v3.TestCasesClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new testcasesModule.v3.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.testCasesStub, undefined); + await client.initialize(); + assert(client.testCasesStub); }); - assert.strictEqual(client.testCasesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.testCasesStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new testcasesModule.v3.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.testCasesStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new testcasesModule.v3.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchDeleteTestCases', () => { diff --git a/test/gapic_test_cases_v3beta1.ts b/test/gapic_test_cases_v3beta1.ts index 91b567d5..bfe12d5b 100644 --- a/test/gapic_test_cases_v3beta1.ts +++ b/test/gapic_test_cases_v3beta1.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3beta1.TestCasesClient', () => { - it('has servicePath', () => { - const servicePath = testcasesModule.v3beta1.TestCasesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = testcasesModule.v3beta1.TestCasesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = testcasesModule.v3beta1.TestCasesClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new testcasesModule.v3beta1.TestCasesClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = testcasesModule.v3beta1.TestCasesClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new testcasesModule.v3beta1.TestCasesClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = testcasesModule.v3beta1.TestCasesClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new testcasesModule.v3beta1.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = testcasesModule.v3beta1.TestCasesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.testCasesStub, undefined); - await client.initialize(); - assert(client.testCasesStub); - }); - it('has close method for the initialized client', done => { - const client = new testcasesModule.v3beta1.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new testcasesModule.v3beta1.TestCasesClient(); + assert(client); }); - client.initialize(); - assert(client.testCasesStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new testcasesModule.v3beta1.TestCasesClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new testcasesModule.v3beta1.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.testCasesStub, undefined); + await client.initialize(); + assert(client.testCasesStub); }); - assert.strictEqual(client.testCasesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.testCasesStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new testcasesModule.v3beta1.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.testCasesStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new testcasesModule.v3beta1.TestCasesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchDeleteTestCases', () => { diff --git a/test/gapic_transition_route_groups_v3.ts b/test/gapic_transition_route_groups_v3.ts index da8c3b11..ede899cd 100644 --- a/test/gapic_transition_route_groups_v3.ts +++ b/test/gapic_transition_route_groups_v3.ts @@ -25,12 +25,7 @@ import * as transitionroutegroupsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,109 +113,111 @@ function stubAsyncIterationCall( } describe('v3.TransitionRouteGroupsClient', () => { - it('has servicePath', () => { - const servicePath = - transitionroutegroupsModule.v3.TransitionRouteGroupsClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + transitionroutegroupsModule.v3.TransitionRouteGroupsClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - transitionroutegroupsModule.v3.TransitionRouteGroupsClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + transitionroutegroupsModule.v3.TransitionRouteGroupsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - transitionroutegroupsModule.v3.TransitionRouteGroupsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + transitionroutegroupsModule.v3.TransitionRouteGroupsClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.transitionRouteGroupsStub, undefined); - await client.initialize(); - assert(client.transitionRouteGroupsStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transitionRouteGroupsStub, undefined); + await client.initialize(); + assert(client.transitionRouteGroupsStub); + }); - it('has close method for the initialized client', done => { - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.transitionRouteGroupsStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.transitionRouteGroupsStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transitionRouteGroupsStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.transitionRouteGroupsStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getTransitionRouteGroup', () => { diff --git a/test/gapic_transition_route_groups_v3beta1.ts b/test/gapic_transition_route_groups_v3beta1.ts index 035694d2..e1c5a81f 100644 --- a/test/gapic_transition_route_groups_v3beta1.ts +++ b/test/gapic_transition_route_groups_v3beta1.ts @@ -25,12 +25,7 @@ import * as transitionroutegroupsModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,111 +113,113 @@ function stubAsyncIterationCall( } describe('v3beta1.TransitionRouteGroupsClient', () => { - it('has servicePath', () => { - const servicePath = - transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient - .servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient - .apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.transitionRouteGroupsStub, undefined); - await client.initialize(); - assert(client.transitionRouteGroupsStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transitionRouteGroupsStub, undefined); + await client.initialize(); + assert(client.transitionRouteGroupsStub); + }); - it('has close method for the initialized client', done => { - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.transitionRouteGroupsStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.transitionRouteGroupsStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transitionRouteGroupsStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.transitionRouteGroupsStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getTransitionRouteGroup', () => { diff --git a/test/gapic_versions_v3.ts b/test/gapic_versions_v3.ts index f9db8034..babf1600 100644 --- a/test/gapic_versions_v3.ts +++ b/test/gapic_versions_v3.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3.VersionsClient', () => { - it('has servicePath', () => { - const servicePath = versionsModule.v3.VersionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = versionsModule.v3.VersionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = versionsModule.v3.VersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = versionsModule.v3.VersionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new versionsModule.v3.VersionsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = versionsModule.v3.VersionsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new versionsModule.v3.VersionsClient({ - fallback: true, + it('has port', () => { + const port = versionsModule.v3.VersionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new versionsModule.v3.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new versionsModule.v3.VersionsClient(); + assert(client); }); - assert.strictEqual(client.versionsStub, undefined); - await client.initialize(); - assert(client.versionsStub); - }); - it('has close method for the initialized client', done => { - const client = new versionsModule.v3.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new versionsModule.v3.VersionsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.versionsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, undefined); + await client.initialize(); + assert(client.versionsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new versionsModule.v3.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.versionsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.versionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new versionsModule.v3.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new versionsModule.v3.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getVersion', () => { diff --git a/test/gapic_versions_v3beta1.ts b/test/gapic_versions_v3beta1.ts index 44e08fd0..bf158d22 100644 --- a/test/gapic_versions_v3beta1.ts +++ b/test/gapic_versions_v3beta1.ts @@ -150,99 +150,101 @@ function stubAsyncIterationCall( } describe('v3beta1.VersionsClient', () => { - it('has servicePath', () => { - const servicePath = versionsModule.v3beta1.VersionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = versionsModule.v3beta1.VersionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = versionsModule.v3beta1.VersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = versionsModule.v3beta1.VersionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new versionsModule.v3beta1.VersionsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = versionsModule.v3beta1.VersionsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new versionsModule.v3beta1.VersionsClient({ - fallback: true, + it('has port', () => { + const port = versionsModule.v3beta1.VersionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new versionsModule.v3beta1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new versionsModule.v3beta1.VersionsClient(); + assert(client); }); - assert.strictEqual(client.versionsStub, undefined); - await client.initialize(); - assert(client.versionsStub); - }); - it('has close method for the initialized client', done => { - const client = new versionsModule.v3beta1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new versionsModule.v3beta1.VersionsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.versionsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, undefined); + await client.initialize(); + assert(client.versionsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new versionsModule.v3beta1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.versionsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.versionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new versionsModule.v3beta1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new versionsModule.v3beta1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getVersion', () => { diff --git a/test/gapic_webhooks_v3.ts b/test/gapic_webhooks_v3.ts index 60a183f0..bfd99703 100644 --- a/test/gapic_webhooks_v3.ts +++ b/test/gapic_webhooks_v3.ts @@ -25,12 +25,7 @@ import * as webhooksModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3.WebhooksClient', () => { - it('has servicePath', () => { - const servicePath = webhooksModule.v3.WebhooksClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = webhooksModule.v3.WebhooksClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = webhooksModule.v3.WebhooksClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = webhooksModule.v3.WebhooksClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new webhooksModule.v3.WebhooksClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = webhooksModule.v3.WebhooksClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new webhooksModule.v3.WebhooksClient({ - fallback: true, + it('has port', () => { + const port = webhooksModule.v3.WebhooksClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new webhooksModule.v3.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new webhooksModule.v3.WebhooksClient(); + assert(client); }); - assert.strictEqual(client.webhooksStub, undefined); - await client.initialize(); - assert(client.webhooksStub); - }); - it('has close method for the initialized client', done => { - const client = new webhooksModule.v3.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new webhooksModule.v3.WebhooksClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.webhooksStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.webhooksStub, undefined); + await client.initialize(); + assert(client.webhooksStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new webhooksModule.v3.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.webhooksStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.webhooksStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.webhooksStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new webhooksModule.v3.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new webhooksModule.v3.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getWebhook', () => { diff --git a/test/gapic_webhooks_v3beta1.ts b/test/gapic_webhooks_v3beta1.ts index abb21157..e9d1f7a1 100644 --- a/test/gapic_webhooks_v3beta1.ts +++ b/test/gapic_webhooks_v3beta1.ts @@ -25,12 +25,7 @@ import * as webhooksModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -118,99 +113,101 @@ function stubAsyncIterationCall( } describe('v3beta1.WebhooksClient', () => { - it('has servicePath', () => { - const servicePath = webhooksModule.v3beta1.WebhooksClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = webhooksModule.v3beta1.WebhooksClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = webhooksModule.v3beta1.WebhooksClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = webhooksModule.v3beta1.WebhooksClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new webhooksModule.v3beta1.WebhooksClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = webhooksModule.v3beta1.WebhooksClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new webhooksModule.v3beta1.WebhooksClient({ - fallback: true, + it('has port', () => { + const port = webhooksModule.v3beta1.WebhooksClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new webhooksModule.v3beta1.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new webhooksModule.v3beta1.WebhooksClient(); + assert(client); }); - assert.strictEqual(client.webhooksStub, undefined); - await client.initialize(); - assert(client.webhooksStub); - }); - it('has close method for the initialized client', done => { - const client = new webhooksModule.v3beta1.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new webhooksModule.v3beta1.WebhooksClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.webhooksStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.webhooksStub, undefined); + await client.initialize(); + assert(client.webhooksStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new webhooksModule.v3beta1.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.webhooksStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.webhooksStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.webhooksStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new webhooksModule.v3beta1.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new webhooksModule.v3beta1.WebhooksClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getWebhook', () => {