lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb in google-cloud-vision-v1p4beta1-0.8.0 vs lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb in google-cloud-vision-v1p4beta1-0.8.1
- old
+ new
@@ -31,10 +31,13 @@
# images, such as face, landmark, logo, label, and text detection. The
# ImageAnnotator service returns detected entities from the images.
#
class Client
# @private
+ API_VERSION = ""
+
+ # @private
DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$"
include Paths
# @private
@@ -249,14 +252,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.batch_annotate_images.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
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::Vision::V1p4beta1::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.batch_annotate_images.timeout,
metadata: metadata,
retry_policy: @config.rpcs.batch_annotate_images.retry_policy
@@ -333,14 +337,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.batch_annotate_files.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
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::Vision::V1p4beta1::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.batch_annotate_files.timeout,
metadata: metadata,
retry_policy: @config.rpcs.batch_annotate_files.retry_policy
@@ -427,14 +432,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.async_batch_annotate_images.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
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::Vision::V1p4beta1::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.async_batch_annotate_images.timeout,
metadata: metadata,
retry_policy: @config.rpcs.async_batch_annotate_images.retry_policy
@@ -517,13 +523,14 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.async_batch_annotate_files.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
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::Vision::V1p4beta1::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
options.apply_defaults timeout: @config.rpcs.async_batch_annotate_files.timeout,
metadata: metadata,
retry_policy: @config.rpcs.async_batch_annotate_files.retry_policy