lib/google/cloud/compute/v1/region_operations/rest/client.rb in google-cloud-compute-v1-2.11.0 vs lib/google/cloud/compute/v1/region_operations/rest/client.rb in google-cloud-compute-v1-2.13.0
- old
+ new
@@ -31,10 +31,13 @@
#
# The RegionOperations API.
#
class Client
# @private
+ API_VERSION = ""
+
+ # @private
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
# @private
attr_reader :region_operations_stub
@@ -182,11 +185,11 @@
# Pass arguments to `delete` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param operation [::String]
- # Name of the Operations resource to delete.
+ # Name of the Operations resource to delete, or its unique numeric identifier.
# @param project [::String]
# Project ID for this request.
# @param region [::String]
# Name of the region for this request.
# @yield [result, operation] Access the result along with the TransportOperation object
@@ -221,16 +224,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.delete.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.delete.retry_policy
@@ -264,11 +268,11 @@
# Pass arguments to `get` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param operation [::String]
- # Name of the Operations resource to return.
+ # Name of the Operations resource to return, or its unique numeric identifier.
# @param project [::String]
# Project ID for this request.
# @param region [::String]
# Name of the region for this request.
# @yield [result, operation] Access the result along with the TransportOperation object
@@ -303,16 +307,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.get.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.get.retry_policy
@@ -393,16 +398,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.list.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.list.retry_policy
@@ -437,11 +443,11 @@
# Pass arguments to `wait` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param operation [::String]
- # Name of the Operations resource to return.
+ # Name of the Operations resource to return, or its unique numeric identifier.
# @param project [::String]
# Project ID for this request.
# @param region [::String]
# Name of the region for this request.
# @yield [result, operation] Access the result along with the TransportOperation object
@@ -476,15 +482,16 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.wait.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.wait.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.wait.retry_policy