lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb in google-cloud-bigquery-reservation-v1-0.12.0 vs lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb in google-cloud-bigquery-reservation-v1-1.0.0

- old
+ new

@@ -46,10 +46,13 @@ # location, e.g.: # `projects/myproject/locations/US/capacityCommitments/id`. # class Client # @private + API_VERSION = "" + + # @private DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" include Paths # @private @@ -295,16 +298,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.create_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.create_reservation.retry_policy @@ -382,16 +386,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.list_reservations.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_reservations.timeout, metadata: call_metadata, retry_policy: @config.rpcs.list_reservations.retry_policy @@ -462,16 +467,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.get_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.get_reservation.retry_policy @@ -543,16 +549,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.delete_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.delete_reservation.retry_policy @@ -623,16 +630,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.update_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.update_reservation.retry_policy @@ -713,16 +721,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.create_capacity_commitment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_capacity_commitment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.create_capacity_commitment.retry_policy @@ -800,16 +809,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.list_capacity_commitments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_capacity_commitments.timeout, metadata: call_metadata, retry_policy: @config.rpcs.list_capacity_commitments.retry_policy @@ -880,16 +890,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.get_capacity_commitment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_capacity_commitment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.get_capacity_commitment.retry_policy @@ -965,16 +976,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.delete_capacity_commitment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_capacity_commitment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy @@ -1051,16 +1063,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.update_capacity_commitment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_capacity_commitment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.update_capacity_commitment.retry_policy @@ -1139,16 +1152,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.split_capacity_commitment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.split_capacity_commitment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.split_capacity_commitment.retry_policy @@ -1230,16 +1244,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.merge_capacity_commitments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.merge_capacity_commitments.timeout, metadata: call_metadata, retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy @@ -1350,16 +1365,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.create_assignment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_assignment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.create_assignment.retry_policy @@ -1462,16 +1478,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.list_assignments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_assignments.timeout, metadata: call_metadata, retry_policy: @config.rpcs.list_assignments.retry_policy @@ -1556,16 +1573,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.delete_assignment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_assignment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.delete_assignment.retry_policy @@ -1674,16 +1692,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.search_assignments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_assignments.timeout, metadata: call_metadata, retry_policy: @config.rpcs.search_assignments.retry_policy @@ -1790,16 +1809,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.search_all_assignments.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_all_assignments.timeout, metadata: call_metadata, retry_policy: @config.rpcs.search_all_assignments.retry_policy @@ -1884,16 +1904,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.move_assignment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.move_assignment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.move_assignment.retry_policy @@ -1966,16 +1987,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.update_assignment.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_assignment.timeout, metadata: call_metadata, retry_policy: @config.rpcs.update_assignment.retry_policy @@ -2045,16 +2067,17 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.get_bi_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_bi_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.get_bi_reservation.retry_policy @@ -2132,15 +2155,16 @@ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults call_metadata = @config.rpcs.update_bi_reservation.metadata.to_h - # Set x-goog-api-client and x-goog-user-project headers + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION, transports_version_send: [:rest] + call_metadata[:"x-goog-api-version"] = API_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_bi_reservation.timeout, metadata: call_metadata, retry_policy: @config.rpcs.update_bi_reservation.retry_policy