lib/google/cloud/optimization/v1/fleet_routing/rest/client.rb in google-cloud-optimization-v1-0.9.0 vs lib/google/cloud/optimization/v1/fleet_routing/rest/client.rb in google-cloud-optimization-v1-0.9.1
- old
+ new
@@ -47,10 +47,13 @@
# * longitude must be in [-180.0, 180.0].
# * at least one of latitude and longitude must be non-zero.
#
class Client
# @private
+ API_VERSION = ""
+
+ # @private
DEFAULT_ENDPOINT_TEMPLATE = "cloudoptimization.$UNIVERSE_DOMAIN$"
# @private
attr_reader :fleet_routing_stub
@@ -443,16 +446,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.optimize_tours.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Optimization::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.optimize_tours.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.optimize_tours.retry_policy
@@ -544,15 +548,16 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.batch_optimize_tours.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Optimization::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_optimize_tours.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.batch_optimize_tours.retry_policy