From 2a8baa688cd6162ced35f1ab8732b0daf384f9f8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 01:21:14 +0000 Subject: [PATCH] chore(multi): Add api-version boilerplate --- .../cloud/dialogflow/cx/v3/agents/client.rb | 36 ++-- .../dialogflow/cx/v3/agents/operations.rb | 18 +- .../dialogflow/cx/v3/agents/rest/client.rb | 36 ++-- .../cx/v3/agents/rest/operations.rb | 15 +- .../dialogflow/cx/v3/changelogs/client.rb | 9 +- .../cx/v3/changelogs/rest/client.rb | 9 +- .../dialogflow/cx/v3/deployments/client.rb | 9 +- .../cx/v3/deployments/rest/client.rb | 9 +- .../dialogflow/cx/v3/entity_types/client.rb | 24 ++- .../cx/v3/entity_types/operations.rb | 18 +- .../cx/v3/entity_types/rest/client.rb | 24 ++- .../cx/v3/entity_types/rest/operations.rb | 15 +- .../dialogflow/cx/v3/environments/client.rb | 30 +++- .../cx/v3/environments/operations.rb | 18 +- .../cx/v3/environments/rest/client.rb | 30 +++- .../cx/v3/environments/rest/operations.rb | 15 +- .../dialogflow/cx/v3/experiments/client.rb | 24 ++- .../cx/v3/experiments/rest/client.rb | 24 ++- .../cloud/dialogflow/cx/v3/flows/client.rb | 33 ++-- .../dialogflow/cx/v3/flows/operations.rb | 18 +- .../dialogflow/cx/v3/flows/rest/client.rb | 33 ++-- .../dialogflow/cx/v3/flows/rest/operations.rb | 15 +- .../dialogflow/cx/v3/generators/client.rb | 18 +- .../cx/v3/generators/rest/client.rb | 18 +- .../cloud/dialogflow/cx/v3/intents/client.rb | 24 ++- .../dialogflow/cx/v3/intents/operations.rb | 18 +- .../dialogflow/cx/v3/intents/rest/client.rb | 24 ++- .../cx/v3/intents/rest/operations.rb | 15 +- .../cloud/dialogflow/cx/v3/pages/client.rb | 18 +- .../dialogflow/cx/v3/pages/rest/client.rb | 18 +- .../cx/v3/security_settings_service/client.rb | 18 +- .../security_settings_service/rest/client.rb | 18 +- .../cx/v3/session_entity_types/client.rb | 18 +- .../cx/v3/session_entity_types/rest/client.rb | 18 +- .../cloud/dialogflow/cx/v3/sessions/client.rb | 21 ++- .../dialogflow/cx/v3/sessions/rest/client.rb | 18 +- .../dialogflow/cx/v3/test_cases/client.rb | 39 +++-- .../dialogflow/cx/v3/test_cases/operations.rb | 18 +- .../cx/v3/test_cases/rest/client.rb | 39 +++-- .../cx/v3/test_cases/rest/operations.rb | 15 +- .../cx/v3/transition_route_groups/client.rb | 18 +- .../v3/transition_route_groups/rest/client.rb | 18 +- .../cloud/dialogflow/cx/v3/versions/client.rb | 24 ++- .../dialogflow/cx/v3/versions/operations.rb | 18 +- .../dialogflow/cx/v3/versions/rest/client.rb | 24 ++- .../cx/v3/versions/rest/operations.rb | 15 +- .../cloud/dialogflow/cx/v3/webhooks/client.rb | 18 +- .../dialogflow/cx/v3/webhooks/rest/client.rb | 18 +- .../cloud/dialogflow/v2/agents/client.rb | 30 +++- .../cloud/dialogflow/v2/agents/operations.rb | 18 +- .../cloud/dialogflow/v2/agents/rest/client.rb | 30 +++- .../dialogflow/v2/agents/rest/operations.rb | 15 +- .../dialogflow/v2/answer_records/client.rb | 9 +- .../v2/answer_records/rest/client.rb | 9 +- .../cloud/dialogflow/v2/contexts/client.rb | 21 ++- .../dialogflow/v2/contexts/rest/client.rb | 21 ++- .../v2/conversation_datasets/client.rb | 18 +- .../v2/conversation_datasets/operations.rb | 18 +- .../v2/conversation_datasets/rest/client.rb | 18 +- .../conversation_datasets/rest/operations.rb | 15 +- .../v2/conversation_models/client.rb | 30 +++- .../v2/conversation_models/operations.rb | 18 +- .../v2/conversation_models/rest/client.rb | 30 +++- .../v2/conversation_models/rest/operations.rb | 15 +- .../v2/conversation_profiles/client.rb | 24 ++- .../v2/conversation_profiles/operations.rb | 18 +- .../v2/conversation_profiles/rest/client.rb | 24 ++- .../conversation_profiles/rest/operations.rb | 15 +- .../dialogflow/v2/conversations/client.rb | 27 ++- .../v2/conversations/rest/client.rb | 27 ++- .../cloud/dialogflow/v2/documents/client.rb | 27 ++- .../dialogflow/v2/documents/operations.rb | 18 +- .../dialogflow/v2/documents/rest/client.rb | 27 ++- .../v2/documents/rest/operations.rb | 15 +- .../dialogflow/v2/entity_types/client.rb | 33 ++-- .../dialogflow/v2/entity_types/operations.rb | 18 +- .../dialogflow/v2/entity_types/rest/client.rb | 33 ++-- .../v2/entity_types/rest/operations.rb | 15 +- .../dialogflow/v2/environments/client.rb | 21 ++- .../dialogflow/v2/environments/rest/client.rb | 21 ++- .../dialogflow/v2/fulfillments/client.rb | 9 +- .../dialogflow/v2/fulfillments/rest/client.rb | 9 +- .../cloud/dialogflow/v2/intents/client.rb | 24 ++- .../cloud/dialogflow/v2/intents/operations.rb | 18 +- .../dialogflow/v2/intents/rest/client.rb | 24 ++- .../dialogflow/v2/intents/rest/operations.rb | 15 +- .../dialogflow/v2/knowledge_bases/client.rb | 18 +- .../v2/knowledge_bases/rest/client.rb | 18 +- .../dialogflow/v2/participants/client.rb | 30 +++- .../dialogflow/v2/participants/rest/client.rb | 27 ++- .../v2/session_entity_types/client.rb | 18 +- .../v2/session_entity_types/rest/client.rb | 18 +- .../cloud/dialogflow/v2/sessions/client.rb | 9 +- .../dialogflow/v2/sessions/rest/client.rb | 6 +- .../cloud/dialogflow/v2/versions/client.rb | 18 +- .../dialogflow/v2/versions/rest/client.rb | 18 +- .../v1/completion_service/client.rb | 12 +- .../v1/completion_service/operations.rb | 18 +- .../v1/completion_service/rest/client.rb | 12 +- .../v1/completion_service/rest/operations.rb | 15 +- .../conversational_search_service/client.rb | 21 ++- .../rest/client.rb | 21 ++- .../v1/data_store_service/client.rb | 18 +- .../v1/data_store_service/operations.rb | 18 +- .../v1/data_store_service/rest/client.rb | 18 +- .../v1/data_store_service/rest/operations.rb | 15 +- .../v1/document_service/client.rb | 24 ++- .../v1/document_service/operations.rb | 18 +- .../v1/document_service/rest/client.rb | 24 ++- .../v1/document_service/rest/operations.rb | 15 +- .../v1/engine_service/client.rb | 18 +- .../v1/engine_service/operations.rb | 18 +- .../v1/engine_service/rest/client.rb | 18 +- .../v1/engine_service/rest/operations.rb | 15 +- .../v1/recommendation_service/client.rb | 6 +- .../v1/recommendation_service/rest/client.rb | 6 +- .../v1/schema_service/client.rb | 18 +- .../v1/schema_service/operations.rb | 18 +- .../v1/schema_service/rest/client.rb | 18 +- .../v1/schema_service/rest/operations.rb | 15 +- .../v1/search_service/client.rb | 6 +- .../v1/search_service/rest/client.rb | 6 +- .../v1/site_search_engine_service/client.rb | 39 +++-- .../site_search_engine_service/operations.rb | 18 +- .../site_search_engine_service/rest/client.rb | 39 +++-- .../rest/operations.rb | 15 +- .../v1/user_event_service/client.rb | 12 +- .../v1/user_event_service/operations.rb | 18 +- .../v1/user_event_service/rest/client.rb | 12 +- .../v1/user_event_service/rest/operations.rb | 15 +- .../v1beta/completion_service/client.rb | 12 +- .../v1beta/completion_service/operations.rb | 18 +- .../v1beta/completion_service/rest/client.rb | 12 +- .../completion_service/rest/operations.rb | 15 +- .../conversational_search_service/client.rb | 42 +++-- .../rest/client.rb | 42 +++-- .../v1beta/data_store_service/client.rb | 18 +- .../v1beta/data_store_service/operations.rb | 18 +- .../v1beta/data_store_service/rest/client.rb | 18 +- .../data_store_service/rest/operations.rb | 15 +- .../v1beta/document_service/client.rb | 24 ++- .../v1beta/document_service/operations.rb | 18 +- .../v1beta/document_service/rest/client.rb | 24 ++- .../document_service/rest/operations.rb | 15 +- .../v1beta/engine_service/client.rb | 27 ++- .../v1beta/engine_service/operations.rb | 18 +- .../v1beta/engine_service/rest/client.rb | 27 ++- .../v1beta/engine_service/rest/operations.rb | 15 +- .../grounded_generation_service/client.rb | 6 +- .../rest/client.rb | 6 +- .../v1beta/rank_service/client.rb | 6 +- .../v1beta/rank_service/rest/client.rb | 6 +- .../v1beta/recommendation_service/client.rb | 6 +- .../recommendation_service/rest/client.rb | 6 +- .../v1beta/schema_service/client.rb | 18 +- .../v1beta/schema_service/operations.rb | 18 +- .../v1beta/schema_service/rest/client.rb | 18 +- .../v1beta/schema_service/rest/operations.rb | 15 +- .../v1beta/search_service/client.rb | 6 +- .../v1beta/search_service/rest/client.rb | 6 +- .../v1beta/search_tuning_service/client.rb | 6 +- .../search_tuning_service/operations.rb | 18 +- .../search_tuning_service/rest/client.rb | 6 +- .../search_tuning_service/rest/operations.rb | 15 +- .../v1beta/serving_config_service/client.rb | 12 +- .../serving_config_service/rest/client.rb | 12 +- .../site_search_engine_service/client.rb | 39 +++-- .../site_search_engine_service/operations.rb | 18 +- .../site_search_engine_service/rest/client.rb | 39 +++-- .../rest/operations.rb | 15 +- .../v1beta/user_event_service/client.rb | 12 +- .../v1beta/user_event_service/operations.rb | 18 +- .../v1beta/user_event_service/rest/client.rb | 12 +- .../user_event_service/rest/operations.rb | 15 +- .../google/cloud/dlp/v2/dlp_service/client.rb | 159 ++++++++++++------ .../cloud/dlp/v2/dlp_service/rest/client.rb | 159 ++++++++++++------ .../v1/document_processor_service/client.rb | 69 +++++--- .../document_processor_service/operations.rb | 18 +- .../document_processor_service/rest/client.rb | 69 +++++--- .../rest/operations.rb | 15 +- .../document_processor_service/client.rb | 72 +++++--- .../document_processor_service/operations.rb | 18 +- .../document_processor_service/rest/client.rb | 72 +++++--- .../rest/operations.rb | 15 +- .../v1beta3/document_service/client.rb | 24 ++- .../v1beta3/document_service/operations.rb | 18 +- .../v1beta3/document_service/rest/client.rb | 24 ++- .../document_service/rest/operations.rb | 15 +- .../google/cloud/domains/v1/domains/client.rb | 48 ++++-- .../cloud/domains/v1/domains/operations.rb | 18 +- .../cloud/domains/v1/domains/rest/client.rb | 48 ++++-- .../domains/v1/domains/rest/operations.rb | 15 +- .../cloud/domains/v1beta1/domains/client.rb | 48 ++++-- .../domains/v1beta1/domains/operations.rb | 18 +- .../domains/v1beta1/domains/rest/client.rb | 48 ++++-- .../v1beta1/domains/rest/operations.rb | 15 +- .../edge_network/v1/edge_network/client.rb | 81 ++++++--- .../v1/edge_network/operations.rb | 18 +- .../v1/edge_network/rest/client.rb | 81 ++++++--- .../v1/edge_network/rest/operations.rb | 15 +- .../v1beta1/error_group_service/client.rb | 9 +- .../error_group_service/rest/client.rb | 9 +- .../v1beta1/error_stats_service/client.rb | 12 +- .../error_stats_service/rest/client.rb | 12 +- .../v1beta1/report_errors_service/client.rb | 6 +- .../report_errors_service/rest/client.rb | 6 +- .../v1/essential_contacts_service/client.rb | 24 ++- .../essential_contacts_service/rest/client.rb | 24 ++- .../publishing/v1/publisher/client.rb | 9 +- .../publishing/v1/publisher/rest/client.rb | 9 +- .../cloud/eventarc/v1/eventarc/client.rb | 57 +++++-- .../cloud/eventarc/v1/eventarc/operations.rb | 18 +- .../cloud/eventarc/v1/eventarc/rest/client.rb | 57 +++++-- .../eventarc/v1/eventarc/rest/operations.rb | 15 +- .../v1/cloud_filestore_manager/client.rb | 54 ++++-- .../v1/cloud_filestore_manager/operations.rb | 18 +- .../v1/cloud_filestore_manager/rest/client.rb | 54 ++++-- .../rest/operations.rb | 15 +- .../admin/v1/firestore_admin/client.rb | 72 +++++--- .../admin/v1/firestore_admin/operations.rb | 18 +- .../admin/v1/firestore_admin/rest/client.rb | 72 +++++--- .../v1/firestore_admin/rest/operations.rb | 15 +- .../cloud/firestore/v1/firestore/client.rb | 51 ++++-- .../firestore/v1/firestore/rest/client.rb | 45 +++-- .../v1/cloud_functions_service/client.rb | 36 ++-- .../v1/cloud_functions_service/operations.rb | 18 +- .../v1/cloud_functions_service/rest/client.rb | 36 ++-- .../rest/operations.rb | 15 +- .../functions/v2/function_service/client.rb | 27 ++- .../v2/function_service/operations.rb | 18 +- .../v2/function_service/rest/client.rb | 27 ++- .../v2/function_service/rest/operations.rb | 15 +- .../gke_backup/v1/backup_for_gke/client.rb | 78 ++++++--- .../v1/backup_for_gke/operations.rb | 18 +- .../v1/backup_for_gke/rest/client.rb | 78 ++++++--- .../v1/backup_for_gke/rest/operations.rb | 15 +- 236 files changed, 3916 insertions(+), 1604 deletions(-) diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb index afbf9b80b2c1..2514251902d7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/client.rb @@ -32,6 +32,9 @@ module Agents # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Agent Agents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -265,10 +268,11 @@ def list_agents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_agents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -352,10 +356,11 @@ def get_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -444,10 +449,11 @@ def create_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -536,10 +542,11 @@ def update_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -622,10 +629,11 @@ def delete_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -746,10 +754,11 @@ def export_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -872,10 +881,11 @@ def restore_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.restore_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -963,10 +973,11 @@ def validate_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.validate_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1053,10 +1064,11 @@ def get_agent_validation_result request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_agent_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1141,10 +1153,11 @@ def get_generative_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_generative_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1229,10 +1242,11 @@ def update_generative_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_generative_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb index e6f09de38b0b..e03e46e78ee7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb @@ -27,6 +27,9 @@ module V3 module Agents # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb index 2378e2f9e525..25c45ce8156b 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Agent Agents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -258,12 +261,13 @@ def list_agents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_agents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_agents.timeout, @@ -338,12 +342,13 @@ def get_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_agent.timeout, @@ -423,12 +428,13 @@ def create_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_agent.timeout, @@ -508,12 +514,13 @@ def update_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_agent.timeout, @@ -587,12 +594,13 @@ def delete_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_agent.timeout, @@ -704,12 +712,13 @@ def export_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_agent.timeout, @@ -823,12 +832,13 @@ def restore_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.restore_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.restore_agent.timeout, @@ -907,12 +917,13 @@ def validate_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.validate_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.validate_agent.timeout, @@ -990,12 +1001,13 @@ def get_agent_validation_result request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_agent_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_agent_validation_result.timeout, @@ -1071,12 +1083,13 @@ def get_generative_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_generative_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_generative_settings.timeout, @@ -1152,12 +1165,13 @@ def update_generative_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_generative_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_generative_settings.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb index af77e29e475d..4ea777eee00a 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb @@ -27,6 +27,9 @@ module Agents module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb index 6323c22e718f..543919bf5323 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb @@ -32,6 +32,9 @@ module Changelogs # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Changelog Changelogs}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -267,10 +270,11 @@ def list_changelogs request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_changelogs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -355,10 +359,11 @@ def get_changelog request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_changelog.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb index 8e49c47a87c6..bc3e79fc036d 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Changelog Changelogs}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -260,12 +263,13 @@ def list_changelogs request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_changelogs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_changelogs.timeout, @@ -341,12 +345,13 @@ def get_changelog request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_changelog.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_changelog.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb index 69b3370ee1ec..355b87b1047d 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb @@ -32,6 +32,9 @@ module Deployments # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Deployment Deployments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -249,10 +252,11 @@ def list_deployments request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_deployments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -339,10 +343,11 @@ def get_deployment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_deployment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb index 0f46b845141d..a547f5101cba 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Deployment Deployments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -242,12 +245,13 @@ def list_deployments request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_deployments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_deployments.timeout, @@ -325,12 +329,13 @@ def get_deployment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_deployment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_deployment.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb index e40fd8dd9343..11d3df4a0f05 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb @@ -32,6 +32,9 @@ module EntityTypes # Service for managing {::Google::Cloud::Dialogflow::CX::V3::EntityType EntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -265,10 +268,11 @@ def get_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -369,10 +373,11 @@ def create_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -472,10 +477,11 @@ def update_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -576,10 +582,11 @@ def delete_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -684,10 +691,11 @@ def list_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -812,10 +820,11 @@ def export_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -929,10 +938,11 @@ def import_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb index a6fe264c5b44..c9b79de35e90 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb @@ -27,6 +27,9 @@ module V3 module EntityTypes # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb index 1cd6509986aa..b9785d2a8988 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::EntityType EntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -258,12 +261,13 @@ def get_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_entity_type.timeout, @@ -355,12 +359,13 @@ def create_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_entity_type.timeout, @@ -451,12 +456,13 @@ def update_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_entity_type.timeout, @@ -548,12 +554,13 @@ def delete_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_entity_type.timeout, @@ -649,12 +656,13 @@ def list_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_entity_types.timeout, @@ -770,12 +778,13 @@ def export_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_entity_types.timeout, @@ -880,12 +889,13 @@ def import_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_entity_types.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb index 348bf480aa13..27d93fe60a6f 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb @@ -27,6 +27,9 @@ module EntityTypes module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/client.rb index 4eb4c7d3bc70..7da08a1bd9b7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/client.rb @@ -33,6 +33,9 @@ module Environments # {::Google::Cloud::Dialogflow::CX::V3::Environment Environments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -263,10 +266,11 @@ def list_environments request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_environments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -353,10 +357,11 @@ def get_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -458,10 +463,11 @@ def create_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -562,10 +568,11 @@ def update_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -652,10 +659,11 @@ def delete_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -749,10 +757,11 @@ def lookup_environment_history request, options = nil # Customize the options with defaults metadata = @config.rpcs.lookup_environment_history.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -853,10 +862,11 @@ def run_continuous_test request, options = nil # Customize the options with defaults metadata = @config.rpcs.run_continuous_test.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -950,10 +960,11 @@ def list_continuous_test_results request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_continuous_test_results.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1059,10 +1070,11 @@ def deploy_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.deploy_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb index 456e0e8b6aaa..84e0e15dd518 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb @@ -27,6 +27,9 @@ module V3 module Environments # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb index 033933c36052..7d012461d3b7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb @@ -35,6 +35,9 @@ module Rest # {::Google::Cloud::Dialogflow::CX::V3::Environment Environments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -256,12 +259,13 @@ def list_environments request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_environments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_environments.timeout, @@ -339,12 +343,13 @@ def get_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_environment.timeout, @@ -437,12 +442,13 @@ def create_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_environment.timeout, @@ -534,12 +540,13 @@ def update_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_environment.timeout, @@ -617,12 +624,13 @@ def delete_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, @@ -707,12 +715,13 @@ def lookup_environment_history request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.lookup_environment_history.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.lookup_environment_history.timeout, @@ -804,12 +813,13 @@ def run_continuous_test request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.run_continuous_test.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.run_continuous_test.timeout, @@ -894,12 +904,13 @@ def list_continuous_test_results request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_continuous_test_results.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_continuous_test_results.timeout, @@ -996,12 +1007,13 @@ def deploy_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.deploy_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.deploy_flow.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb index 6c52169c2ed1..c4d3987164ea 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb @@ -27,6 +27,9 @@ module Environments module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb index 939ed81dd441..9f4ae6800fed 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb @@ -32,6 +32,9 @@ module Experiments # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -249,10 +252,11 @@ def list_experiments request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_experiments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -339,10 +343,11 @@ def get_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -430,10 +435,11 @@ def create_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -518,10 +524,11 @@ def update_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -607,10 +614,11 @@ def delete_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -696,10 +704,11 @@ def start_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.start_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -784,10 +793,11 @@ def stop_experiment request, options = nil # Customize the options with defaults metadata = @config.rpcs.stop_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb index 2247a292343d..6d3b0878ea02 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -242,12 +245,13 @@ def list_experiments request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_experiments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_experiments.timeout, @@ -325,12 +329,13 @@ def get_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_experiment.timeout, @@ -409,12 +414,13 @@ def create_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_experiment.timeout, @@ -490,12 +496,13 @@ def update_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_experiment.timeout, @@ -572,12 +579,13 @@ def delete_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_experiment.timeout, @@ -654,12 +662,13 @@ def start_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.start_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.start_experiment.timeout, @@ -735,12 +744,13 @@ def stop_experiment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.stop_experiment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.stop_experiment.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb index 182406441a9b..40c270761b9a 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/client.rb @@ -32,6 +32,9 @@ module Flows # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Flow Flows}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -270,10 +273,11 @@ def create_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -368,10 +372,11 @@ def delete_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -477,10 +482,11 @@ def list_flows request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_flows.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -579,10 +585,11 @@ def get_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -684,10 +691,11 @@ def update_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -792,10 +800,11 @@ def train_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.train_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -884,10 +893,11 @@ def validate_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.validate_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -974,10 +984,11 @@ def get_flow_validation_result request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_flow_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1097,10 +1108,11 @@ def import_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1217,10 +1229,11 @@ def export_flow request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb index 6cd91c5691c8..48d48d5d5355 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb @@ -27,6 +27,9 @@ module V3 module Flows # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb index 32e29810fa23..61fdbb169eec 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Flow Flows}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -263,12 +266,13 @@ def create_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_flow.timeout, @@ -354,12 +358,13 @@ def delete_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_flow.timeout, @@ -456,12 +461,13 @@ def list_flows request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_flows.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_flows.timeout, @@ -551,12 +557,13 @@ def get_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_flow.timeout, @@ -649,12 +656,13 @@ def update_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_flow.timeout, @@ -750,12 +758,13 @@ def train_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.train_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.train_flow.timeout, @@ -835,12 +844,13 @@ def validate_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.validate_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.validate_flow.timeout, @@ -918,12 +928,13 @@ def get_flow_validation_result request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_flow_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_flow_validation_result.timeout, @@ -1034,12 +1045,13 @@ def import_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_flow.timeout, @@ -1147,12 +1159,13 @@ def export_flow request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_flow.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_flow.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb index 82158e93afbf..e055ee6c1019 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb @@ -27,6 +27,9 @@ module Flows module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/client.rb index e129e6fe11ab..e30326c845a7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/client.rb @@ -32,6 +32,9 @@ module Generators # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Generator Generators} # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -248,10 +251,11 @@ def list_generators request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_generators.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -338,10 +342,11 @@ def get_generator request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -430,10 +435,11 @@ def create_generator request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -520,10 +526,11 @@ def update_generator request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -616,10 +623,11 @@ def delete_generator request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb index a5c8a9dca405..56a409225754 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Generator Generators} # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -241,12 +244,13 @@ def list_generators request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_generators.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_generators.timeout, @@ -324,12 +328,13 @@ def get_generator request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_generator.timeout, @@ -409,12 +414,13 @@ def create_generator request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_generator.timeout, @@ -492,12 +498,13 @@ def update_generator request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_generator.timeout, @@ -581,12 +588,13 @@ def delete_generator request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_generator.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_generator.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb index 23a212bde0dd..5b7a021b41c2 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/client.rb @@ -32,6 +32,9 @@ module Intents # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Intent Intents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -273,10 +276,11 @@ def list_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -372,10 +376,11 @@ def get_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -474,10 +479,11 @@ def create_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -576,10 +582,11 @@ def update_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -667,10 +674,11 @@ def delete_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -783,10 +791,11 @@ def import_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -907,10 +916,11 @@ def export_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb index 7a1f8cf50ac0..cf8f7dfe5ba0 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb @@ -27,6 +27,9 @@ module V3 module Intents # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb index df02d334bc61..99bff250f62d 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Intent Intents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -266,12 +269,13 @@ def list_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_intents.timeout, @@ -358,12 +362,13 @@ def get_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_intent.timeout, @@ -453,12 +458,13 @@ def create_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_intent.timeout, @@ -548,12 +554,13 @@ def update_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_intent.timeout, @@ -632,12 +639,13 @@ def delete_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_intent.timeout, @@ -741,12 +749,13 @@ def import_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_intents.timeout, @@ -858,12 +867,13 @@ def export_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_intents.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb index 42240c3cff8c..a473ee1c6a69 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb @@ -27,6 +27,9 @@ module Intents module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/client.rb index 56ff4597a91e..6e2cd88089cf 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/client.rb @@ -32,6 +32,9 @@ module Pages # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Page Pages}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -269,10 +272,11 @@ def list_pages request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_pages.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -379,10 +383,11 @@ def get_page request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -493,10 +498,11 @@ def create_page request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -606,10 +612,11 @@ def update_page request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -708,10 +715,11 @@ def delete_page request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb index 97977bcf6cae..6b4d061d4050 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Page Pages}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -262,12 +265,13 @@ def list_pages request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_pages.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_pages.timeout, @@ -365,12 +369,13 @@ def get_page request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_page.timeout, @@ -472,12 +477,13 @@ def create_page request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_page.timeout, @@ -578,12 +584,13 @@ def update_page request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_page.timeout, @@ -673,12 +680,13 @@ def delete_page request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_page.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_page.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb index f766a6cdb7ef..2ca9e6a77033 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb @@ -32,6 +32,9 @@ module SecuritySettingsService # Service for managing security settings for Dialogflow. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -240,10 +243,11 @@ def create_security_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -329,10 +333,11 @@ def get_security_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -419,10 +424,11 @@ def update_security_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -514,10 +520,11 @@ def list_security_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -604,10 +611,11 @@ def delete_security_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb index e8e3c40d6b6e..b2500ad46b04 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing security settings for Dialogflow. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -233,12 +236,13 @@ def create_security_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_security_settings.timeout, @@ -315,12 +319,13 @@ def get_security_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_security_settings.timeout, @@ -398,12 +403,13 @@ def update_security_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_security_settings.timeout, @@ -486,12 +492,13 @@ def list_security_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_security_settings.timeout, @@ -569,12 +576,13 @@ def delete_security_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_security_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_security_settings.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb index ee60d4706b74..013f2580d346 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb @@ -33,6 +33,9 @@ module SessionEntityTypes # {::Google::Cloud::Dialogflow::CX::V3::SessionEntityType SessionEntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -251,10 +254,11 @@ def list_session_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_session_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -343,10 +347,11 @@ def get_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -435,10 +440,11 @@ def create_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -528,10 +534,11 @@ def update_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -619,10 +626,11 @@ def delete_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb index 9c01d17a0b03..4f4d0bca56d3 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb @@ -35,6 +35,9 @@ module Rest # {::Google::Cloud::Dialogflow::CX::V3::SessionEntityType SessionEntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -244,12 +247,13 @@ def list_session_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_session_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_session_entity_types.timeout, @@ -329,12 +333,13 @@ def get_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_session_entity_type.timeout, @@ -414,12 +419,13 @@ def create_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_session_entity_type.timeout, @@ -500,12 +506,13 @@ def update_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_session_entity_type.timeout, @@ -584,12 +591,13 @@ def delete_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_session_entity_type.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb index b5f7a7809656..8027489a409f 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb @@ -35,6 +35,9 @@ module Sessions # determine user intent and respond. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -276,10 +279,11 @@ def detect_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -389,10 +393,11 @@ def server_streaming_detect_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.server_streaming_detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -481,10 +486,11 @@ def streaming_detect_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.streaming_detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.streaming_detect_intent.timeout, @@ -576,10 +582,11 @@ def match_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.match_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -672,10 +679,11 @@ def fulfill_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.fulfill_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -766,10 +774,11 @@ def submit_answer_feedback request, options = nil # Customize the options with defaults metadata = @config.rpcs.submit_answer_feedback.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb index 44e35a6c11ce..76f12afc610c 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb @@ -37,6 +37,9 @@ module Rest # determine user intent and respond. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -267,12 +270,13 @@ def detect_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.detect_intent.timeout, @@ -369,12 +373,13 @@ def server_streaming_detect_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.server_streaming_detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.server_streaming_detect_intent.timeout, @@ -470,12 +475,13 @@ def match_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.match_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.match_intent.timeout, @@ -559,12 +565,13 @@ def fulfill_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.fulfill_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.fulfill_intent.timeout, @@ -646,12 +653,13 @@ def submit_answer_feedback request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.submit_answer_feedback.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.submit_answer_feedback.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb index f69a8b7a896f..f5b28d7b1a36 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb @@ -33,6 +33,9 @@ module TestCases # {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -264,10 +267,11 @@ def list_test_cases request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -354,10 +358,11 @@ def batch_delete_test_cases request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_delete_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -441,10 +446,11 @@ def get_test_case request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -529,10 +535,11 @@ def create_test_case request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -619,10 +626,11 @@ def update_test_case request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -725,10 +733,11 @@ def run_test_case request, options = nil # Customize the options with defaults metadata = @config.rpcs.run_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -835,10 +844,11 @@ def batch_run_test_cases request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_run_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -924,10 +934,11 @@ def calculate_coverage request, options = nil # Customize the options with defaults metadata = @config.rpcs.calculate_coverage.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1040,10 +1051,11 @@ def import_test_cases request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1169,10 +1181,11 @@ def export_test_cases request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1293,10 +1306,11 @@ def list_test_case_results request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_test_case_results.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1381,10 +1395,11 @@ def get_test_case_result request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_test_case_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb index 7d9a86762f64..fd15763ea963 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb @@ -27,6 +27,9 @@ module V3 module TestCases # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb index 03482c0619e6..cd48b5e06ed7 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb @@ -35,6 +35,9 @@ module Rest # {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -257,12 +260,13 @@ def list_test_cases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_test_cases.timeout, @@ -340,12 +344,13 @@ def batch_delete_test_cases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_delete_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_delete_test_cases.timeout, @@ -420,12 +425,13 @@ def get_test_case request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_test_case.timeout, @@ -501,12 +507,13 @@ def create_test_case request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_test_case.timeout, @@ -584,12 +591,13 @@ def update_test_case request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_test_case.timeout, @@ -683,12 +691,13 @@ def run_test_case request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.run_test_case.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.run_test_case.timeout, @@ -786,12 +795,13 @@ def batch_run_test_cases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_run_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_run_test_cases.timeout, @@ -868,12 +878,13 @@ def calculate_coverage request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.calculate_coverage.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.calculate_coverage.timeout, @@ -977,12 +988,13 @@ def import_test_cases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_test_cases.timeout, @@ -1099,12 +1111,13 @@ def export_test_cases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_test_cases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_test_cases.timeout, @@ -1216,12 +1229,13 @@ def list_test_case_results request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_test_case_results.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_test_case_results.timeout, @@ -1297,12 +1311,13 @@ def get_test_case_result request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_test_case_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_test_case_result.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb index 71adcc430bd5..5fc07c275a5b 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb @@ -27,6 +27,9 @@ module TestCases module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb index ad53e053dbfb..b8b3aaa3f138 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb @@ -33,6 +33,9 @@ module TransitionRouteGroups # {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroups}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -263,10 +266,11 @@ def list_transition_route_groups request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_transition_route_groups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -368,10 +372,11 @@ def get_transition_route_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -478,10 +483,11 @@ def create_transition_route_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -582,10 +588,11 @@ def update_transition_route_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -685,10 +692,11 @@ def delete_transition_route_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb index ce20c9140993..6b46077c1030 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb @@ -35,6 +35,9 @@ module Rest # {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroups}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -256,12 +259,13 @@ def list_transition_route_groups request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_transition_route_groups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_transition_route_groups.timeout, @@ -354,12 +358,13 @@ def get_transition_route_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_transition_route_group.timeout, @@ -457,12 +462,13 @@ def create_transition_route_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_transition_route_group.timeout, @@ -554,12 +560,13 @@ def update_transition_route_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_transition_route_group.timeout, @@ -650,12 +657,13 @@ def delete_transition_route_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_transition_route_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_transition_route_group.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/client.rb index 357848b9c584..c69e20dcae12 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/client.rb @@ -32,6 +32,9 @@ module Versions # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Version Versions}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -262,10 +265,11 @@ def list_versions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -350,10 +354,11 @@ def get_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -456,10 +461,11 @@ def create_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -545,10 +551,11 @@ def update_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -632,10 +639,11 @@ def delete_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -740,10 +748,11 @@ def load_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.load_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -843,10 +852,11 @@ def compare_versions request, options = nil # Customize the options with defaults metadata = @config.rpcs.compare_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb index fb58dc22404d..b8b572a89a47 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb @@ -27,6 +27,9 @@ module V3 module Versions # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb index c4c829c78f1c..72ccca8fd996 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Version Versions}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -255,12 +258,13 @@ def list_versions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_versions.timeout, @@ -336,12 +340,13 @@ def get_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_version.timeout, @@ -435,12 +440,13 @@ def create_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_version.timeout, @@ -517,12 +523,13 @@ def update_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_version.timeout, @@ -597,12 +604,13 @@ def delete_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_version.timeout, @@ -698,12 +706,13 @@ def load_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.load_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.load_version.timeout, @@ -794,12 +803,13 @@ def compare_versions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.compare_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.compare_versions.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb index e9d3d6f7a9c0..c06fd629670a 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb @@ -27,6 +27,9 @@ module Versions module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb index 49b7a75d666f..cd5408500ac5 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb @@ -32,6 +32,9 @@ module Webhooks # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -246,10 +249,11 @@ def list_webhooks request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_webhooks.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -334,10 +338,11 @@ def get_webhook request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -422,10 +427,11 @@ def create_webhook request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -510,10 +516,11 @@ def update_webhook request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -608,10 +615,11 @@ def delete_webhook request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb index 4cdc848ad326..7ddc2bb60958 100644 --- a/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +++ b/google-cloud-dialogflow-cx-v3/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb @@ -34,6 +34,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -239,12 +242,13 @@ def list_webhooks request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_webhooks.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_webhooks.timeout, @@ -320,12 +324,13 @@ def get_webhook request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_webhook.timeout, @@ -401,12 +406,13 @@ def create_webhook request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_webhook.timeout, @@ -482,12 +488,13 @@ def update_webhook request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_webhook.timeout, @@ -573,12 +580,13 @@ def delete_webhook request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_webhook.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_webhook.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb index ac697f47ba7c..aacbdb562bf9 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/client.rb @@ -31,6 +31,9 @@ module Agents # Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -250,10 +253,11 @@ def get_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -341,10 +345,11 @@ def set_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.set_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -427,10 +432,11 @@ def delete_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -528,10 +534,11 @@ def search_agents request, options = nil # Customize the options with defaults metadata = @config.rpcs.search_agents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -635,10 +642,11 @@ def train_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.train_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -749,10 +757,11 @@ def export_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -880,10 +889,11 @@ def import_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1009,10 +1019,11 @@ def restore_agent request, options = nil # Customize the options with defaults metadata = @config.rpcs.restore_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1103,10 +1114,11 @@ def get_validation_result request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/operations.rb index 9b926da7d9ae..eb3d4ebcfb21 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/operations.rb @@ -26,6 +26,9 @@ module V2 module Agents # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb index 420c6a701756..44dafdf2e519 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -243,12 +246,13 @@ def get_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_agent.timeout, @@ -327,12 +331,13 @@ def set_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.set_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.set_agent.timeout, @@ -406,12 +411,13 @@ def delete_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_agent.timeout, @@ -500,12 +506,13 @@ def search_agents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search_agents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_agents.timeout, @@ -600,12 +607,13 @@ def train_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.train_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.train_agent.timeout, @@ -707,12 +715,13 @@ def export_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_agent.timeout, @@ -831,12 +840,13 @@ def import_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_agent.timeout, @@ -953,12 +963,13 @@ def restore_agent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.restore_agent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.restore_agent.timeout, @@ -1040,12 +1051,13 @@ def get_validation_result request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_validation_result.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_validation_result.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb index 34b2107c637a..6b14cafc7e6e 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb @@ -26,6 +26,9 @@ module Agents module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/client.rb index bd70be1473bb..23347320dc2f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/client.rb @@ -32,6 +32,9 @@ module AnswerRecords # {::Google::Cloud::Dialogflow::V2::AnswerRecord AnswerRecords}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -259,10 +262,11 @@ def list_answer_records request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_answer_records.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -347,10 +351,11 @@ def update_answer_record request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_answer_record.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb index 4e52a2f52222..728cc3b4cf9f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::AnswerRecord AnswerRecords}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -252,12 +255,13 @@ def list_answer_records request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_answer_records.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_answer_records.timeout, @@ -333,12 +337,13 @@ def update_answer_record request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_answer_record.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_answer_record.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/client.rb index 13bcfcc7258f..3e89eecdc382 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/client.rb @@ -31,6 +31,9 @@ module Contexts # Service for managing {::Google::Cloud::Dialogflow::V2::Context Contexts}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -249,10 +252,11 @@ def list_contexts request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_contexts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -340,10 +344,11 @@ def get_context request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -434,10 +439,11 @@ def create_context request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -521,10 +527,11 @@ def update_context request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -611,10 +618,11 @@ def delete_context request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -701,10 +709,11 @@ def delete_all_contexts request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_all_contexts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb index 6a85bc8c6386..269daf0de572 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Context Contexts}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -242,12 +245,13 @@ def list_contexts request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_contexts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_contexts.timeout, @@ -326,12 +330,13 @@ def get_context request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_context.timeout, @@ -413,12 +418,13 @@ def create_context request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_context.timeout, @@ -493,12 +499,13 @@ def update_context request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_context.timeout, @@ -576,12 +583,13 @@ def delete_context request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_context.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_context.timeout, @@ -659,12 +667,13 @@ def delete_all_contexts request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_all_contexts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_all_contexts.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb index 0490f849c0a0..6a41dccd468d 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb @@ -34,6 +34,9 @@ module ConversationDatasets # customizable metadata that can be used for model training. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -271,10 +274,11 @@ def create_conversation_dataset request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -359,10 +363,11 @@ def get_conversation_dataset request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -455,10 +460,11 @@ def list_conversation_datasets request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversation_datasets.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -559,10 +565,11 @@ def delete_conversation_dataset request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -667,10 +674,11 @@ def import_conversation_data request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_conversation_data.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb index a9bd53539505..feb86da48f0f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb @@ -26,6 +26,9 @@ module V2 module ConversationDatasets # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb index 1fd8d5635a5e..72e1c476476b 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb @@ -36,6 +36,9 @@ module Rest # customizable metadata that can be used for model training. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -264,12 +267,13 @@ def create_conversation_dataset request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation_dataset.timeout, @@ -345,12 +349,13 @@ def get_conversation_dataset request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation_dataset.timeout, @@ -434,12 +439,13 @@ def list_conversation_datasets request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversation_datasets.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversation_datasets.timeout, @@ -531,12 +537,13 @@ def delete_conversation_dataset request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_conversation_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_conversation_dataset.timeout, @@ -632,12 +639,13 @@ def import_conversation_data request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_conversation_data.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_conversation_data.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb index 309d282bc044..51f0f9ae2fb5 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb @@ -26,6 +26,9 @@ module ConversationDatasets module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/client.rb index 0a1a052f8b7d..a086b75d8e6a 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/client.rb @@ -31,6 +31,9 @@ module ConversationModels # Manages a collection of models for human agent assistant. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -268,10 +271,11 @@ def create_conversation_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -355,10 +359,11 @@ def get_conversation_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -450,10 +455,11 @@ def list_conversation_models request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversation_models.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -553,10 +559,11 @@ def delete_conversation_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -659,10 +666,11 @@ def deploy_conversation_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.deploy_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -765,10 +773,11 @@ def undeploy_conversation_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.undeploy_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -853,10 +862,11 @@ def get_conversation_model_evaluation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation_model_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -948,10 +958,11 @@ def list_conversation_model_evaluations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversation_model_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1045,10 +1056,11 @@ def create_conversation_model_evaluation request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation_model_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb index 28f18cf4166d..111d816b0cc4 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb @@ -26,6 +26,9 @@ module V2 module ConversationModels # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb index c9635fa927b5..434eb72ccfbd 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Manages a collection of models for human agent assistant. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -261,12 +264,13 @@ def create_conversation_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation_model.timeout, @@ -341,12 +345,13 @@ def get_conversation_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation_model.timeout, @@ -429,12 +434,13 @@ def list_conversation_models request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversation_models.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversation_models.timeout, @@ -525,12 +531,13 @@ def delete_conversation_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_conversation_model.timeout, @@ -624,12 +631,13 @@ def deploy_conversation_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.deploy_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.deploy_conversation_model.timeout, @@ -723,12 +731,13 @@ def undeploy_conversation_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.undeploy_conversation_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.undeploy_conversation_model.timeout, @@ -804,12 +813,13 @@ def get_conversation_model_evaluation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation_model_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation_model_evaluation.timeout, @@ -892,12 +902,13 @@ def list_conversation_model_evaluations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversation_model_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversation_model_evaluations.timeout, @@ -982,12 +993,13 @@ def create_conversation_model_evaluation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation_model_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation_model_evaluation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb index fd8ad0c255bb..4c8f85f73439 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb @@ -26,6 +26,9 @@ module ConversationModels module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb index a9b289c98114..8e0277494beb 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb @@ -32,6 +32,9 @@ module ConversationProfiles # {::Google::Cloud::Dialogflow::V2::ConversationProfile ConversationProfiles}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -260,10 +263,11 @@ def list_conversation_profiles request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversation_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -348,10 +352,11 @@ def get_conversation_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -441,10 +446,11 @@ def create_conversation_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -533,10 +539,11 @@ def update_conversation_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -620,10 +627,11 @@ def delete_conversation_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -736,10 +744,11 @@ def set_suggestion_feature_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.set_suggestion_feature_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -846,10 +855,11 @@ def clear_suggestion_feature_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.clear_suggestion_feature_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb index 8d524351a72c..1b5b7094cd6c 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb @@ -26,6 +26,9 @@ module V2 module ConversationProfiles # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb index 9046cf47add3..bcf69b4e66e9 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::ConversationProfile ConversationProfiles}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -253,12 +256,13 @@ def list_conversation_profiles request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversation_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversation_profiles.timeout, @@ -334,12 +338,13 @@ def get_conversation_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation_profile.timeout, @@ -420,12 +425,13 @@ def create_conversation_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation_profile.timeout, @@ -505,12 +511,13 @@ def update_conversation_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_conversation_profile.timeout, @@ -585,12 +592,13 @@ def delete_conversation_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_conversation_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_conversation_profile.timeout, @@ -694,12 +702,13 @@ def set_suggestion_feature_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.set_suggestion_feature_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.set_suggestion_feature_config.timeout, @@ -797,12 +806,13 @@ def clear_suggestion_feature_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.clear_suggestion_feature_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.clear_suggestion_feature_config.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb index 091e0c64d925..39829c6b9b29 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb @@ -26,6 +26,9 @@ module ConversationProfiles module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb index 35c41f8bed9b..8d6a924c355e 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/client.rb @@ -32,6 +32,9 @@ module Conversations # {::Google::Cloud::Dialogflow::V2::Conversation Conversations}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -270,10 +273,11 @@ def create_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -383,10 +387,11 @@ def list_conversations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +476,11 @@ def get_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -559,10 +565,11 @@ def complete_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.complete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -668,10 +675,11 @@ def list_messages request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_messages.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -771,10 +779,11 @@ def suggest_conversation_summary request, options = nil # Customize the options with defaults metadata = @config.rpcs.suggest_conversation_summary.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -871,10 +880,11 @@ def generate_stateless_summary request, options = nil # Customize the options with defaults metadata = @config.rpcs.generate_stateless_summary.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -981,10 +991,11 @@ def search_knowledge request, options = nil # Customize the options with defaults metadata = @config.rpcs.search_knowledge.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb index eaaa1c0587ee..c4db6c9611ee 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::Conversation Conversations}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -263,12 +266,13 @@ def create_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, @@ -369,12 +373,13 @@ def list_conversations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, @@ -450,12 +455,13 @@ def get_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, @@ -531,12 +537,13 @@ def complete_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.complete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.complete_conversation.timeout, @@ -633,12 +640,13 @@ def list_messages request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_messages.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_messages.timeout, @@ -729,12 +737,13 @@ def suggest_conversation_summary request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.suggest_conversation_summary.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.suggest_conversation_summary.timeout, @@ -822,12 +831,13 @@ def generate_stateless_summary request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.generate_stateless_summary.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.generate_stateless_summary.timeout, @@ -925,12 +935,13 @@ def search_knowledge request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search_knowledge.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_knowledge.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/client.rb index c142f9df7883..6b587c066034 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/client.rb @@ -32,6 +32,9 @@ module Documents # {::Google::Cloud::Dialogflow::V2::Document Documents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -283,10 +286,11 @@ def list_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -371,10 +375,11 @@ def get_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -475,10 +480,11 @@ def create_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -593,10 +599,11 @@ def import_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -697,10 +704,11 @@ def delete_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -802,10 +810,11 @@ def update_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -923,10 +932,11 @@ def reload_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.reload_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1035,10 +1045,11 @@ def export_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/operations.rb index c4751ad67761..b67ea9cee6ce 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/operations.rb @@ -26,6 +26,9 @@ module V2 module Documents # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/client.rb index db40ff1dd3d6..51e12535cf39 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::Document Documents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -276,12 +279,13 @@ def list_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_documents.timeout, @@ -357,12 +361,13 @@ def get_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_document.timeout, @@ -454,12 +459,13 @@ def create_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_document.timeout, @@ -565,12 +571,13 @@ def import_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_documents.timeout, @@ -662,12 +669,13 @@ def delete_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_document.timeout, @@ -760,12 +768,13 @@ def update_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_document.timeout, @@ -874,12 +883,13 @@ def reload_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.reload_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.reload_document.timeout, @@ -979,12 +989,13 @@ def export_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_document.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb index e3cf280f65c5..b1fdb77cebae 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb @@ -26,6 +26,9 @@ module Documents module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb index 4ab45abf90f5..c78c451a7cfe 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/client.rb @@ -31,6 +31,9 @@ module EntityTypes # Service for managing {::Google::Cloud::Dialogflow::V2::EntityType EntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -265,10 +268,11 @@ def list_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -358,10 +362,11 @@ def get_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -456,10 +461,11 @@ def create_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -553,10 +559,11 @@ def update_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -643,10 +650,11 @@ def delete_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -764,10 +772,11 @@ def batch_update_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_update_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -874,10 +883,11 @@ def batch_delete_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_delete_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -989,10 +999,11 @@ def batch_create_entities request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_create_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1108,10 +1119,11 @@ def batch_update_entities request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_update_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1225,10 +1237,11 @@ def batch_delete_entities request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_delete_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/operations.rb index 2fd9a3cb3b22..e9cb789ca89c 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/operations.rb @@ -26,6 +26,9 @@ module V2 module EntityTypes # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb index 8598520b40a7..52f036ff317f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::EntityType EntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -258,12 +261,13 @@ def list_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_entity_types.timeout, @@ -344,12 +348,13 @@ def get_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_entity_type.timeout, @@ -435,12 +440,13 @@ def create_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_entity_type.timeout, @@ -525,12 +531,13 @@ def update_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_entity_type.timeout, @@ -608,12 +615,13 @@ def delete_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_entity_type.timeout, @@ -722,12 +730,13 @@ def batch_update_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_update_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_update_entity_types.timeout, @@ -825,12 +834,13 @@ def batch_delete_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_delete_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_delete_entity_types.timeout, @@ -933,12 +943,13 @@ def batch_create_entities request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_create_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_create_entities.timeout, @@ -1045,12 +1056,13 @@ def batch_update_entities request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_update_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_update_entities.timeout, @@ -1155,12 +1167,13 @@ def batch_delete_entities request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_delete_entities.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_delete_entities.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb index d581ea6865c8..18146e523bee 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb @@ -26,6 +26,9 @@ module EntityTypes module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/client.rb index fd22fb14f3fe..5696f33071c4 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/client.rb @@ -31,6 +31,9 @@ module Environments # Service for managing {::Google::Cloud::Dialogflow::V2::Environment Environments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -248,10 +251,11 @@ def list_environments request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_environments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -341,10 +345,11 @@ def get_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -434,10 +439,11 @@ def create_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -537,10 +543,11 @@ def update_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -629,10 +636,11 @@ def delete_environment request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -730,10 +738,11 @@ def get_environment_history request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_environment_history.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/rest/client.rb index 0f7f5be58768..0a2310f2f238 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/environments/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Environment Environments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -241,12 +244,13 @@ def list_environments request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_environments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_environments.timeout, @@ -327,12 +331,13 @@ def get_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_environment.timeout, @@ -413,12 +418,13 @@ def create_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_environment.timeout, @@ -509,12 +515,13 @@ def update_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_environment.timeout, @@ -594,12 +601,13 @@ def delete_environment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_environment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, @@ -688,12 +696,13 @@ def get_environment_history request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_environment_history.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_environment_history.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/client.rb index 37ce703906f6..e59860d73ecb 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/client.rb @@ -31,6 +31,9 @@ module Fulfillments # Service for managing {::Google::Cloud::Dialogflow::V2::Fulfillment Fulfillments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -236,10 +239,11 @@ def get_fulfillment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_fulfillment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -324,10 +328,11 @@ def update_fulfillment request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_fulfillment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb index d264fff0757c..cc55ec107b93 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Fulfillment Fulfillments}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -229,12 +232,13 @@ def get_fulfillment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_fulfillment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_fulfillment.timeout, @@ -310,12 +314,13 @@ def update_fulfillment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_fulfillment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_fulfillment.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb index a9b2a789ee37..c56b24f5cd9d 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/client.rb @@ -31,6 +31,9 @@ module Intents # Service for managing {::Google::Cloud::Dialogflow::V2::Intent Intents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -275,10 +278,11 @@ def list_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -370,10 +374,11 @@ def get_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +475,11 @@ def create_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -569,10 +575,11 @@ def update_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -660,10 +667,11 @@ def delete_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -782,10 +790,11 @@ def batch_update_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_update_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -892,10 +901,11 @@ def batch_delete_intents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_delete_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/operations.rb index b9071d811e5c..a09f1f9b0632 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/operations.rb @@ -26,6 +26,9 @@ module V2 module Intents # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb index 0b2b4cb2a182..f201e534589a 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Intent Intents}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -268,12 +271,13 @@ def list_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_intents.timeout, @@ -356,12 +360,13 @@ def get_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_intent.timeout, @@ -449,12 +454,13 @@ def create_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_intent.timeout, @@ -541,12 +547,13 @@ def update_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_intent.timeout, @@ -625,12 +632,13 @@ def delete_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_intent.timeout, @@ -740,12 +748,13 @@ def batch_update_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_update_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_update_intents.timeout, @@ -843,12 +852,13 @@ def batch_delete_intents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_delete_intents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_delete_intents.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb index 3b1b964d43f9..197055774c71 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb @@ -26,6 +26,9 @@ module Intents module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb index 54b28960a484..ae9e9e81b71d 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb @@ -32,6 +32,9 @@ module KnowledgeBases # {::Google::Cloud::Dialogflow::V2::KnowledgeBase KnowledgeBases}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -273,10 +276,11 @@ def list_knowledge_bases request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_knowledge_bases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -361,10 +365,11 @@ def get_knowledge_base request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -449,10 +454,11 @@ def create_knowledge_base request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -539,10 +545,11 @@ def delete_knowledge_base request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -628,10 +635,11 @@ def update_knowledge_base request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb index e0be88fc0bcd..cae40a36261e 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::KnowledgeBase KnowledgeBases}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -266,12 +269,13 @@ def list_knowledge_bases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_knowledge_bases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_knowledge_bases.timeout, @@ -347,12 +351,13 @@ def get_knowledge_base request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_knowledge_base.timeout, @@ -428,12 +433,13 @@ def create_knowledge_base request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_knowledge_base.timeout, @@ -511,12 +517,13 @@ def delete_knowledge_base request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_knowledge_base.timeout, @@ -593,12 +600,13 @@ def update_knowledge_base request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_knowledge_base.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_knowledge_base.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb index 13443f28e452..84f5ecc9e07f 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/client.rb @@ -31,6 +31,9 @@ module Participants # Service for managing {::Google::Cloud::Dialogflow::V2::Participant Participants}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -246,10 +249,11 @@ def create_participant request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -333,10 +337,11 @@ def get_participant request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -429,10 +434,11 @@ def list_participants request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_participants.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -517,10 +523,11 @@ def update_participant request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -636,10 +643,11 @@ def analyze_content request, options = nil # Customize the options with defaults metadata = @config.rpcs.analyze_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -736,10 +744,11 @@ def streaming_analyze_content request, options = nil # Customize the options with defaults metadata = @config.rpcs.streaming_analyze_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.streaming_analyze_content.timeout, @@ -829,10 +838,11 @@ def suggest_articles request, options = nil # Customize the options with defaults metadata = @config.rpcs.suggest_articles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -929,10 +939,11 @@ def suggest_faq_answers request, options = nil # Customize the options with defaults metadata = @config.rpcs.suggest_faq_answers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1031,10 +1042,11 @@ def suggest_smart_replies request, options = nil # Customize the options with defaults metadata = @config.rpcs.suggest_smart_replies.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb index 5389b983a77b..f1a572186c1a 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/participants/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Participant Participants}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -237,12 +240,13 @@ def create_participant request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_participant.timeout, @@ -317,12 +321,13 @@ def get_participant request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_participant.timeout, @@ -406,12 +411,13 @@ def list_participants request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_participants.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_participants.timeout, @@ -487,12 +493,13 @@ def update_participant request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_participant.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_participant.timeout, @@ -599,12 +606,13 @@ def analyze_content request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.analyze_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.analyze_content.timeout, @@ -693,12 +701,13 @@ def suggest_articles request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.suggest_articles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.suggest_articles.timeout, @@ -786,12 +795,13 @@ def suggest_faq_answers request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.suggest_faq_answers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.suggest_faq_answers.timeout, @@ -881,12 +891,13 @@ def suggest_smart_replies request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.suggest_smart_replies.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.suggest_smart_replies.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb index 0805ee0e72ee..6f09b7ff94c2 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb @@ -32,6 +32,9 @@ module SessionEntityTypes # {::Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -254,10 +257,11 @@ def list_session_entity_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_session_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -350,10 +354,11 @@ def get_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -449,10 +454,11 @@ def create_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -540,10 +546,11 @@ def update_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -635,10 +642,11 @@ def delete_session_entity_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb index b1bc61d78e6a..118d77bf54f0 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityTypes}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -247,12 +250,13 @@ def list_session_entity_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_session_entity_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_session_entity_types.timeout, @@ -336,12 +340,13 @@ def get_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_session_entity_type.timeout, @@ -428,12 +433,13 @@ def create_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_session_entity_type.timeout, @@ -512,12 +518,13 @@ def update_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_session_entity_type.timeout, @@ -600,12 +607,13 @@ def delete_session_entity_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_session_entity_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_session_entity_type.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/client.rb index d8ee4baf15c9..e66ed0ee1197 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/client.rb @@ -34,6 +34,9 @@ module Sessions # guide](https://cloud.google.com/dialogflow/docs/api-overview). # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -303,10 +306,11 @@ def detect_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -402,10 +406,11 @@ def streaming_detect_intent request, options = nil # Customize the options with defaults metadata = @config.rpcs.streaming_detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.streaming_detect_intent.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb index 2d0139891833..162b1b98d8f5 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb @@ -36,6 +36,9 @@ module Rest # guide](https://cloud.google.com/dialogflow/docs/api-overview). # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -294,12 +297,13 @@ def detect_intent request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.detect_intent.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.detect_intent.timeout, diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/client.rb index 14ca1687e6cf..8d673e8883d4 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/client.rb @@ -31,6 +31,9 @@ module Versions # Service for managing {::Google::Cloud::Dialogflow::V2::Version Versions}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -248,10 +251,11 @@ def list_versions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -339,10 +343,11 @@ def get_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -432,10 +437,11 @@ def create_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -528,10 +534,11 @@ def update_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -618,10 +625,11 @@ def delete_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/rest/client.rb b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/rest/client.rb index 0cc687b8e25f..a5c1b523b29b 100644 --- a/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +++ b/google-cloud-dialogflow-v2/lib/google/cloud/dialogflow/v2/versions/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::Dialogflow::V2::Version Versions}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$" @@ -241,12 +244,13 @@ def list_versions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_versions.timeout, @@ -325,12 +329,13 @@ def get_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_version.timeout, @@ -411,12 +416,13 @@ def create_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_version.timeout, @@ -500,12 +506,13 @@ def update_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_version.timeout, @@ -583,12 +590,13 @@ def delete_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_version.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb index 2fb71fcb780e..b6a27737b729 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/client.rb @@ -31,6 +31,9 @@ module CompletionService # Service for Auto-Completion. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -292,10 +295,11 @@ def complete_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.complete_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -398,10 +402,11 @@ def import_suggestion_deny_list_entries request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -494,10 +499,11 @@ def purge_suggestion_deny_list_entries request, options = nil # Customize the options with defaults metadata = @config.rpcs.purge_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb index 3c470eb64d72..ffc8e10bcd76 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb @@ -26,6 +26,9 @@ module V1 module CompletionService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb index 57d6346c29c7..65e8746fdb1e 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for Auto-Completion. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -284,12 +287,13 @@ def complete_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.complete_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.complete_query.timeout, @@ -383,12 +387,13 @@ def import_suggestion_deny_list_entries request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_suggestion_deny_list_entries.timeout, @@ -472,12 +477,13 @@ def purge_suggestion_deny_list_entries request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.purge_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.purge_suggestion_deny_list_entries.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb index 0c1b08c35618..4ca2d1126eea 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb @@ -26,6 +26,9 @@ module CompletionService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb index e7c00b4469dc..151ee945f204 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb @@ -31,6 +31,9 @@ module ConversationalSearchService # Service for conversational search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -293,10 +296,11 @@ def converse_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.converse_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -384,10 +388,11 @@ def create_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -473,10 +478,11 @@ def delete_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -571,10 +577,11 @@ def update_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -657,10 +664,11 @@ def get_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -771,10 +779,11 @@ def list_conversations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb index 84faa51aba47..d4b150b3ed66 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for conversational search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -285,12 +288,13 @@ def converse_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.converse_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.converse_conversation.timeout, @@ -369,12 +373,13 @@ def create_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, @@ -451,12 +456,13 @@ def delete_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, @@ -542,12 +548,13 @@ def update_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, @@ -621,12 +628,13 @@ def get_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, @@ -728,12 +736,13 @@ def list_conversations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb index 1edc510bfeb6..4534e2f3412c 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb @@ -32,6 +32,9 @@ module DataStoreService # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -277,10 +280,11 @@ def create_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -372,10 +376,11 @@ def get_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -488,10 +493,11 @@ def list_data_stores request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_data_stores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -590,10 +596,11 @@ def delete_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -690,10 +697,11 @@ def update_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb index 8f37dda6792f..f42d4c35c670 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb @@ -26,6 +26,9 @@ module V1 module DataStoreService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb index 58a2a00a4c51..f86052bec6df 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -269,12 +272,13 @@ def create_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_data_store.timeout, @@ -357,12 +361,13 @@ def get_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_data_store.timeout, @@ -466,12 +471,13 @@ def list_data_stores request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_data_stores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_data_stores.timeout, @@ -561,12 +567,13 @@ def delete_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_data_store.timeout, @@ -654,12 +661,13 @@ def update_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_data_store.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb index 079dc554b4ee..309ff3745c91 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb @@ -26,6 +26,9 @@ module DataStoreService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb index 917a9b8d6123..554d85edc8f5 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/client.rb @@ -32,6 +32,9 @@ module DocumentService # information of the customer's website. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -264,10 +267,11 @@ def get_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -378,10 +382,11 @@ def list_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -486,10 +491,11 @@ def create_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -587,10 +593,11 @@ def update_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -681,10 +688,11 @@ def delete_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -867,10 +875,11 @@ def import_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -983,10 +992,11 @@ def purge_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.purge_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/operations.rb index 64a04221fbef..c718d16e28d2 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/operations.rb @@ -26,6 +26,9 @@ module V1 module DocumentService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb index 6697912e9267..bb6bf42ca075 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # information of the customer's website. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -256,12 +259,13 @@ def get_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_document.timeout, @@ -363,12 +367,13 @@ def list_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_documents.timeout, @@ -464,12 +469,13 @@ def create_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_document.timeout, @@ -558,12 +564,13 @@ def update_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_document.timeout, @@ -645,12 +652,13 @@ def delete_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_document.timeout, @@ -824,12 +832,13 @@ def import_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_documents.timeout, @@ -933,12 +942,13 @@ def purge_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.purge_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.purge_documents.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb index f7ea8c75054f..d150dbe89917 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb @@ -26,6 +26,9 @@ module DocumentService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/client.rb index fc282a2ef8e3..f9241ff8ffa1 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/client.rb @@ -32,6 +32,9 @@ module EngineService # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -264,10 +267,11 @@ def create_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -366,10 +370,11 @@ def delete_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -465,10 +470,11 @@ def update_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -552,10 +558,11 @@ def get_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -650,10 +657,11 @@ def list_engines request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_engines.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb index f978044acb90..8cc36b5aab2b 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb @@ -26,6 +26,9 @@ module V1 module EngineService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb index 0906187d26c0..346d2ef1707c 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -256,12 +259,13 @@ def create_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_engine.timeout, @@ -351,12 +355,13 @@ def delete_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_engine.timeout, @@ -443,12 +448,13 @@ def update_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_engine.timeout, @@ -523,12 +529,13 @@ def get_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_engine.timeout, @@ -614,12 +621,13 @@ def list_engines request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_engines.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_engines.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb index f90343b55c20..611c775af879 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb @@ -26,6 +26,9 @@ module EngineService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb index aba1b4af705c..13e9217367c8 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb @@ -31,6 +31,9 @@ module RecommendationService # Service for making recommendations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -347,10 +350,11 @@ def recommend request, options = nil # Customize the options with defaults metadata = @config.rpcs.recommend.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb index 757394c50cc4..192d98264fbf 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for making recommendations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -339,12 +342,13 @@ def recommend request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.recommend.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.recommend.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/client.rb index cefeb1baee15..be578ea8005d 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/client.rb @@ -31,6 +31,9 @@ module SchemaService # Service for managing {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -250,10 +253,11 @@ def get_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -356,10 +360,11 @@ def list_schemas request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_schemas.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -461,10 +466,11 @@ def create_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -558,10 +564,11 @@ def update_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -652,10 +659,11 @@ def delete_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb index b9e723a639af..8e56cd9a8f53 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb @@ -26,6 +26,9 @@ module V1 module SchemaService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb index 1d98f62da3d9..725832ce4457 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -242,12 +245,13 @@ def get_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_schema.timeout, @@ -341,12 +345,13 @@ def list_schemas request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_schemas.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_schemas.timeout, @@ -439,12 +444,13 @@ def create_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_schema.timeout, @@ -529,12 +535,13 @@ def update_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_schema.timeout, @@ -616,12 +623,13 @@ def delete_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_schema.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb index 92753a19d3fe..c37ae7bce519 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb @@ -26,6 +26,9 @@ module SchemaService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb index 5da42b02f8da..60984b49bdc0 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb @@ -31,6 +31,9 @@ module SearchService # Service for search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -397,10 +400,11 @@ def search request, options = nil # Customize the options with defaults metadata = @config.rpcs.search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb index e054f9c908b3..5a18f2ee7eb3 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -389,12 +392,13 @@ def search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb index c58ec29efd48..08f6479f3b2b 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb @@ -31,6 +31,9 @@ module SiteSearchEngineService # Service for managing site search related resources. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -252,10 +255,11 @@ def get_site_search_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_site_search_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -349,10 +353,11 @@ def create_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -449,10 +454,11 @@ def batch_create_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_create_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -544,10 +550,11 @@ def get_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -642,10 +649,11 @@ def update_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -744,10 +752,11 @@ def delete_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -852,10 +861,11 @@ def list_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -948,10 +958,11 @@ def enable_advanced_site_search request, options = nil # Customize the options with defaults metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1044,10 +1055,11 @@ def disable_advanced_site_search request, options = nil # Customize the options with defaults metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1144,10 +1156,11 @@ def recrawl_uris request, options = nil # Customize the options with defaults metadata = @config.rpcs.recrawl_uris.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1240,10 +1253,11 @@ def batch_verify_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1347,10 +1361,11 @@ def fetch_domain_verification_status request, options = nil # Customize the options with defaults metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb index 12e1c4067cfe..116e4de0b3ab 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb @@ -26,6 +26,9 @@ module V1 module SiteSearchEngineService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb index 366cd4554d1d..bb4070996999 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing site search related resources. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -244,12 +247,13 @@ def get_site_search_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_site_search_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_site_search_engine.timeout, @@ -334,12 +338,13 @@ def create_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_target_site.timeout, @@ -427,12 +432,13 @@ def batch_create_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_create_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_create_target_sites.timeout, @@ -515,12 +521,13 @@ def get_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_target_site.timeout, @@ -606,12 +613,13 @@ def update_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_target_site.timeout, @@ -701,12 +709,13 @@ def delete_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_target_site.timeout, @@ -802,12 +811,13 @@ def list_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_target_sites.timeout, @@ -891,12 +901,13 @@ def enable_advanced_site_search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.enable_advanced_site_search.timeout, @@ -980,12 +991,13 @@ def disable_advanced_site_search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.disable_advanced_site_search.timeout, @@ -1073,12 +1085,13 @@ def recrawl_uris request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.recrawl_uris.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.recrawl_uris.timeout, @@ -1162,12 +1175,13 @@ def batch_verify_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_verify_target_sites.timeout, @@ -1262,12 +1276,13 @@ def fetch_domain_verification_status request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.fetch_domain_verification_status.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb index c5c373f818d6..9f3aaed6f759 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb @@ -26,6 +26,9 @@ module SiteSearchEngineService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb index 870627a5a781..54f2a3d7ee28 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb @@ -31,6 +31,9 @@ module UserEventService # Service for ingesting end user actions on a website to Discovery Engine API. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -257,10 +260,11 @@ def write_user_event request, options = nil # Customize the options with defaults metadata = @config.rpcs.write_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -359,10 +363,11 @@ def collect_user_event request, options = nil # Customize the options with defaults metadata = @config.rpcs.collect_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -467,10 +472,11 @@ def import_user_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_user_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb index cc1c7f67bb78..36af134dc8b3 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb @@ -26,6 +26,9 @@ module V1 module UserEventService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb index 0ab5ba16141f..83d6584a9ada 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for ingesting end user actions on a website to Discovery Engine API. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -249,12 +252,13 @@ def write_user_event request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.write_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.write_user_event.timeout, @@ -344,12 +348,13 @@ def collect_user_event request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.collect_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout, @@ -445,12 +450,13 @@ def import_user_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_user_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_user_events.timeout, diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb index fb9e257bb2e5..c8e8583ee3d0 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb @@ -26,6 +26,9 @@ module UserEventService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb index 60e5d0aced5f..d2c046a72184 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb @@ -31,6 +31,9 @@ module CompletionService # Service for Auto-Completion. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -292,10 +295,11 @@ def complete_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.complete_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -398,10 +402,11 @@ def import_suggestion_deny_list_entries request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -494,10 +499,11 @@ def purge_suggestion_deny_list_entries request, options = nil # Customize the options with defaults metadata = @config.rpcs.purge_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb index 954cdf941edd..389ec7c687da 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module CompletionService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb index 01feb2422964..23d05ca28489 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for Auto-Completion. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -284,12 +287,13 @@ def complete_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.complete_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.complete_query.timeout, @@ -383,12 +387,13 @@ def import_suggestion_deny_list_entries request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_suggestion_deny_list_entries.timeout, @@ -472,12 +477,13 @@ def purge_suggestion_deny_list_entries request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.purge_suggestion_deny_list_entries.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.purge_suggestion_deny_list_entries.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb index b877e956e3af..2bd2bedfa94e 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb @@ -26,6 +26,9 @@ module CompletionService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb index 916b1d10171a..ed0ffc8cfafd 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb @@ -31,6 +31,9 @@ module ConversationalSearchService # Service for conversational search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -293,10 +296,11 @@ def converse_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.converse_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -384,10 +388,11 @@ def create_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -473,10 +478,11 @@ def delete_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -571,10 +577,11 @@ def update_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -657,10 +664,11 @@ def get_conversation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -771,10 +779,11 @@ def list_conversations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -901,10 +910,11 @@ def answer_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.answer_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -987,10 +997,11 @@ def get_answer request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_answer.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1078,10 +1089,11 @@ def create_session request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1167,10 +1179,11 @@ def delete_session request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1264,10 +1277,11 @@ def update_session request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1350,10 +1364,11 @@ def get_session request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1464,10 +1479,11 @@ def list_sessions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_sessions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb index 385eff542cee..9d9d4395e506 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for conversational search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -285,12 +288,13 @@ def converse_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.converse_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.converse_conversation.timeout, @@ -369,12 +373,13 @@ def create_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, @@ -451,12 +456,13 @@ def delete_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, @@ -542,12 +548,13 @@ def update_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, @@ -621,12 +628,13 @@ def get_conversation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_conversation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, @@ -728,12 +736,13 @@ def list_conversations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_conversations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, @@ -851,12 +860,13 @@ def answer_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.answer_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.answer_query.timeout, @@ -930,12 +940,13 @@ def get_answer request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_answer.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_answer.timeout, @@ -1014,12 +1025,13 @@ def create_session request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_session.timeout, @@ -1096,12 +1108,13 @@ def delete_session request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_session.timeout, @@ -1186,12 +1199,13 @@ def update_session request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_session.timeout, @@ -1265,12 +1279,13 @@ def get_session request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_session.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_session.timeout, @@ -1372,12 +1387,13 @@ def list_sessions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_sessions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb index 5519d518acf9..8f1e02f50472 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb @@ -32,6 +32,9 @@ module DataStoreService # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -277,10 +280,11 @@ def create_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -372,10 +376,11 @@ def get_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -489,10 +494,11 @@ def list_data_stores request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_data_stores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -591,10 +597,11 @@ def delete_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -691,10 +698,11 @@ def update_data_store request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb index ccc62c07d773..772818813551 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module DataStoreService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb index 3394ca418102..67db298f54f7 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -269,12 +272,13 @@ def create_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_data_store.timeout, @@ -357,12 +361,13 @@ def get_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_data_store.timeout, @@ -467,12 +472,13 @@ def list_data_stores request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_data_stores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_data_stores.timeout, @@ -562,12 +568,13 @@ def delete_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_data_store.timeout, @@ -655,12 +662,13 @@ def update_data_store request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_data_store.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_data_store.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb index bf3ec8837d6b..d945ba089562 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb @@ -26,6 +26,9 @@ module DataStoreService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb index 01a89eb47f72..1a6fd655161f 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb @@ -33,6 +33,9 @@ module DocumentService # customer's website. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -265,10 +268,11 @@ def get_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -379,10 +383,11 @@ def list_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -487,10 +492,11 @@ def create_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -589,10 +595,11 @@ def update_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -683,10 +690,11 @@ def delete_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -869,10 +877,11 @@ def import_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -986,10 +995,11 @@ def purge_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.purge_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb index ab225138ad69..53ce22eb4715 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module DocumentService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb index 470039839ad3..d76459643670 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb @@ -35,6 +35,9 @@ module Rest # customer's website. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -257,12 +260,13 @@ def get_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_document.timeout, @@ -364,12 +368,13 @@ def list_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_documents.timeout, @@ -465,12 +470,13 @@ def create_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_document.timeout, @@ -560,12 +566,13 @@ def update_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_document.timeout, @@ -647,12 +654,13 @@ def delete_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_document.timeout, @@ -826,12 +834,13 @@ def import_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_documents.timeout, @@ -936,12 +945,13 @@ def purge_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.purge_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.purge_documents.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb index 5b984b34b7ff..3e5487670b74 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb @@ -26,6 +26,9 @@ module DocumentService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb index 3018175a3fad..e422976b5585 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb @@ -32,6 +32,9 @@ module EngineService # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -265,10 +268,11 @@ def create_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -367,10 +371,11 @@ def delete_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -467,10 +472,11 @@ def update_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -554,10 +560,11 @@ def get_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -652,10 +659,11 @@ def list_engines request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_engines.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -742,10 +750,11 @@ def pause_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.pause_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -831,10 +840,11 @@ def resume_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.resume_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -927,10 +937,11 @@ def tune_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.tune_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb index f8aa97cef7c6..67f09de1827c 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module EngineService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb index e10927e5ea33..d34c93c67005 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # configuration. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -257,12 +260,13 @@ def create_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_engine.timeout, @@ -352,12 +356,13 @@ def delete_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_engine.timeout, @@ -445,12 +450,13 @@ def update_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_engine.timeout, @@ -525,12 +531,13 @@ def get_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_engine.timeout, @@ -616,12 +623,13 @@ def list_engines request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_engines.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_engines.timeout, @@ -699,12 +707,13 @@ def pause_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.pause_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.pause_engine.timeout, @@ -781,12 +790,13 @@ def resume_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.resume_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.resume_engine.timeout, @@ -870,12 +880,13 @@ def tune_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.tune_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.tune_engine.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb index 0a33484fce24..09b6696003f9 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb @@ -26,6 +26,9 @@ module EngineService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb index 25d88609c0aa..3583e2015fa3 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb @@ -31,6 +31,9 @@ module GroundedGenerationService # Service for grounded generation. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -243,10 +246,11 @@ def check_grounding request, options = nil # Customize the options with defaults metadata = @config.rpcs.check_grounding.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb index eefb499448e6..84bae9f63273 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for grounded generation. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -235,12 +238,13 @@ def check_grounding request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.check_grounding.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.check_grounding.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb index 6ed183871c06..a1b542055909 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb @@ -31,6 +31,9 @@ module RankService # Service for ranking text records. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -253,10 +256,11 @@ def rank request, options = nil # Customize the options with defaults metadata = @config.rpcs.rank.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb index d704898dcb71..3e094576919d 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for ranking text records. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -245,12 +248,13 @@ def rank request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.rank.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.rank.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb index 61e464c5f844..acd7421f7d61 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb @@ -31,6 +31,9 @@ module RecommendationService # Service for making recommendations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -348,10 +351,11 @@ def recommend request, options = nil # Customize the options with defaults metadata = @config.rpcs.recommend.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb index 0326dcef6687..5089e9930bcf 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for making recommendations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -340,12 +343,13 @@ def recommend request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.recommend.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.recommend.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb index c81109fcf5bf..f75af86639af 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb @@ -31,6 +31,9 @@ module SchemaService # Service for managing {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -250,10 +253,11 @@ def get_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -356,10 +360,11 @@ def list_schemas request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_schemas.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -462,10 +467,11 @@ def create_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -561,10 +567,11 @@ def update_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -655,10 +662,11 @@ def delete_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb index b424c739b3d7..2794331ab082 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module SchemaService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb index ceb48bd23604..3633830f0fa1 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema}s. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -242,12 +245,13 @@ def get_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_schema.timeout, @@ -341,12 +345,13 @@ def list_schemas request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_schemas.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_schemas.timeout, @@ -440,12 +445,13 @@ def create_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_schema.timeout, @@ -532,12 +538,13 @@ def update_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_schema.timeout, @@ -619,12 +626,13 @@ def delete_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_schema.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb index 5c5594aee6de..b25d724e223d 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb @@ -26,6 +26,9 @@ module SchemaService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb index f2a91d2a4161..99ce467d25a2 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb @@ -31,6 +31,9 @@ module SearchService # Service for search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -429,10 +432,11 @@ def search request, options = nil # Customize the options with defaults metadata = @config.rpcs.search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb index 0ef79d271953..e4fc1ab667eb 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for search. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -421,12 +424,13 @@ def search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb index fa08efef2693..30340fbb6fcb 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb @@ -31,6 +31,9 @@ module SearchTuningService # Service for search tuning. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -262,10 +265,11 @@ def train_custom_model request, options = nil # Customize the options with defaults metadata = @config.rpcs.train_custom_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb index 885ce51c5c8e..4955dc7b4deb 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module SearchTuningService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb index 9dccc2800379..e1dae8e7a93f 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for search tuning. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -254,12 +257,13 @@ def train_custom_model request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.train_custom_model.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.train_custom_model.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb index 5e8bdc1bb90f..a631a1b20e4f 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb @@ -26,6 +26,9 @@ module SearchTuningService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb index 4e8d733c95aa..dde47d5be8a5 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb @@ -32,6 +32,9 @@ module ServingConfigService # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -241,10 +244,11 @@ def update_serving_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_serving_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -329,10 +333,11 @@ def get_serving_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_serving_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -426,10 +431,11 @@ def list_serving_configs request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_serving_configs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb index 6de2bd4e24be..8f0f2b80e6db 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig ServingConfig}. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -233,12 +236,13 @@ def update_serving_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_serving_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_serving_config.timeout, @@ -314,12 +318,13 @@ def get_serving_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_serving_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_serving_config.timeout, @@ -404,12 +409,13 @@ def list_serving_configs request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_serving_configs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_serving_configs.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb index 83cad7cdcffb..fa6fe8b77817 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb @@ -31,6 +31,9 @@ module SiteSearchEngineService # Service for managing site search related resources. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -252,10 +255,11 @@ def get_site_search_engine request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_site_search_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -349,10 +353,11 @@ def create_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -449,10 +454,11 @@ def batch_create_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_create_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -545,10 +551,11 @@ def get_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -643,10 +650,11 @@ def update_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -746,10 +754,11 @@ def delete_target_site request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -855,10 +864,11 @@ def list_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -951,10 +961,11 @@ def enable_advanced_site_search request, options = nil # Customize the options with defaults metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1047,10 +1058,11 @@ def disable_advanced_site_search request, options = nil # Customize the options with defaults metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1148,10 +1160,11 @@ def recrawl_uris request, options = nil # Customize the options with defaults metadata = @config.rpcs.recrawl_uris.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1244,10 +1257,11 @@ def batch_verify_target_sites request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1351,10 +1365,11 @@ def fetch_domain_verification_status request, options = nil # Customize the options with defaults metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb index 01e539882030..e61d8c81781b 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module SiteSearchEngineService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb index eb3d3b94858c..f99c72144a20 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for managing site search related resources. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -244,12 +247,13 @@ def get_site_search_engine request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_site_search_engine.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_site_search_engine.timeout, @@ -334,12 +338,13 @@ def create_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_target_site.timeout, @@ -427,12 +432,13 @@ def batch_create_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_create_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_create_target_sites.timeout, @@ -516,12 +522,13 @@ def get_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_target_site.timeout, @@ -607,12 +614,13 @@ def update_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_target_site.timeout, @@ -703,12 +711,13 @@ def delete_target_site request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_target_site.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_target_site.timeout, @@ -805,12 +814,13 @@ def list_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_target_sites.timeout, @@ -894,12 +904,13 @@ def enable_advanced_site_search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.enable_advanced_site_search.timeout, @@ -983,12 +994,13 @@ def disable_advanced_site_search request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.disable_advanced_site_search.timeout, @@ -1077,12 +1089,13 @@ def recrawl_uris request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.recrawl_uris.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.recrawl_uris.timeout, @@ -1166,12 +1179,13 @@ def batch_verify_target_sites request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_verify_target_sites.timeout, @@ -1266,12 +1280,13 @@ def fetch_domain_verification_status request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.fetch_domain_verification_status.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb index 71249778c1f1..3d935385ff88 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb @@ -26,6 +26,9 @@ module SiteSearchEngineService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb index f0e05bfe8535..f8141a0bc76b 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb @@ -31,6 +31,9 @@ module UserEventService # Service for ingesting end user actions on a website to Discovery Engine API. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -257,10 +260,11 @@ def write_user_event request, options = nil # Customize the options with defaults metadata = @config.rpcs.write_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -359,10 +363,11 @@ def collect_user_event request, options = nil # Customize the options with defaults metadata = @config.rpcs.collect_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -467,10 +472,11 @@ def import_user_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_user_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb index b438144cbf11..178a5138c55c 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb @@ -26,6 +26,9 @@ module V1beta module UserEventService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb index d5a7d0fffd54..ff4d7188f9e6 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service for ingesting end user actions on a website to Discovery Engine API. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -249,12 +252,13 @@ def write_user_event request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.write_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.write_user_event.timeout, @@ -344,12 +348,13 @@ def collect_user_event request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.collect_user_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout, @@ -445,12 +450,13 @@ def import_user_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_user_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_user_events.timeout, diff --git a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb index 52b8b0f48d45..c6a14ce73aa0 100644 --- a/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +++ b/google-cloud-discovery_engine-v1beta/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb @@ -26,6 +26,9 @@ module UserEventService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb index 3bb58e67214c..a29db7b47c6e 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb @@ -39,6 +39,9 @@ module DlpService # https://cloud.google.com/sensitive-data-protection/docs/. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" @@ -453,10 +456,11 @@ def inspect_content request, options = nil # Customize the options with defaults metadata = @config.rpcs.inspect_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -572,10 +576,11 @@ def redact_image request, options = nil # Customize the options with defaults metadata = @config.rpcs.redact_image.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -711,10 +716,11 @@ def deidentify_content request, options = nil # Customize the options with defaults metadata = @config.rpcs.deidentify_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -845,10 +851,11 @@ def reidentify_content request, options = nil # Customize the options with defaults metadata = @config.rpcs.reidentify_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -946,10 +953,11 @@ def list_info_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_info_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, @@ -1055,10 +1063,11 @@ def create_inspect_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1149,10 +1158,11 @@ def update_inspect_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1239,10 +1249,11 @@ def get_inspect_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1372,10 +1383,11 @@ def list_inspect_templates request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_inspect_templates.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1463,10 +1475,11 @@ def delete_inspect_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1580,10 +1593,11 @@ def create_deidentify_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1675,10 +1689,11 @@ def update_deidentify_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1765,10 +1780,11 @@ def get_deidentify_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1898,10 +1914,11 @@ def list_deidentify_templates request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_deidentify_templates.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1990,10 +2007,11 @@ def delete_deidentify_template request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2103,10 +2121,11 @@ def create_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2196,10 +2215,11 @@ def update_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2286,10 +2306,11 @@ def hybrid_inspect_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2375,10 +2396,11 @@ def get_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2533,10 +2555,11 @@ def list_job_triggers request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_job_triggers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2623,10 +2646,11 @@ def delete_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2710,10 +2734,11 @@ def activate_job_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.activate_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2811,10 +2836,11 @@ def create_discovery_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2901,10 +2927,11 @@ def update_discovery_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2987,10 +3014,11 @@ def get_discovery_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3104,10 +3132,11 @@ def list_discovery_configs request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_discovery_configs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3191,10 +3220,11 @@ def delete_discovery_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3312,10 +3342,11 @@ def create_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3472,10 +3503,11 @@ def list_dlp_jobs request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_dlp_jobs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3563,10 +3595,11 @@ def get_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3655,10 +3688,11 @@ def delete_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3747,10 +3781,11 @@ def cancel_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3863,10 +3898,11 @@ def create_stored_info_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -3960,10 +3996,11 @@ def update_stored_info_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4050,10 +4087,11 @@ def get_stored_info_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4180,10 +4218,11 @@ def list_stored_info_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_stored_info_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4271,10 +4310,11 @@ def delete_stored_info_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4404,10 +4444,11 @@ def list_project_data_profiles request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_project_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4551,10 +4592,11 @@ def list_table_data_profiles request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_table_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4699,10 +4741,11 @@ def list_column_data_profiles request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_column_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4786,10 +4829,11 @@ def get_project_data_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_project_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4872,10 +4916,11 @@ def get_table_data_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_table_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -4958,10 +5003,11 @@ def get_column_data_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_column_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5044,10 +5090,11 @@ def delete_table_data_profile request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_table_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5134,10 +5181,11 @@ def hybrid_inspect_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5220,10 +5268,11 @@ def finish_dlp_job request, options = nil # Customize the options with defaults metadata = @config.rpcs.finish_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5308,10 +5357,11 @@ def create_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5394,10 +5444,11 @@ def get_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5492,10 +5543,11 @@ def list_connections request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5591,10 +5643,11 @@ def search_connections request, options = nil # Customize the options with defaults metadata = @config.rpcs.search_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5678,10 +5731,11 @@ def delete_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -5768,10 +5822,11 @@ def update_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb index 6ea877d45524..3aeb1f8806fa 100644 --- a/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +++ b/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb @@ -41,6 +41,9 @@ module Rest # https://cloud.google.com/sensitive-data-protection/docs/. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" @@ -445,12 +448,13 @@ def inspect_content request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.inspect_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.inspect_content.timeout, @@ -557,12 +561,13 @@ def redact_image request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.redact_image.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.redact_image.timeout, @@ -689,12 +694,13 @@ def deidentify_content request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.deidentify_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout, @@ -816,12 +822,13 @@ def reidentify_content request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.reidentify_content.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout, @@ -910,12 +917,13 @@ def list_info_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_info_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, @@ -1020,12 +1028,13 @@ def create_inspect_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, @@ -1107,12 +1116,13 @@ def update_inspect_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, @@ -1190,12 +1200,13 @@ def get_inspect_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, @@ -1316,12 +1327,13 @@ def list_inspect_templates request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_inspect_templates.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, @@ -1400,12 +1412,13 @@ def delete_inspect_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_inspect_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, @@ -1510,12 +1523,13 @@ def create_deidentify_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, @@ -1598,12 +1612,13 @@ def update_deidentify_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, @@ -1681,12 +1696,13 @@ def get_deidentify_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, @@ -1807,12 +1823,13 @@ def list_deidentify_templates request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_deidentify_templates.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, @@ -1892,12 +1909,13 @@ def delete_deidentify_template request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_deidentify_template.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, @@ -1998,12 +2016,13 @@ def create_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, @@ -2084,12 +2103,13 @@ def update_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, @@ -2167,12 +2187,13 @@ def hybrid_inspect_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, @@ -2249,12 +2270,13 @@ def get_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, @@ -2400,12 +2422,13 @@ def list_job_triggers request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_job_triggers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, @@ -2483,12 +2506,13 @@ def delete_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, @@ -2563,12 +2587,13 @@ def activate_job_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.activate_job_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, @@ -2657,12 +2682,13 @@ def create_discovery_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, @@ -2740,12 +2766,13 @@ def update_discovery_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, @@ -2819,12 +2846,13 @@ def get_discovery_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, @@ -2929,12 +2957,13 @@ def list_discovery_configs request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_discovery_configs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, @@ -3009,12 +3038,13 @@ def delete_discovery_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_discovery_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, @@ -3123,12 +3153,13 @@ def create_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, @@ -3276,12 +3307,13 @@ def list_dlp_jobs request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_dlp_jobs.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, @@ -3360,12 +3392,13 @@ def get_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, @@ -3445,12 +3478,13 @@ def delete_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, @@ -3530,12 +3564,13 @@ def cancel_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, @@ -3639,12 +3674,13 @@ def create_stored_info_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, @@ -3729,12 +3765,13 @@ def update_stored_info_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, @@ -3812,12 +3849,13 @@ def get_stored_info_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, @@ -3935,12 +3973,13 @@ def list_stored_info_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_stored_info_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, @@ -4019,12 +4058,13 @@ def delete_stored_info_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_stored_info_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, @@ -4145,12 +4185,13 @@ def list_project_data_profiles request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_project_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, @@ -4285,12 +4326,13 @@ def list_table_data_profiles request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_table_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, @@ -4426,12 +4468,13 @@ def list_column_data_profiles request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_column_data_profiles.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, @@ -4506,12 +4549,13 @@ def get_project_data_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_project_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, @@ -4585,12 +4629,13 @@ def get_table_data_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_table_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, @@ -4664,12 +4709,13 @@ def get_column_data_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_column_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, @@ -4743,12 +4789,13 @@ def delete_table_data_profile request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_table_data_profile.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout, @@ -4826,12 +4873,13 @@ def hybrid_inspect_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, @@ -4905,12 +4953,13 @@ def finish_dlp_job request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.finish_dlp_job.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, @@ -4986,12 +5035,13 @@ def create_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_connection.timeout, @@ -5065,12 +5115,13 @@ def get_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_connection.timeout, @@ -5156,12 +5207,13 @@ def list_connections request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_connections.timeout, @@ -5248,12 +5300,13 @@ def search_connections request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_connections.timeout, @@ -5328,12 +5381,13 @@ def delete_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, @@ -5411,12 +5465,13 @@ def update_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_connection.timeout, diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb index 289185ef08c3..459281e72b3e 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/client.rb @@ -34,6 +34,9 @@ module DocumentProcessorService # structured information from unstructured or semi-structured documents. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -294,10 +297,11 @@ def process_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.process_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -412,10 +416,11 @@ def batch_process_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_process_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -501,10 +506,11 @@ def fetch_processor_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.fetch_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -597,10 +603,11 @@ def list_processor_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -683,10 +690,11 @@ def get_processor_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -780,10 +788,11 @@ def list_processors request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processors.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -866,10 +875,11 @@ def get_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -977,10 +987,11 @@ def train_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.train_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1063,10 +1074,11 @@ def get_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1161,10 +1173,11 @@ def list_processor_versions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processor_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1255,10 +1268,11 @@ def delete_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1348,10 +1362,11 @@ def deploy_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.deploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1441,10 +1456,11 @@ def undeploy_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.undeploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1537,10 +1553,11 @@ def create_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1630,10 +1647,11 @@ def delete_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1723,10 +1741,11 @@ def enable_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.enable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1816,10 +1835,11 @@ def disable_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.disable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1920,10 +1940,11 @@ def set_default_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.set_default_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2024,10 +2045,11 @@ def review_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.review_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2124,10 +2146,11 @@ def evaluate_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.evaluate_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2212,10 +2235,11 @@ def get_evaluation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2311,10 +2335,11 @@ def list_evaluations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb index 74d442ccc343..96f07658d7ec 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb @@ -26,6 +26,9 @@ module V1 module DocumentProcessorService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb index 06b21b88b35e..38b14cd795d9 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb @@ -36,6 +36,9 @@ module Rest # structured information from unstructured or semi-structured documents. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -287,12 +290,13 @@ def process_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.process_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.process_document.timeout, @@ -398,12 +402,13 @@ def batch_process_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_process_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout, @@ -480,12 +485,13 @@ def fetch_processor_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.fetch_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout, @@ -569,12 +575,13 @@ def list_processor_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processor_types.timeout, @@ -648,12 +655,13 @@ def get_processor_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout, @@ -738,12 +746,13 @@ def list_processors request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processors.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processors.timeout, @@ -817,12 +826,13 @@ def get_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor.timeout, @@ -921,12 +931,13 @@ def train_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.train_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.train_processor_version.timeout, @@ -1000,12 +1011,13 @@ def get_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor_version.timeout, @@ -1091,12 +1103,13 @@ def list_processor_versions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processor_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processor_versions.timeout, @@ -1178,12 +1191,13 @@ def delete_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_processor_version.timeout, @@ -1264,12 +1278,13 @@ def deploy_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.deploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.deploy_processor_version.timeout, @@ -1350,12 +1365,13 @@ def undeploy_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.undeploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.undeploy_processor_version.timeout, @@ -1439,12 +1455,13 @@ def create_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_processor.timeout, @@ -1525,12 +1542,13 @@ def delete_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_processor.timeout, @@ -1611,12 +1629,13 @@ def enable_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.enable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.enable_processor.timeout, @@ -1697,12 +1716,13 @@ def disable_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.disable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.disable_processor.timeout, @@ -1794,12 +1814,13 @@ def set_default_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.set_default_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.set_default_processor_version.timeout, @@ -1891,12 +1912,13 @@ def review_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.review_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.review_document.timeout, @@ -1984,12 +2006,13 @@ def evaluate_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.evaluate_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.evaluate_processor_version.timeout, @@ -2065,12 +2088,13 @@ def get_evaluation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, @@ -2157,12 +2181,13 @@ def list_evaluations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, diff --git a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb index a7abfba678bf..a84785f6f44d 100644 --- a/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +++ b/google-cloud-document_ai-v1/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb @@ -26,6 +26,9 @@ module DocumentProcessorService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb index 8bb36be3e75e..4939ae617ac4 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb @@ -34,6 +34,9 @@ module DocumentProcessorService # structured information from unstructured or semi-structured documents. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -299,10 +302,11 @@ def process_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.process_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -421,10 +425,11 @@ def batch_process_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_process_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -510,10 +515,11 @@ def fetch_processor_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.fetch_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -606,10 +612,11 @@ def list_processor_types request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -692,10 +699,11 @@ def get_processor_type request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -789,10 +797,11 @@ def list_processors request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processors.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -875,10 +884,11 @@ def get_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -986,10 +996,11 @@ def train_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.train_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1072,10 +1083,11 @@ def get_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1170,10 +1182,11 @@ def list_processor_versions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_processor_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1264,10 +1277,11 @@ def delete_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1357,10 +1371,11 @@ def deploy_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.deploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1450,10 +1465,11 @@ def undeploy_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.undeploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1546,10 +1562,11 @@ def create_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1639,10 +1656,11 @@ def delete_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1732,10 +1750,11 @@ def enable_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.enable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1825,10 +1844,11 @@ def disable_processor request, options = nil # Customize the options with defaults metadata = @config.rpcs.disable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1929,10 +1949,11 @@ def set_default_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.set_default_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2035,10 +2056,11 @@ def review_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.review_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2135,10 +2157,11 @@ def evaluate_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.evaluate_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2223,10 +2246,11 @@ def get_evaluation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2322,10 +2346,11 @@ def list_evaluations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2425,10 +2450,11 @@ def import_processor_version request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb index e915ebc02268..b588ad4ca973 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb @@ -26,6 +26,9 @@ module V1beta3 module DocumentProcessorService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb index 7fb5db616ea7..78d54471cbee 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb @@ -36,6 +36,9 @@ module Rest # structured information from unstructured or semi-structured documents. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -292,12 +295,13 @@ def process_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.process_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.process_document.timeout, @@ -407,12 +411,13 @@ def batch_process_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_process_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout, @@ -489,12 +494,13 @@ def fetch_processor_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.fetch_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout, @@ -578,12 +584,13 @@ def list_processor_types request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processor_types.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processor_types.timeout, @@ -657,12 +664,13 @@ def get_processor_type request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor_type.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout, @@ -747,12 +755,13 @@ def list_processors request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processors.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processors.timeout, @@ -826,12 +835,13 @@ def get_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor.timeout, @@ -930,12 +940,13 @@ def train_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.train_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.train_processor_version.timeout, @@ -1009,12 +1020,13 @@ def get_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_processor_version.timeout, @@ -1100,12 +1112,13 @@ def list_processor_versions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_processor_versions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_processor_versions.timeout, @@ -1187,12 +1200,13 @@ def delete_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_processor_version.timeout, @@ -1273,12 +1287,13 @@ def deploy_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.deploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.deploy_processor_version.timeout, @@ -1359,12 +1374,13 @@ def undeploy_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.undeploy_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.undeploy_processor_version.timeout, @@ -1448,12 +1464,13 @@ def create_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_processor.timeout, @@ -1534,12 +1551,13 @@ def delete_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_processor.timeout, @@ -1620,12 +1638,13 @@ def enable_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.enable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.enable_processor.timeout, @@ -1706,12 +1725,13 @@ def disable_processor request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.disable_processor.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.disable_processor.timeout, @@ -1803,12 +1823,13 @@ def set_default_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.set_default_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.set_default_processor_version.timeout, @@ -1902,12 +1923,13 @@ def review_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.review_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.review_document.timeout, @@ -1995,12 +2017,13 @@ def evaluate_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.evaluate_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.evaluate_processor_version.timeout, @@ -2076,12 +2099,13 @@ def get_evaluation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_evaluation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout, @@ -2168,12 +2192,13 @@ def list_evaluations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_evaluations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout, @@ -2264,12 +2289,13 @@ def import_processor_version request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_processor_version.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_processor_version.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb index bab3f2fbabdb..d7c378bac2ac 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb @@ -26,6 +26,9 @@ module DocumentProcessorService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/client.rb index 7355b3f43bd2..d500c7861e87 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/client.rb @@ -31,6 +31,9 @@ module DocumentService # Service to call Cloud DocumentAI to manage document collection (dataset). # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -254,10 +257,11 @@ def update_dataset request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -352,10 +356,11 @@ def import_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -448,10 +453,11 @@ def get_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -586,10 +592,11 @@ def list_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -686,10 +693,11 @@ def batch_delete_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_delete_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -776,10 +784,11 @@ def get_dataset_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_dataset_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -864,10 +873,11 @@ def update_dataset_schema request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_dataset_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb index 06ea19689826..5e58a8ea792f 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb @@ -26,6 +26,9 @@ module V1beta3 module DocumentService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb index 7e435209e6b5..cc1e3666df96 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # Service to call Cloud DocumentAI to manage document collection (dataset). # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -247,12 +250,13 @@ def update_dataset request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_dataset.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, @@ -338,12 +342,13 @@ def import_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_documents.timeout, @@ -427,12 +432,13 @@ def get_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_document.timeout, @@ -558,12 +564,13 @@ def list_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_documents.timeout, @@ -651,12 +658,13 @@ def batch_delete_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_delete_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_delete_documents.timeout, @@ -734,12 +742,13 @@ def get_dataset_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_dataset_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_dataset_schema.timeout, @@ -815,12 +824,13 @@ def update_dataset_schema request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_dataset_schema.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_dataset_schema.timeout, diff --git a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb index f5a74038ef9e..1c8527c4f567 100644 --- a/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +++ b/google-cloud-document_ai-v1beta3/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb @@ -26,6 +26,9 @@ module DocumentService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/client.rb b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/client.rb index 6c7f4a058d88..d52fcc23c677 100644 --- a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/client.rb +++ b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/client.rb @@ -30,6 +30,9 @@ module Domains # The Cloud Domains API enables management and configuration of domain names. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -235,10 +238,11 @@ def search_domains request, options = nil # Customize the options with defaults metadata = @config.rpcs.search_domains.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -323,10 +327,11 @@ def retrieve_register_parameters request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -445,10 +450,11 @@ def register_domain request, options = nil # Customize the options with defaults metadata = @config.rpcs.register_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -538,10 +544,11 @@ def retrieve_transfer_parameters request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -672,10 +679,11 @@ def transfer_domain request, options = nil # Customize the options with defaults metadata = @config.rpcs.transfer_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -785,10 +793,11 @@ def list_registrations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_registrations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -872,10 +881,11 @@ def get_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -973,10 +983,11 @@ def update_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1073,10 +1084,11 @@ def configure_management_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_management_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1181,10 +1193,11 @@ def configure_dns_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_dns_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1287,10 +1300,11 @@ def configure_contact_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_contact_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1389,10 +1403,11 @@ def export_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1501,10 +1516,11 @@ def delete_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1592,10 +1608,11 @@ def retrieve_authorization_code request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1681,10 +1698,11 @@ def reset_authorization_code request, options = nil # Customize the options with defaults metadata = @config.rpcs.reset_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/operations.rb b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/operations.rb index be6fbf62520f..e297d8295155 100644 --- a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/operations.rb +++ b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/operations.rb @@ -26,6 +26,9 @@ module V1 module Domains # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/client.rb b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/client.rb index 94ccfc4d3b78..eccc5d7a2afa 100644 --- a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/client.rb +++ b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/client.rb @@ -32,6 +32,9 @@ module Rest # The Cloud Domains API enables management and configuration of domain names. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -227,12 +230,13 @@ def search_domains request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search_domains.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_domains.timeout, @@ -308,12 +312,13 @@ def retrieve_register_parameters request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout, @@ -423,12 +428,13 @@ def register_domain request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.register_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.register_domain.timeout, @@ -509,12 +515,13 @@ def retrieve_transfer_parameters request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout, @@ -636,12 +643,13 @@ def transfer_domain request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.transfer_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout, @@ -742,12 +750,13 @@ def list_registrations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_registrations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_registrations.timeout, @@ -822,12 +831,13 @@ def get_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_registration.timeout, @@ -916,12 +926,13 @@ def update_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_registration.timeout, @@ -1009,12 +1020,13 @@ def configure_management_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_management_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_management_settings.timeout, @@ -1110,12 +1122,13 @@ def configure_dns_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_dns_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout, @@ -1209,12 +1222,13 @@ def configure_contact_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_contact_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout, @@ -1304,12 +1318,13 @@ def export_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_registration.timeout, @@ -1409,12 +1424,13 @@ def delete_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_registration.timeout, @@ -1493,12 +1509,13 @@ def retrieve_authorization_code request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_authorization_code.timeout, @@ -1575,12 +1592,13 @@ def reset_authorization_code request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.reset_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.reset_authorization_code.timeout, diff --git a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/operations.rb b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/operations.rb index 9ddd57f9f4de..e3082e8f3514 100644 --- a/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/operations.rb +++ b/google-cloud-domains-v1/lib/google/cloud/domains/v1/domains/rest/operations.rb @@ -26,6 +26,9 @@ module Domains module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/client.rb b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/client.rb index 809bc97fdfff..cac12e849b59 100644 --- a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/client.rb +++ b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/client.rb @@ -30,6 +30,9 @@ module Domains # The Cloud Domains API enables management and configuration of domain names. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -235,10 +238,11 @@ def search_domains request, options = nil # Customize the options with defaults metadata = @config.rpcs.search_domains.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -323,10 +327,11 @@ def retrieve_register_parameters request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -445,10 +450,11 @@ def register_domain request, options = nil # Customize the options with defaults metadata = @config.rpcs.register_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -538,10 +544,11 @@ def retrieve_transfer_parameters request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -672,10 +679,11 @@ def transfer_domain request, options = nil # Customize the options with defaults metadata = @config.rpcs.transfer_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -785,10 +793,11 @@ def list_registrations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_registrations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -872,10 +881,11 @@ def get_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -973,10 +983,11 @@ def update_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1073,10 +1084,11 @@ def configure_management_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_management_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1181,10 +1193,11 @@ def configure_dns_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_dns_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1287,10 +1300,11 @@ def configure_contact_settings request, options = nil # Customize the options with defaults metadata = @config.rpcs.configure_contact_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1389,10 +1403,11 @@ def export_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1501,10 +1516,11 @@ def delete_registration request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1592,10 +1608,11 @@ def retrieve_authorization_code request, options = nil # Customize the options with defaults metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1681,10 +1698,11 @@ def reset_authorization_code request, options = nil # Customize the options with defaults metadata = @config.rpcs.reset_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/operations.rb b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/operations.rb index b209f402171d..2fab51371a26 100644 --- a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/operations.rb +++ b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/operations.rb @@ -26,6 +26,9 @@ module V1beta1 module Domains # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/client.rb b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/client.rb index 24eed894dbdb..884d14929844 100644 --- a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/client.rb +++ b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/client.rb @@ -32,6 +32,9 @@ module Rest # The Cloud Domains API enables management and configuration of domain names. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -227,12 +230,13 @@ def search_domains request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.search_domains.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_domains.timeout, @@ -308,12 +312,13 @@ def retrieve_register_parameters request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout, @@ -423,12 +428,13 @@ def register_domain request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.register_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.register_domain.timeout, @@ -509,12 +515,13 @@ def retrieve_transfer_parameters request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout, @@ -636,12 +643,13 @@ def transfer_domain request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.transfer_domain.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout, @@ -742,12 +750,13 @@ def list_registrations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_registrations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_registrations.timeout, @@ -822,12 +831,13 @@ def get_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_registration.timeout, @@ -916,12 +926,13 @@ def update_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_registration.timeout, @@ -1009,12 +1020,13 @@ def configure_management_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_management_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_management_settings.timeout, @@ -1110,12 +1122,13 @@ def configure_dns_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_dns_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout, @@ -1209,12 +1222,13 @@ def configure_contact_settings request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.configure_contact_settings.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout, @@ -1304,12 +1318,13 @@ def export_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_registration.timeout, @@ -1409,12 +1424,13 @@ def delete_registration request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_registration.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_registration.timeout, @@ -1493,12 +1509,13 @@ def retrieve_authorization_code request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.retrieve_authorization_code.timeout, @@ -1575,12 +1592,13 @@ def reset_authorization_code request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.reset_authorization_code.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.reset_authorization_code.timeout, diff --git a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/operations.rb b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/operations.rb index 26482885c3c5..9f9b6f87390c 100644 --- a/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/operations.rb +++ b/google-cloud-domains-v1beta1/lib/google/cloud/domains/v1beta1/domains/rest/operations.rb @@ -26,6 +26,9 @@ module Domains module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/client.rb b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/client.rb index ba9747073e05..86b3e61db32f 100644 --- a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/client.rb +++ b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/client.rb @@ -34,6 +34,9 @@ module EdgeNetwork # configure the network setup and property to meet the workload requirement. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "edgenetwork.$UNIVERSE_DOMAIN$" @@ -332,10 +335,11 @@ def initialize_zone request, options = nil # Customize the options with defaults metadata = @config.rpcs.initialize_zone.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -433,10 +437,11 @@ def list_zones request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_zones.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -522,10 +527,11 @@ def get_zone request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_zone.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -620,10 +626,11 @@ def list_networks request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_networks.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -706,10 +713,11 @@ def get_network request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -791,10 +799,11 @@ def diagnose_network request, options = nil # Customize the options with defaults metadata = @config.rpcs.diagnose_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -903,10 +912,11 @@ def create_network request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1010,10 +1020,11 @@ def delete_network request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1109,10 +1120,11 @@ def list_subnets request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_subnets.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1195,10 +1207,11 @@ def get_subnet request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1307,10 +1320,11 @@ def create_subnet request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1420,10 +1434,11 @@ def update_subnet request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1527,10 +1542,11 @@ def delete_subnet request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1626,10 +1642,11 @@ def list_interconnects request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_interconnects.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1712,10 +1729,11 @@ def get_interconnect request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_interconnect.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1797,10 +1815,11 @@ def diagnose_interconnect request, options = nil # Customize the options with defaults metadata = @config.rpcs.diagnose_interconnect.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1895,10 +1914,11 @@ def list_interconnect_attachments request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_interconnect_attachments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1981,10 +2001,11 @@ def get_interconnect_attachment request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2093,10 +2114,11 @@ def create_interconnect_attachment request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2200,10 +2222,11 @@ def delete_interconnect_attachment request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2299,10 +2322,11 @@ def list_routers request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_routers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2385,10 +2409,11 @@ def get_router request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2470,10 +2495,11 @@ def diagnose_router request, options = nil # Customize the options with defaults metadata = @config.rpcs.diagnose_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2582,10 +2608,11 @@ def create_router request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2695,10 +2722,11 @@ def update_router request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2802,10 +2830,11 @@ def delete_router request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/operations.rb b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/operations.rb index b9a48bdea66e..38268dacb502 100644 --- a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/operations.rb +++ b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/operations.rb @@ -26,6 +26,9 @@ module V1 module EdgeNetwork # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "edgenetwork.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/client.rb b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/client.rb index 2948faa3ab7d..b9587790f645 100644 --- a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/client.rb +++ b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/client.rb @@ -36,6 +36,9 @@ module Rest # configure the network setup and property to meet the workload requirement. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "edgenetwork.$UNIVERSE_DOMAIN$" @@ -325,12 +328,13 @@ def initialize_zone request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.initialize_zone.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.initialize_zone.timeout, @@ -417,12 +421,13 @@ def list_zones request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_zones.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_zones.timeout, @@ -496,12 +501,13 @@ def get_zone request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_zone.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_zone.timeout, @@ -587,12 +593,13 @@ def list_networks request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_networks.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_networks.timeout, @@ -665,12 +672,13 @@ def get_network request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_network.timeout, @@ -743,12 +751,13 @@ def diagnose_network request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.diagnose_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.diagnose_network.timeout, @@ -848,12 +857,13 @@ def create_network request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_network.timeout, @@ -948,12 +958,13 @@ def delete_network request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_network.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_network.timeout, @@ -1040,12 +1051,13 @@ def list_subnets request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_subnets.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_subnets.timeout, @@ -1118,12 +1130,13 @@ def get_subnet request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_subnet.timeout, @@ -1223,12 +1236,13 @@ def create_subnet request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_subnet.timeout, @@ -1329,12 +1343,13 @@ def update_subnet request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_subnet.timeout, @@ -1429,12 +1444,13 @@ def delete_subnet request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_subnet.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_subnet.timeout, @@ -1521,12 +1537,13 @@ def list_interconnects request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_interconnects.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_interconnects.timeout, @@ -1599,12 +1616,13 @@ def get_interconnect request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_interconnect.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_interconnect.timeout, @@ -1677,12 +1695,13 @@ def diagnose_interconnect request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.diagnose_interconnect.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.diagnose_interconnect.timeout, @@ -1768,12 +1787,13 @@ def list_interconnect_attachments request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_interconnect_attachments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_interconnect_attachments.timeout, @@ -1846,12 +1866,13 @@ def get_interconnect_attachment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_interconnect_attachment.timeout, @@ -1951,12 +1972,13 @@ def create_interconnect_attachment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_interconnect_attachment.timeout, @@ -2051,12 +2073,13 @@ def delete_interconnect_attachment request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_interconnect_attachment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_interconnect_attachment.timeout, @@ -2143,12 +2166,13 @@ def list_routers request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_routers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_routers.timeout, @@ -2221,12 +2245,13 @@ def get_router request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_router.timeout, @@ -2299,12 +2324,13 @@ def diagnose_router request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.diagnose_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.diagnose_router.timeout, @@ -2404,12 +2430,13 @@ def create_router request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_router.timeout, @@ -2510,12 +2537,13 @@ def update_router request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_router.timeout, @@ -2610,12 +2638,13 @@ def delete_router request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_router.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_router.timeout, diff --git a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/operations.rb b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/operations.rb index 4d92268acffc..a274eb46a03d 100644 --- a/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/operations.rb +++ b/google-cloud-edge_network-v1/lib/google/cloud/edge_network/v1/edge_network/rest/operations.rb @@ -26,6 +26,9 @@ module EdgeNetwork module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "edgenetwork.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/client.rb index abcc0182a64a..437e6f80f7d8 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/client.rb @@ -30,6 +30,9 @@ module ErrorGroupService # Service for retrieving and updating individual error groups. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -225,10 +228,11 @@ def get_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -311,10 +315,11 @@ def update_group request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/client.rb index 7336e5e2e600..820887099b94 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_group_service/rest/client.rb @@ -32,6 +32,9 @@ module Rest # Service for retrieving and updating individual error groups. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -217,12 +220,13 @@ def get_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_group.timeout, @@ -296,12 +300,13 @@ def update_group request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_group.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_group.timeout, diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/client.rb index 7adde8a41ea0..7aeaebcdd7d3 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/client.rb @@ -31,6 +31,9 @@ module ErrorStatsService # individual events. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -264,10 +267,11 @@ def list_group_stats request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_group_stats.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -373,10 +377,11 @@ def list_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -464,10 +469,11 @@ def delete_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/client.rb index c09f0fda76b6..d0d842fa3de8 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/error_stats_service/rest/client.rb @@ -33,6 +33,9 @@ module Rest # individual events. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -256,12 +259,13 @@ def list_group_stats request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_group_stats.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_group_stats.timeout, @@ -358,12 +362,13 @@ def list_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_events.timeout, @@ -442,12 +447,13 @@ def delete_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_events.timeout, diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/client.rb index 68addb1925d3..9f3a4543bd30 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/client.rb @@ -30,6 +30,9 @@ module ReportErrorsService # An API for reporting error events. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -236,10 +239,11 @@ def report_error_event request, options = nil # Customize the options with defaults metadata = @config.rpcs.report_error_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/client.rb b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/client.rb index ac6f014bf0aa..88eb3a4cfa88 100644 --- a/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/client.rb +++ b/google-cloud-error_reporting-v1beta1/lib/google/cloud/error_reporting/v1beta1/report_errors_service/rest/client.rb @@ -32,6 +32,9 @@ module Rest # An API for reporting error events. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "clouderrorreporting.$UNIVERSE_DOMAIN$" @@ -228,12 +231,13 @@ def report_error_event request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.report_error_event.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ErrorReporting::V1beta1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.report_error_event.timeout, diff --git a/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/client.rb b/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/client.rb index c4a92dd3ea7b..b861d829a1c4 100644 --- a/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/client.rb +++ b/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/client.rb @@ -30,6 +30,9 @@ module EssentialContactsService # Manages contacts for important Google Cloud notifications. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "essentialcontacts.$UNIVERSE_DOMAIN$" @@ -240,10 +243,11 @@ def create_contact request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -331,10 +335,11 @@ def update_contact request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -432,10 +437,11 @@ def list_contacts request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_contacts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -521,10 +527,11 @@ def get_contact request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -609,10 +616,11 @@ def delete_contact request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -716,10 +724,11 @@ def compute_contacts request, options = nil # Customize the options with defaults metadata = @config.rpcs.compute_contacts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -815,10 +824,11 @@ def send_test_message request, options = nil # Customize the options with defaults metadata = @config.rpcs.send_test_message.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/rest/client.rb b/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/rest/client.rb index 5a0eda0d37d0..95de3db1b95a 100644 --- a/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/rest/client.rb +++ b/google-cloud-essential_contacts-v1/lib/google/cloud/essential_contacts/v1/essential_contacts_service/rest/client.rb @@ -32,6 +32,9 @@ module Rest # Manages contacts for important Google Cloud notifications. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "essentialcontacts.$UNIVERSE_DOMAIN$" @@ -232,12 +235,13 @@ def create_contact request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_contact.timeout, @@ -316,12 +320,13 @@ def update_contact request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_contact.timeout, @@ -410,12 +415,13 @@ def list_contacts request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_contacts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_contacts.timeout, @@ -492,12 +498,13 @@ def get_contact request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_contact.timeout, @@ -573,12 +580,13 @@ def delete_contact request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_contact.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_contact.timeout, @@ -673,12 +681,13 @@ def compute_contacts request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.compute_contacts.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.compute_contacts.timeout, @@ -765,12 +774,13 @@ def send_test_message request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.send_test_message.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::EssentialContacts::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.send_test_message.timeout, diff --git a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb index 645b4f866461..ae3a5d422c35 100644 --- a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb +++ b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb @@ -54,6 +54,9 @@ module Publisher # Publisher allows an event provider to publish events to Eventarc. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" @@ -249,10 +252,11 @@ def publish_channel_connection_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -344,10 +348,11 @@ def publish_events request, options = nil # Customize the options with defaults metadata = @config.rpcs.publish_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb index dc417648ab53..e406558fa027 100644 --- a/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb +++ b/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb @@ -56,6 +56,9 @@ module Rest # Publisher allows an event provider to publish events to Eventarc. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" @@ -241,12 +244,13 @@ def publish_channel_connection_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.publish_channel_connection_events.timeout, @@ -329,12 +333,13 @@ def publish_events request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.publish_events.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.publish_events.timeout, diff --git a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb index 60bd1c65e908..446ccd33dd3e 100644 --- a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb +++ b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb @@ -33,6 +33,9 @@ module Eventarc # Google Cloud services and forward them to supported destinations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" @@ -260,10 +263,11 @@ def get_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -368,10 +372,11 @@ def list_triggers request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_triggers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -468,10 +473,11 @@ def create_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -571,10 +577,11 @@ def update_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -673,10 +680,11 @@ def delete_trigger request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -759,10 +767,11 @@ def get_channel request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -863,10 +872,11 @@ def list_channels request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_channels.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -963,10 +973,11 @@ def create_channel request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1063,10 +1074,11 @@ def update_channel request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1159,10 +1171,11 @@ def delete_channel request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1245,10 +1258,11 @@ def get_provider request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_provider.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1349,10 +1363,11 @@ def list_providers request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_providers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1435,10 +1450,11 @@ def get_channel_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1534,10 +1550,11 @@ def list_channel_connections request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_channel_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1631,10 +1648,11 @@ def create_channel_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1724,10 +1742,11 @@ def delete_channel_connection request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1810,10 +1829,11 @@ def get_google_channel_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_google_channel_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1899,10 +1919,11 @@ def update_google_channel_config request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_google_channel_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb index 673c6a1bcdcb..e60394c89a4d 100644 --- a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb +++ b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb @@ -26,6 +26,9 @@ module V1 module Eventarc # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb index 7e04053b5450..ec036882cef8 100644 --- a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +++ b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb @@ -35,6 +35,9 @@ module Rest # Google Cloud services and forward them to supported destinations. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" @@ -254,12 +257,13 @@ def get_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_trigger.timeout, @@ -355,12 +359,13 @@ def list_triggers request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_triggers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_triggers.timeout, @@ -447,12 +452,13 @@ def create_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_trigger.timeout, @@ -543,12 +549,13 @@ def update_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_trigger.timeout, @@ -638,12 +645,13 @@ def delete_trigger request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_trigger.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_trigger.timeout, @@ -717,12 +725,13 @@ def get_channel request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_channel.timeout, @@ -814,12 +823,13 @@ def list_channels request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_channels.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_channels.timeout, @@ -906,12 +916,13 @@ def create_channel request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_channel.timeout, @@ -999,12 +1010,13 @@ def update_channel request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_channel.timeout, @@ -1088,12 +1100,13 @@ def delete_channel request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_channel.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_channel.timeout, @@ -1167,12 +1180,13 @@ def get_provider request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_provider.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_provider.timeout, @@ -1264,12 +1278,13 @@ def list_providers request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_providers.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_providers.timeout, @@ -1342,12 +1357,13 @@ def get_channel_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_channel_connection.timeout, @@ -1434,12 +1450,13 @@ def list_channel_connections request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_channel_connections.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_channel_connections.timeout, @@ -1523,12 +1540,13 @@ def create_channel_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_channel_connection.timeout, @@ -1609,12 +1627,13 @@ def delete_channel_connection request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_channel_connection.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_channel_connection.timeout, @@ -1688,12 +1707,13 @@ def get_google_channel_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_google_channel_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_google_channel_config.timeout, @@ -1770,12 +1790,13 @@ def update_google_channel_config request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_google_channel_config.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_google_channel_config.timeout, diff --git a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb index e8177e36141e..8154af1d955c 100644 --- a/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb +++ b/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb @@ -26,6 +26,9 @@ module Eventarc module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb index e40daad1ecd3..1d15311ba4af 100644 --- a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb +++ b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb @@ -49,6 +49,9 @@ module CloudFilestoreManager # * `projects/12345/locations/us-central1/backups/my-backup` # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" @@ -315,10 +318,11 @@ def list_instances request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_instances.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -402,10 +406,11 @@ def get_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -504,10 +509,11 @@ def create_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -605,10 +611,11 @@ def update_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -709,10 +716,11 @@ def restore_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.restore_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -808,10 +816,11 @@ def revert_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.revert_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -905,10 +914,11 @@ def delete_instance request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1007,10 +1017,11 @@ def list_snapshots request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_snapshots.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1094,10 +1105,11 @@ def get_snapshot request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1195,10 +1207,11 @@ def create_snapshot request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1289,10 +1302,11 @@ def delete_snapshot request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1385,10 +1399,11 @@ def update_snapshot request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1490,10 +1505,11 @@ def list_backups request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1577,10 +1593,11 @@ def get_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1681,10 +1698,11 @@ def create_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1775,10 +1793,11 @@ def delete_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1871,10 +1890,11 @@ def update_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb index 3c239bcd9071..f420b0b755db 100644 --- a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb +++ b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb @@ -26,6 +26,9 @@ module V1 module CloudFilestoreManager # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb index 3571fee0a465..c5996d43fe64 100644 --- a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb +++ b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb @@ -51,6 +51,9 @@ module Rest # * `projects/12345/locations/us-central1/backups/my-backup` # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" @@ -308,12 +311,13 @@ def list_instances request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_instances.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_instances.timeout, @@ -387,12 +391,13 @@ def get_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_instance.timeout, @@ -482,12 +487,13 @@ def create_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_instance.timeout, @@ -576,12 +582,13 @@ def update_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_instance.timeout, @@ -673,12 +680,13 @@ def restore_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.restore_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.restore_instance.timeout, @@ -765,12 +773,13 @@ def revert_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.revert_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.revert_instance.timeout, @@ -855,12 +864,13 @@ def delete_instance request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_instance.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, @@ -950,12 +960,13 @@ def list_snapshots request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_snapshots.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout, @@ -1030,12 +1041,13 @@ def get_snapshot request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout, @@ -1124,12 +1136,13 @@ def create_snapshot request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout, @@ -1211,12 +1224,13 @@ def delete_snapshot request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout, @@ -1300,12 +1314,13 @@ def update_snapshot request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_snapshot.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout, @@ -1398,12 +1413,13 @@ def list_backups request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_backups.timeout, @@ -1477,12 +1493,13 @@ def get_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup.timeout, @@ -1574,12 +1591,13 @@ def create_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_backup.timeout, @@ -1661,12 +1679,13 @@ def delete_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, @@ -1750,12 +1769,13 @@ def update_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_backup.timeout, diff --git a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb index 49ae88af34e5..d371bebcc853 100644 --- a/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb +++ b/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb @@ -26,6 +26,9 @@ module CloudFilestoreManager module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Filestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb index 2ff7e9c2269e..d0b225ad1a9d 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb @@ -59,6 +59,9 @@ module FirestoreAdmin # service `google.longrunning.Operations`. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -319,10 +322,11 @@ def create_index request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -418,10 +422,11 @@ def list_indexes request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_indexes.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -505,10 +510,11 @@ def get_index request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -591,10 +597,11 @@ def delete_index request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -677,10 +684,11 @@ def get_field request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_field.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -787,10 +795,11 @@ def update_field request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_field.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -899,10 +908,11 @@ def list_fields request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_fields.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1029,10 +1039,11 @@ def export_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.export_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1143,10 +1154,11 @@ def import_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1248,10 +1260,11 @@ def create_database request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1335,10 +1348,11 @@ def get_database request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1421,10 +1435,11 @@ def list_databases request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_databases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1515,10 +1530,11 @@ def update_database request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1613,10 +1629,11 @@ def delete_database request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1701,10 +1718,11 @@ def get_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1791,10 +1809,11 @@ def list_backups request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1878,10 +1897,11 @@ def delete_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2002,10 +2022,11 @@ def restore_database request, options = nil # Customize the options with defaults metadata = @config.rpcs.restore_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2094,10 +2115,11 @@ def create_backup_schedule request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2182,10 +2204,11 @@ def get_backup_schedule request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2269,10 +2292,11 @@ def list_backup_schedules request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_backup_schedules.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2356,10 +2380,11 @@ def update_backup_schedule request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2444,10 +2469,11 @@ def delete_backup_schedule request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb index d724a1efe9aa..6cad8d133754 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb @@ -27,6 +27,9 @@ module V1 module FirestoreAdmin # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -192,10 +195,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -288,10 +292,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -377,10 +382,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -471,10 +477,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +582,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb index 1d43f7ee22d8..f6338b23ce1b 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb @@ -61,6 +61,9 @@ module Rest # service `google.longrunning.Operations`. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -311,12 +314,13 @@ def create_index request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_index.timeout, @@ -403,12 +407,13 @@ def list_indexes request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_indexes.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_indexes.timeout, @@ -483,12 +488,13 @@ def get_index request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_index.timeout, @@ -562,12 +568,13 @@ def delete_index request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_index.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_index.timeout, @@ -641,12 +648,13 @@ def get_field request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_field.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_field.timeout, @@ -744,12 +752,13 @@ def update_field request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_field.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_field.timeout, @@ -849,12 +858,13 @@ def list_fields request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_fields.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_fields.timeout, @@ -972,12 +982,13 @@ def export_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.export_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.export_documents.timeout, @@ -1079,12 +1090,13 @@ def import_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.import_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.import_documents.timeout, @@ -1177,12 +1189,13 @@ def create_database request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_database.timeout, @@ -1257,12 +1270,13 @@ def get_database request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_database.timeout, @@ -1336,12 +1350,13 @@ def list_databases request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_databases.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_databases.timeout, @@ -1423,12 +1438,13 @@ def update_database request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_database.timeout, @@ -1514,12 +1530,13 @@ def delete_database request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_database.timeout, @@ -1595,12 +1612,13 @@ def get_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup.timeout, @@ -1678,12 +1696,13 @@ def list_backups request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_backups.timeout, @@ -1758,12 +1777,13 @@ def delete_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, @@ -1875,12 +1895,13 @@ def restore_database request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.restore_database.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.restore_database.timeout, @@ -1960,12 +1981,13 @@ def create_backup_schedule request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout, @@ -2041,12 +2063,13 @@ def get_backup_schedule request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout, @@ -2121,12 +2144,13 @@ def list_backup_schedules request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_backup_schedules.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout, @@ -2201,12 +2225,13 @@ def update_backup_schedule request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout, @@ -2282,12 +2307,13 @@ def delete_backup_schedule request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_backup_schedule.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout, diff --git a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb index 209d4625567c..14fd99ff0595 100644 --- a/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb +++ b/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb @@ -27,6 +27,9 @@ module FirestoreAdmin module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -182,12 +185,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -270,12 +274,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -352,12 +357,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -439,12 +445,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb index f0b678f0f01c..4756405dd090 100644 --- a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb +++ b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb @@ -38,6 +38,9 @@ module Firestore # truly serverless apps. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -326,10 +329,11 @@ def get_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -469,10 +473,11 @@ def list_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -575,10 +580,11 @@ def update_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -664,10 +670,11 @@ def delete_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -779,10 +786,11 @@ def batch_get_documents request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_get_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -868,10 +876,11 @@ def begin_transaction request, options = nil # Customize the options with defaults metadata = @config.rpcs.begin_transaction.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -960,10 +969,11 @@ def commit request, options = nil # Customize the options with defaults metadata = @config.rpcs.commit.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1048,10 +1058,11 @@ def rollback request, options = nil # Customize the options with defaults metadata = @config.rpcs.rollback.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1161,10 +1172,11 @@ def run_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.run_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1286,10 +1298,11 @@ def run_aggregation_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.run_aggregation_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1422,10 +1435,11 @@ def partition_query request, options = nil # Customize the options with defaults metadata = @config.rpcs.partition_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1510,10 +1524,11 @@ def write request, options = nil # Customize the options with defaults metadata = @config.rpcs.write.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.write.timeout, @@ -1589,10 +1604,11 @@ def listen request, options = nil # Customize the options with defaults metadata = @config.rpcs.listen.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.listen.timeout, @@ -1680,10 +1696,11 @@ def list_collection_ids request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_collection_ids.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1783,10 +1800,11 @@ def batch_write request, options = nil # Customize the options with defaults metadata = @config.rpcs.batch_write.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1884,10 +1902,11 @@ def create_document request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb index e1bf865603c6..0baee6d7e790 100644 --- a/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb +++ b/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb @@ -40,6 +40,9 @@ module Rest # truly serverless apps. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" @@ -311,12 +314,13 @@ def get_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_document.timeout, @@ -447,12 +451,13 @@ def list_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_documents.timeout, @@ -543,12 +548,13 @@ def update_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_document.timeout, @@ -625,12 +631,13 @@ def delete_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_document.timeout, @@ -729,12 +736,13 @@ def batch_get_documents request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_get_documents.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, @@ -816,12 +824,13 @@ def begin_transaction request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.begin_transaction.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, @@ -901,12 +910,13 @@ def commit request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.commit.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.commit.timeout, @@ -982,12 +992,13 @@ def rollback request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.rollback.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.rollback.timeout, @@ -1084,12 +1095,13 @@ def run_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.run_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.run_query.timeout, @@ -1203,12 +1215,13 @@ def run_aggregation_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.run_aggregation_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.run_aggregation_query.timeout, @@ -1337,12 +1350,13 @@ def partition_query request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.partition_query.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.partition_query.timeout, @@ -1430,12 +1444,13 @@ def list_collection_ids request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_collection_ids.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_collection_ids.timeout, @@ -1527,12 +1542,13 @@ def batch_write request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.batch_write.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.batch_write.timeout, @@ -1621,12 +1637,13 @@ def create_document request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_document.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Firestore::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_document.timeout, diff --git a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb index 767b796a5a55..59eb532f6866 100644 --- a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +++ b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb @@ -32,6 +32,9 @@ module CloudFunctionsService # A service that application uses to manipulate triggers and functions. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -299,10 +302,11 @@ def list_functions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_functions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -392,10 +396,11 @@ def get_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -489,10 +494,11 @@ def create_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -584,10 +590,11 @@ def update_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -679,10 +686,11 @@ def delete_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -770,10 +778,11 @@ def call_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.call_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -898,10 +907,11 @@ def generate_upload_url request, options = nil # Customize the options with defaults metadata = @config.rpcs.generate_upload_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -991,10 +1001,11 @@ def generate_download_url request, options = nil # Customize the options with defaults metadata = @config.rpcs.generate_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1089,10 +1100,11 @@ def set_iam_policy request, options = nil # Customize the options with defaults metadata = @config.rpcs.set_iam_policy.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1180,10 +1192,11 @@ def get_iam_policy request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_iam_policy.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1274,10 +1287,11 @@ def test_iam_permissions request, options = nil # Customize the options with defaults metadata = @config.rpcs.test_iam_permissions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb index 645e8fdecb45..74c3a60f14ae 100644 --- a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +++ b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb @@ -26,6 +26,9 @@ module V1 module CloudFunctionsService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -279,10 +283,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -368,10 +373,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -462,10 +468,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -566,10 +573,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb index 5c7003a1406f..7c972c73d460 100644 --- a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb +++ b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb @@ -34,6 +34,9 @@ module Rest # A service that application uses to manipulate triggers and functions. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -292,12 +295,13 @@ def list_functions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_functions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_functions.timeout, @@ -377,12 +381,13 @@ def get_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_function.timeout, @@ -467,12 +472,13 @@ def create_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_function.timeout, @@ -555,12 +561,13 @@ def update_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_function.timeout, @@ -643,12 +650,13 @@ def delete_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_function.timeout, @@ -727,12 +735,13 @@ def call_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.call_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.call_function.timeout, @@ -848,12 +857,13 @@ def generate_upload_url request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.generate_upload_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.generate_upload_url.timeout, @@ -934,12 +944,13 @@ def generate_download_url request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.generate_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.generate_download_url.timeout, @@ -1025,12 +1036,13 @@ def set_iam_policy request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, @@ -1109,12 +1121,13 @@ def get_iam_policy request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, @@ -1196,12 +1209,13 @@ def test_iam_permissions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, diff --git a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb index d360fed147f0..03ae0b1883e6 100644 --- a/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb +++ b/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb @@ -26,6 +26,9 @@ module CloudFunctionsService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb index 9f7c46ea4629..c4e0454a533d 100644 --- a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb +++ b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb @@ -37,6 +37,9 @@ module FunctionService # executed and how it is triggered. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -264,10 +267,11 @@ def get_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -375,10 +379,11 @@ def list_functions request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_functions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -479,10 +484,11 @@ def create_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -576,10 +582,11 @@ def update_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -671,10 +678,11 @@ def delete_function request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -796,10 +804,11 @@ def generate_upload_url request, options = nil # Customize the options with defaults metadata = @config.rpcs.generate_upload_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -886,10 +895,11 @@ def generate_download_url request, options = nil # Customize the options with defaults metadata = @config.rpcs.generate_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -975,10 +985,11 @@ def list_runtimes request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_runtimes.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb index 48efe78b4f57..f6849e2681c3 100644 --- a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb +++ b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb @@ -26,6 +26,9 @@ module V2 module FunctionService # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb index ade806e5d53f..238ee2aae879 100644 --- a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb +++ b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb @@ -39,6 +39,9 @@ module Rest # executed and how it is triggered. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -258,12 +261,13 @@ def get_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_function.timeout, @@ -362,12 +366,13 @@ def list_functions request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_functions.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_functions.timeout, @@ -458,12 +463,13 @@ def create_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_function.timeout, @@ -548,12 +554,13 @@ def update_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_function.timeout, @@ -636,12 +643,13 @@ def delete_function request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_function.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_function.timeout, @@ -754,12 +762,13 @@ def generate_upload_url request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.generate_upload_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.generate_upload_url.timeout, @@ -837,12 +846,13 @@ def generate_download_url request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.generate_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.generate_download_url.timeout, @@ -919,12 +929,13 @@ def list_runtimes request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_runtimes.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_runtimes.timeout, diff --git a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb index d281e84f7d70..b935064a3bd3 100644 --- a/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb +++ b/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb @@ -26,6 +26,9 @@ module FunctionService module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Functions::V2::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, diff --git a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb index a8317d9a6c73..2423b1f49069 100644 --- a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +++ b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb @@ -33,6 +33,9 @@ module BackupForGKE # manage backup and restore operations for their GKE clusters. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" @@ -368,10 +371,11 @@ def create_backup_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -477,10 +481,11 @@ def list_backup_plans request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_backup_plans.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -564,10 +569,11 @@ def get_backup_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -667,10 +673,11 @@ def update_backup_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -765,10 +772,11 @@ def delete_backup_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -870,10 +878,11 @@ def create_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -979,10 +988,11 @@ def list_backups request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1066,10 +1076,11 @@ def get_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1168,10 +1179,11 @@ def update_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1270,10 +1282,11 @@ def delete_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1379,10 +1392,11 @@ def list_volume_backups request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_volume_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1466,10 +1480,11 @@ def get_volume_backup request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_volume_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1570,10 +1585,11 @@ def create_restore_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1679,10 +1695,11 @@ def list_restore_plans request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_restore_plans.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1766,10 +1783,11 @@ def get_restore_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1868,10 +1886,11 @@ def update_restore_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -1970,10 +1989,11 @@ def delete_restore_plan request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2075,10 +2095,11 @@ def create_restore request, options = nil # Customize the options with defaults metadata = @config.rpcs.create_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2184,10 +2205,11 @@ def list_restores request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_restores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2271,10 +2293,11 @@ def get_restore request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2373,10 +2396,11 @@ def update_restore request, options = nil # Customize the options with defaults metadata = @config.rpcs.update_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2475,10 +2499,11 @@ def delete_restore request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2584,10 +2609,11 @@ def list_volume_restores request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_volume_restores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2671,10 +2697,11 @@ def get_volume_restore request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_volume_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -2758,10 +2785,11 @@ def get_backup_index_download_url request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_backup_index_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} diff --git a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb index dffb5e75464e..8401fd28903c 100644 --- a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +++ b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb @@ -26,6 +26,9 @@ module V1 module BackupForGKE # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" @@ -191,10 +194,11 @@ def list_operations request, options = nil # Customize the options with defaults metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -287,10 +291,11 @@ def get_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -376,10 +381,11 @@ def delete_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -470,10 +476,11 @@ def cancel_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} @@ -574,10 +581,11 @@ def wait_operation request, options = nil # Customize the options with defaults metadata = @config.rpcs.wait_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, diff --git a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb index 0d0bef4318d4..faf95e2f56f1 100644 --- a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +++ b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb @@ -35,6 +35,9 @@ module Rest # manage backup and restore operations for their GKE clusters. # class Client + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" @@ -362,12 +365,13 @@ def create_backup_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, @@ -464,12 +468,13 @@ def list_backup_plans request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_backup_plans.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, @@ -543,12 +548,13 @@ def get_backup_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, @@ -639,12 +645,13 @@ def update_backup_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, @@ -730,12 +737,13 @@ def delete_backup_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, @@ -828,12 +836,13 @@ def create_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_backup.timeout, @@ -930,12 +939,13 @@ def list_backups request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_backups.timeout, @@ -1010,12 +1020,13 @@ def get_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup.timeout, @@ -1105,12 +1116,13 @@ def update_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_backup.timeout, @@ -1200,12 +1212,13 @@ def delete_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, @@ -1302,12 +1315,13 @@ def list_volume_backups request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_volume_backups.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout, @@ -1382,12 +1396,13 @@ def get_volume_backup request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_volume_backup.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout, @@ -1479,12 +1494,13 @@ def create_restore_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout, @@ -1581,12 +1597,13 @@ def list_restore_plans request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_restore_plans.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout, @@ -1660,12 +1677,13 @@ def get_restore_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout, @@ -1755,12 +1773,13 @@ def update_restore_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout, @@ -1850,12 +1869,13 @@ def delete_restore_plan request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_restore_plan.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout, @@ -1948,12 +1968,13 @@ def create_restore request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.create_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_restore.timeout, @@ -2050,12 +2071,13 @@ def list_restores request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_restores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_restores.timeout, @@ -2129,12 +2151,13 @@ def get_restore request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_restore.timeout, @@ -2224,12 +2247,13 @@ def update_restore request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.update_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.update_restore.timeout, @@ -2319,12 +2343,13 @@ def delete_restore request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_restore.timeout, @@ -2421,12 +2446,13 @@ def list_volume_restores request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_volume_restores.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_volume_restores.timeout, @@ -2501,12 +2527,13 @@ def get_volume_restore request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_volume_restore.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_volume_restore.timeout, @@ -2581,12 +2608,13 @@ def get_backup_index_download_url request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_backup_index_download_url.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_backup_index_download_url.timeout, diff --git a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb index d172d0bafa15..631a2d5ad3d1 100644 --- a/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +++ b/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb @@ -26,6 +26,9 @@ module BackupForGKE module Rest # Service that implements Longrunning Operations API. class Operations + # @private + API_VERSION = "" + # @private DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" @@ -181,12 +184,13 @@ def list_operations request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.list_operations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_operations.timeout, @@ -269,12 +273,13 @@ def get_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.get_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.get_operation.timeout, @@ -351,12 +356,13 @@ def delete_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.delete_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, @@ -438,12 +444,13 @@ def cancel_operation request, options = nil # Customize the options with defaults call_metadata = @config.rpcs.cancel_operation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,