lib/google/cloud/app_engine/v1/firewall/rest/client.rb in google-cloud-app_engine-v1-0.10.0 vs lib/google/cloud/app_engine/v1/firewall/rest/client.rb in google-cloud-app_engine-v1-1.0.0
- old
+ new
@@ -40,10 +40,13 @@
# IP addresses. The default final rule for a newly-created application will be
# set to "allow" if not otherwise specified by the user.
#
class Client
# @private
+ API_VERSION = ""
+
+ # @private
DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$"
# @private
attr_reader :firewall_stub
@@ -225,16 +228,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.list_ingress_rules.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rules.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.list_ingress_rules.retry_policy
@@ -311,16 +315,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.batch_update_ingress_rules.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rules.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy
@@ -401,16 +406,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.create_ingress_rule.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rule.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.create_ingress_rule.retry_policy
@@ -480,16 +486,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.get_ingress_rule.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rule.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.get_ingress_rule.retry_policy
@@ -563,16 +570,17 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.update_ingress_rule.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rule.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.update_ingress_rule.retry_policy
@@ -642,15 +650,16 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
call_metadata = @config.rpcs.delete_ingress_rule.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
transports_version_send: [:rest]
+ call_metadata[:"x-goog-api-version"] = API_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_ingress_rule.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.delete_ingress_rule.retry_policy