lib/google/cloud/notebooks/v2/notebook_service/rest/client.rb in google-cloud-notebooks-v2-0.4.0 vs lib/google/cloud/notebooks/v2/notebook_service/rest/client.rb in google-cloud-notebooks-v2-0.4.1

- old
+ new

@@ -33,10 +33,13 @@ # # API v2 service for Workbench Notebooks Instances. # class Client # @private + API_VERSION = "" + + # @private DEFAULT_ENDPOINT_TEMPLATE = "notebooks.$UNIVERSE_DOMAIN$" include Paths # @private @@ -289,16 +292,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # 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::Notebooks::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_instances.timeout, metadata: call_metadata, retry_policy: @config.rpcs.list_instances.retry_policy @@ -368,16 +372,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # 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::Notebooks::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_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.get_instance.retry_policy @@ -460,16 +465,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # 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::Notebooks::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_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.create_instance.retry_policy @@ -550,16 +556,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # 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::Notebooks::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_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.update_instance.retry_policy @@ -639,16 +646,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # 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::Notebooks::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_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.delete_instance.retry_policy @@ -726,16 +734,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.start_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::Notebooks::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.start_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.start_instance.retry_policy @@ -813,16 +822,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.stop_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::Notebooks::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.stop_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.stop_instance.retry_policy @@ -900,16 +910,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.reset_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::Notebooks::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.reset_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.reset_instance.retry_policy @@ -980,16 +991,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.check_instance_upgradability.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Notebooks::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.check_instance_upgradability.timeout, metadata: call_metadata, retry_policy: @config.rpcs.check_instance_upgradability.retry_policy @@ -1066,16 +1078,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.upgrade_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::Notebooks::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.upgrade_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.upgrade_instance.retry_policy @@ -1156,16 +1169,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.rollback_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::Notebooks::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.rollback_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.rollback_instance.retry_policy @@ -1247,15 +1261,16 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.diagnose_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::Notebooks::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.diagnose_instance.timeout, metadata: call_metadata, retry_policy: @config.rpcs.diagnose_instance.retry_policy