Autogenerated update (2019-08-14)

Delete:
- run_v1beta1

Update:
- adexperiencereport_v1
- analytics_v3
- cloudasset_v1
- cloudasset_v1beta1
- cloudiot_v1
- content_v2_1
- ml_v1
- translate_v3beta1
- vision_v1
- vision_v1p1beta1
- vision_v1p2beta1
This commit is contained in:
Google APIs 2019-08-14 00:38:24 +00:00
parent 9267e91d2f
commit a953ec5607
39 changed files with 3113 additions and 322 deletions

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/ad-experience-report/ # @see https://developers.google.com/ad-experience-report/
module AdexperiencereportV1 module AdexperiencereportV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20190729' REVISION = '20190812'
# Test scope for access to the Zoo service # Test scope for access to the Zoo service
AUTH_XAPI_ZOO = 'https://www.googleapis.com/auth/xapi.zoo' AUTH_XAPI_ZOO = 'https://www.googleapis.com/auth/xapi.zoo'

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/analytics/ # @see https://developers.google.com/analytics/
module AnalyticsV3 module AnalyticsV3
VERSION = 'V3' VERSION = 'V3'
REVISION = '20190604' REVISION = '20190807'
# View and manage your Google Analytics data # View and manage your Google Analytics data
AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics' AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'

View File

@ -5325,6 +5325,11 @@ module Google
# @return [String] # @return [String]
attr_accessor :kind attr_accessor :kind
# Property ID
# Corresponds to the JSON property `propertyId`
# @return [String]
attr_accessor :property_id
# Web property ID of the form UA-XXXXX-YY. # Web property ID of the form UA-XXXXX-YY.
# Corresponds to the JSON property `webPropertyId` # Corresponds to the JSON property `webPropertyId`
# @return [String] # @return [String]
@ -5340,6 +5345,7 @@ module Google
@firebase_project_id = args[:firebase_project_id] if args.key?(:firebase_project_id) @firebase_project_id = args[:firebase_project_id] if args.key?(:firebase_project_id)
@id = args[:id] if args.key?(:id) @id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind) @kind = args[:kind] if args.key?(:kind)
@property_id = args[:property_id] if args.key?(:property_id)
@web_property_id = args[:web_property_id] if args.key?(:web_property_id) @web_property_id = args[:web_property_id] if args.key?(:web_property_id)
end end

View File

@ -1978,6 +1978,7 @@ module Google
property :id, as: 'id', class: Google::Apis::AnalyticsV3::UserDeletionRequest::Id, decorator: Google::Apis::AnalyticsV3::UserDeletionRequest::Id::Representation property :id, as: 'id', class: Google::Apis::AnalyticsV3::UserDeletionRequest::Id, decorator: Google::Apis::AnalyticsV3::UserDeletionRequest::Id::Representation
property :kind, as: 'kind' property :kind, as: 'kind'
property :property_id, as: 'propertyId'
property :web_property_id, as: 'webPropertyId' property :web_property_id, as: 'webPropertyId'
end end

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory # @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory
module CloudassetV1 module CloudassetV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20190722' REVISION = '20190812'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -240,14 +240,6 @@ module Google
# @return [Array<String>] # @return [Array<String>]
attr_accessor :exempted_members attr_accessor :exempted_members
# Specifies whether principals can be exempted for the same LogType in
# lower-level resource policies. If true, any lower-level exemptions will
# be ignored.
# Corresponds to the JSON property `ignoreChildExemptions`
# @return [Boolean]
attr_accessor :ignore_child_exemptions
alias_method :ignore_child_exemptions?, :ignore_child_exemptions
# The log type that this config enables. # The log type that this config enables.
# Corresponds to the JSON property `logType` # Corresponds to the JSON property `logType`
# @return [String] # @return [String]
@ -260,7 +252,6 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members) @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@ignore_child_exemptions = args[:ignore_child_exemptions] if args.key?(:ignore_child_exemptions)
@log_type = args[:log_type] if args.key?(:log_type) @log_type = args[:log_type] if args.key?(:log_type)
end end
end end

View File

@ -217,7 +217,6 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers' collection :exempted_members, as: 'exemptedMembers'
property :ignore_child_exemptions, as: 'ignoreChildExemptions'
property :log_type, as: 'logType' property :log_type, as: 'logType'
end end
end end

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory # @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory
module CloudassetV1beta1 module CloudassetV1beta1
VERSION = 'V1beta1' VERSION = 'V1beta1'
REVISION = '20190709' REVISION = '20190812'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -201,14 +201,6 @@ module Google
# @return [Array<String>] # @return [Array<String>]
attr_accessor :exempted_members attr_accessor :exempted_members
# Specifies whether principals can be exempted for the same LogType in
# lower-level resource policies. If true, any lower-level exemptions will
# be ignored.
# Corresponds to the JSON property `ignoreChildExemptions`
# @return [Boolean]
attr_accessor :ignore_child_exemptions
alias_method :ignore_child_exemptions?, :ignore_child_exemptions
# The log type that this config enables. # The log type that this config enables.
# Corresponds to the JSON property `logType` # Corresponds to the JSON property `logType`
# @return [String] # @return [String]
@ -221,7 +213,6 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members) @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@ignore_child_exemptions = args[:ignore_child_exemptions] if args.key?(:ignore_child_exemptions)
@log_type = args[:log_type] if args.key?(:log_type) @log_type = args[:log_type] if args.key?(:log_type)
end end
end end

View File

@ -137,7 +137,6 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers' collection :exempted_members, as: 'exemptedMembers'
property :ignore_child_exemptions, as: 'ignoreChildExemptions'
property :log_type, as: 'logType' property :log_type, as: 'logType'
end end
end end

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/iot # @see https://cloud.google.com/iot
module CloudiotV1 module CloudiotV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20190709' REVISION = '20190805'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -611,7 +611,7 @@ module Google
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. The policy format version to be returned. # Optional. The policy format version to be returned.
# Acceptable values are 0 and 1. # Acceptable values are 0, 1, and 3.
# If the value is 0, or the field is omitted, policy format version 1 will be # If the value is 0, or the field is omitted, policy format version 1 will be
# returned. # returned.
# Corresponds to the JSON property `requestedPolicyVersion` # Corresponds to the JSON property `requestedPolicyVersion`

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/shopping-content # @see https://developers.google.com/shopping-content
module ContentV2_1 module ContentV2_1
VERSION = 'V2_1' VERSION = 'V2_1'
REVISION = '20190805' REVISION = '20190809'
# Manage your product listings and accounts for Google Shopping # Manage your product listings and accounts for Google Shopping
AUTH_CONTENT = 'https://www.googleapis.com/auth/content' AUTH_CONTENT = 'https://www.googleapis.com/auth/content'

View File

@ -3858,6 +3858,11 @@ module Google
# @return [Fixnum] # @return [Fixnum]
attr_accessor :quantity_shipped attr_accessor :quantity_shipped
# Number of items undeliverable.
# Corresponds to the JSON property `quantityUndeliverable`
# @return [Fixnum]
attr_accessor :quantity_undeliverable
# Details of the return policy for the line item. # Details of the return policy for the line item.
# Corresponds to the JSON property `returnInfo` # Corresponds to the JSON property `returnInfo`
# @return [Google::Apis::ContentV2_1::OrderLineItemReturnInfo] # @return [Google::Apis::ContentV2_1::OrderLineItemReturnInfo]
@ -3897,6 +3902,7 @@ module Google
@quantity_pending = args[:quantity_pending] if args.key?(:quantity_pending) @quantity_pending = args[:quantity_pending] if args.key?(:quantity_pending)
@quantity_returned = args[:quantity_returned] if args.key?(:quantity_returned) @quantity_returned = args[:quantity_returned] if args.key?(:quantity_returned)
@quantity_shipped = args[:quantity_shipped] if args.key?(:quantity_shipped) @quantity_shipped = args[:quantity_shipped] if args.key?(:quantity_shipped)
@quantity_undeliverable = args[:quantity_undeliverable] if args.key?(:quantity_undeliverable)
@return_info = args[:return_info] if args.key?(:return_info) @return_info = args[:return_info] if args.key?(:return_info)
@returns = args[:returns] if args.key?(:returns) @returns = args[:returns] if args.key?(:returns)
@shipping_details = args[:shipping_details] if args.key?(:shipping_details) @shipping_details = args[:shipping_details] if args.key?(:shipping_details)
@ -8284,6 +8290,253 @@ module Google
end end
end end
# Return address resource.
class ReturnAddress
include Google::Apis::Core::Hashable
# The address.
# Corresponds to the JSON property `address`
# @return [Google::Apis::ContentV2_1::ReturnAddressAddress]
attr_accessor :address
# The country of sale where the return address is applicable.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnAddress".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The user-defined label of the return address. For the default address, use the
# label "default".
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# The merchant's contact phone number regarding the return.
# Corresponds to the JSON property `phoneNumber`
# @return [String]
attr_accessor :phone_number
# Return address ID generated by Google.
# Corresponds to the JSON property `returnAddressId`
# @return [String]
attr_accessor :return_address_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address = args[:address] if args.key?(:address)
@country = args[:country] if args.key?(:country)
@kind = args[:kind] if args.key?(:kind)
@label = args[:label] if args.key?(:label)
@phone_number = args[:phone_number] if args.key?(:phone_number)
@return_address_id = args[:return_address_id] if args.key?(:return_address_id)
end
end
#
class ReturnAddressAddress
include Google::Apis::Core::Hashable
# CLDR country code (e.g. "US").
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# City, town or commune. May also include dependent localities or sublocalities (
# e.g. neighborhoods or suburbs).
# Corresponds to the JSON property `locality`
# @return [String]
attr_accessor :locality
# Postal code or ZIP (e.g. "94043").
# Corresponds to the JSON property `postalCode`
# @return [String]
attr_accessor :postal_code
# Name of the recipient to address returns to.
# Corresponds to the JSON property `recipientName`
# @return [String]
attr_accessor :recipient_name
# Top-level administrative subdivision of the country. For example, a state like
# California ("CA") or a province like Quebec ("QC").
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# Street-level part of the address. May be up to two lines, each line specified
# as an array element.
# Corresponds to the JSON property `streetAddress`
# @return [Array<String>]
attr_accessor :street_address
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@locality = args[:locality] if args.key?(:locality)
@postal_code = args[:postal_code] if args.key?(:postal_code)
@recipient_name = args[:recipient_name] if args.key?(:recipient_name)
@region = args[:region] if args.key?(:region)
@street_address = args[:street_address] if args.key?(:street_address)
end
end
# Return policy resource.
class ReturnPolicy
include Google::Apis::Core::Hashable
# The country of sale where the return policy is applicable.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnPolicy".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The user-defined label of the return policy. For the default policy, use the
# label "default".
# Corresponds to the JSON property `label`
# @return [String]
attr_accessor :label
# The name of the policy as shown in Merchant Center.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Return reasons that will incur return fees.
# Corresponds to the JSON property `nonFreeReturnReasons`
# @return [Array<String>]
attr_accessor :non_free_return_reasons
# The policy.
# Corresponds to the JSON property `policy`
# @return [Google::Apis::ContentV2_1::ReturnPolicyPolicy]
attr_accessor :policy
# Return policy ID generated by Google.
# Corresponds to the JSON property `returnPolicyId`
# @return [String]
attr_accessor :return_policy_id
# An optional list of seasonal overrides.
# Corresponds to the JSON property `seasonalOverrides`
# @return [Array<Google::Apis::ContentV2_1::ReturnPolicySeasonalOverride>]
attr_accessor :seasonal_overrides
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@kind = args[:kind] if args.key?(:kind)
@label = args[:label] if args.key?(:label)
@name = args[:name] if args.key?(:name)
@non_free_return_reasons = args[:non_free_return_reasons] if args.key?(:non_free_return_reasons)
@policy = args[:policy] if args.key?(:policy)
@return_policy_id = args[:return_policy_id] if args.key?(:return_policy_id)
@seasonal_overrides = args[:seasonal_overrides] if args.key?(:seasonal_overrides)
end
end
#
class ReturnPolicyPolicy
include Google::Apis::Core::Hashable
# Last day for returning the items. In ISO 8601 format. When specifying the
# return window like this, set the policy type to "lastReturnDate". Use this for
# seasonal overrides only.
# Corresponds to the JSON property `lastReturnDate`
# @return [String]
attr_accessor :last_return_date
# The number of days items can be returned after delivery, where one day is
# defined to be 24 hours after the delivery timestamp. When specifying the
# return window like this, set the policy type to "numberOfDaysAfterDelivery".
# Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default
# policy. Additional policies further allow 14, 15, 21 and 28 days, but note
# that for most items a minimum of 30 days is required for returns. Exceptions
# may be made for electronics. A policy of less than 30 days can only be applied
# to those items.
# Corresponds to the JSON property `numberOfDays`
# @return [Fixnum]
attr_accessor :number_of_days
# Policy type. Use "lastReturnDate" for seasonal overrides only. Note that for
# most items a minimum of 30 days is required for returns. Exceptions may be
# made for electronics or non-returnable items such as food, perishables, and
# living things. A policy of less than 30 days can only be applied to those
# items.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@last_return_date = args[:last_return_date] if args.key?(:last_return_date)
@number_of_days = args[:number_of_days] if args.key?(:number_of_days)
@type = args[:type] if args.key?(:type)
end
end
#
class ReturnPolicySeasonalOverride
include Google::Apis::Core::Hashable
# Last day on which the override applies. In ISO 8601 format.
# Corresponds to the JSON property `endDate`
# @return [String]
attr_accessor :end_date
# The name of the seasonal override as shown in Merchant Center.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The policy which is in effect during that time.
# Corresponds to the JSON property `policy`
# @return [Google::Apis::ContentV2_1::ReturnPolicyPolicy]
attr_accessor :policy
# First day on which the override applies. In ISO 8601 format.
# Corresponds to the JSON property `startDate`
# @return [String]
attr_accessor :start_date
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@end_date = args[:end_date] if args.key?(:end_date)
@name = args[:name] if args.key?(:name)
@policy = args[:policy] if args.key?(:policy)
@start_date = args[:start_date] if args.key?(:start_date)
end
end
# #
class ReturnShipment class ReturnShipment
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -8339,6 +8592,316 @@ module Google
end end
end end
#
class ReturnaddressCustomBatchRequest
include Google::Apis::Core::Hashable
# The request entries to be processed in the batch.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequestEntry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entries = args[:entries] if args.key?(:entries)
end
end
#
class ReturnaddressCustomBatchRequestEntry
include Google::Apis::Core::Hashable
# An entry ID, unique within the batch request.
# Corresponds to the JSON property `batchId`
# @return [Fixnum]
attr_accessor :batch_id
# The Merchant Center account ID.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id
#
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :method_prop
# Return address resource.
# Corresponds to the JSON property `returnAddress`
# @return [Google::Apis::ContentV2_1::ReturnAddress]
attr_accessor :return_address
# The return address ID. Set this only if the method is delete or get.
# Corresponds to the JSON property `returnAddressId`
# @return [String]
attr_accessor :return_address_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
@method_prop = args[:method_prop] if args.key?(:method_prop)
@return_address = args[:return_address] if args.key?(:return_address)
@return_address_id = args[:return_address_id] if args.key?(:return_address_id)
end
end
#
class ReturnaddressCustomBatchResponse
include Google::Apis::Core::Hashable
# The result of the execution of the batch requests.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponseEntry>]
attr_accessor :entries
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnaddressCustomBatchResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entries = args[:entries] if args.key?(:entries)
@kind = args[:kind] if args.key?(:kind)
end
end
#
class ReturnaddressCustomBatchResponseEntry
include Google::Apis::Core::Hashable
# The ID of the request entry to which this entry responds.
# Corresponds to the JSON property `batchId`
# @return [Fixnum]
attr_accessor :batch_id
# A list of errors returned by a failed batch entry.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::ContentV2_1::Errors]
attr_accessor :errors
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnaddressCustomBatchResponseEntry".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Return address resource.
# Corresponds to the JSON property `returnAddress`
# @return [Google::Apis::ContentV2_1::ReturnAddress]
attr_accessor :return_address
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@errors = args[:errors] if args.key?(:errors)
@kind = args[:kind] if args.key?(:kind)
@return_address = args[:return_address] if args.key?(:return_address)
end
end
#
class ReturnaddressListResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnaddressListResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The token for the retrieval of the next page of addresses.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
#
# Corresponds to the JSON property `resources`
# @return [Array<Google::Apis::ContentV2_1::ReturnAddress>]
attr_accessor :resources
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@resources = args[:resources] if args.key?(:resources)
end
end
#
class ReturnpolicyCustomBatchRequest
include Google::Apis::Core::Hashable
# The request entries to be processed in the batch.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::ContentV2_1::ReturnpolicyCustomBatchRequestEntry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entries = args[:entries] if args.key?(:entries)
end
end
#
class ReturnpolicyCustomBatchRequestEntry
include Google::Apis::Core::Hashable
# An entry ID, unique within the batch request.
# Corresponds to the JSON property `batchId`
# @return [Fixnum]
attr_accessor :batch_id
# The Merchant Center account ID.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id
#
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :method_prop
# Return policy resource.
# Corresponds to the JSON property `returnPolicy`
# @return [Google::Apis::ContentV2_1::ReturnPolicy]
attr_accessor :return_policy
# The return policy ID. Set this only if the method is delete or get.
# Corresponds to the JSON property `returnPolicyId`
# @return [String]
attr_accessor :return_policy_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
@method_prop = args[:method_prop] if args.key?(:method_prop)
@return_policy = args[:return_policy] if args.key?(:return_policy)
@return_policy_id = args[:return_policy_id] if args.key?(:return_policy_id)
end
end
#
class ReturnpolicyCustomBatchResponse
include Google::Apis::Core::Hashable
# The result of the execution of the batch requests.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponseEntry>]
attr_accessor :entries
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnpolicyCustomBatchResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entries = args[:entries] if args.key?(:entries)
@kind = args[:kind] if args.key?(:kind)
end
end
#
class ReturnpolicyCustomBatchResponseEntry
include Google::Apis::Core::Hashable
# The ID of the request entry to which this entry responds.
# Corresponds to the JSON property `batchId`
# @return [Fixnum]
attr_accessor :batch_id
# A list of errors returned by a failed batch entry.
# Corresponds to the JSON property `errors`
# @return [Google::Apis::ContentV2_1::Errors]
attr_accessor :errors
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnpolicyCustomBatchResponseEntry".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Return policy resource.
# Corresponds to the JSON property `returnPolicy`
# @return [Google::Apis::ContentV2_1::ReturnPolicy]
attr_accessor :return_policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@errors = args[:errors] if args.key?(:errors)
@kind = args[:kind] if args.key?(:kind)
@return_policy = args[:return_policy] if args.key?(:return_policy)
end
end
#
class ReturnpolicyListResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "content#
# returnpolicyListResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `resources`
# @return [Array<Google::Apis::ContentV2_1::ReturnPolicy>]
attr_accessor :resources
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@resources = args[:resources] if args.key?(:resources)
end
end
# #
class Row class Row
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable

View File

@ -1252,12 +1252,102 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ReturnAddress
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnAddressAddress
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnPolicyPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnPolicySeasonalOverride
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnShipment class ReturnShipment
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ReturnaddressCustomBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnaddressCustomBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnaddressCustomBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnaddressCustomBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnaddressListResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnpolicyCustomBatchRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnpolicyCustomBatchRequestEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnpolicyCustomBatchResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnpolicyCustomBatchResponseEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ReturnpolicyListResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Row class Row
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -2504,6 +2594,7 @@ module Google
property :quantity_pending, as: 'quantityPending' property :quantity_pending, as: 'quantityPending'
property :quantity_returned, as: 'quantityReturned' property :quantity_returned, as: 'quantityReturned'
property :quantity_shipped, as: 'quantityShipped' property :quantity_shipped, as: 'quantityShipped'
property :quantity_undeliverable, as: 'quantityUndeliverable'
property :return_info, as: 'returnInfo', class: Google::Apis::ContentV2_1::OrderLineItemReturnInfo, decorator: Google::Apis::ContentV2_1::OrderLineItemReturnInfo::Representation property :return_info, as: 'returnInfo', class: Google::Apis::ContentV2_1::OrderLineItemReturnInfo, decorator: Google::Apis::ContentV2_1::OrderLineItemReturnInfo::Representation
collection :returns, as: 'returns', class: Google::Apis::ContentV2_1::OrderReturn, decorator: Google::Apis::ContentV2_1::OrderReturn::Representation collection :returns, as: 'returns', class: Google::Apis::ContentV2_1::OrderReturn, decorator: Google::Apis::ContentV2_1::OrderReturn::Representation
@ -3709,6 +3800,67 @@ module Google
end end
end end
class ReturnAddress
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :address, as: 'address', class: Google::Apis::ContentV2_1::ReturnAddressAddress, decorator: Google::Apis::ContentV2_1::ReturnAddressAddress::Representation
property :country, as: 'country'
property :kind, as: 'kind'
property :label, as: 'label'
property :phone_number, as: 'phoneNumber'
property :return_address_id, as: 'returnAddressId'
end
end
class ReturnAddressAddress
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :locality, as: 'locality'
property :postal_code, as: 'postalCode'
property :recipient_name, as: 'recipientName'
property :region, as: 'region'
collection :street_address, as: 'streetAddress'
end
end
class ReturnPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :country, as: 'country'
property :kind, as: 'kind'
property :label, as: 'label'
property :name, as: 'name'
collection :non_free_return_reasons, as: 'nonFreeReturnReasons'
property :policy, as: 'policy', class: Google::Apis::ContentV2_1::ReturnPolicyPolicy, decorator: Google::Apis::ContentV2_1::ReturnPolicyPolicy::Representation
property :return_policy_id, as: 'returnPolicyId'
collection :seasonal_overrides, as: 'seasonalOverrides', class: Google::Apis::ContentV2_1::ReturnPolicySeasonalOverride, decorator: Google::Apis::ContentV2_1::ReturnPolicySeasonalOverride::Representation
end
end
class ReturnPolicyPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :last_return_date, as: 'lastReturnDate'
property :number_of_days, :numeric_string => true, as: 'numberOfDays'
property :type, as: 'type'
end
end
class ReturnPolicySeasonalOverride
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_date, as: 'endDate'
property :name, as: 'name'
property :policy, as: 'policy', class: Google::Apis::ContentV2_1::ReturnPolicyPolicy, decorator: Google::Apis::ContentV2_1::ReturnPolicyPolicy::Representation
property :start_date, as: 'startDate'
end
end
class ReturnShipment class ReturnShipment
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -3723,6 +3875,107 @@ module Google
end end
end end
class ReturnaddressCustomBatchRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :entries, as: 'entries', class: Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequestEntry, decorator: Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequestEntry::Representation
end
end
class ReturnaddressCustomBatchRequestEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :merchant_id, :numeric_string => true, as: 'merchantId'
property :method_prop, as: 'method'
property :return_address, as: 'returnAddress', class: Google::Apis::ContentV2_1::ReturnAddress, decorator: Google::Apis::ContentV2_1::ReturnAddress::Representation
property :return_address_id, as: 'returnAddressId'
end
end
class ReturnaddressCustomBatchResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :entries, as: 'entries', class: Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponseEntry, decorator: Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponseEntry::Representation
property :kind, as: 'kind'
end
end
class ReturnaddressCustomBatchResponseEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :errors, as: 'errors', class: Google::Apis::ContentV2_1::Errors, decorator: Google::Apis::ContentV2_1::Errors::Representation
property :kind, as: 'kind'
property :return_address, as: 'returnAddress', class: Google::Apis::ContentV2_1::ReturnAddress, decorator: Google::Apis::ContentV2_1::ReturnAddress::Representation
end
end
class ReturnaddressListResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
collection :resources, as: 'resources', class: Google::Apis::ContentV2_1::ReturnAddress, decorator: Google::Apis::ContentV2_1::ReturnAddress::Representation
end
end
class ReturnpolicyCustomBatchRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :entries, as: 'entries', class: Google::Apis::ContentV2_1::ReturnpolicyCustomBatchRequestEntry, decorator: Google::Apis::ContentV2_1::ReturnpolicyCustomBatchRequestEntry::Representation
end
end
class ReturnpolicyCustomBatchRequestEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :merchant_id, :numeric_string => true, as: 'merchantId'
property :method_prop, as: 'method'
property :return_policy, as: 'returnPolicy', class: Google::Apis::ContentV2_1::ReturnPolicy, decorator: Google::Apis::ContentV2_1::ReturnPolicy::Representation
property :return_policy_id, as: 'returnPolicyId'
end
end
class ReturnpolicyCustomBatchResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :entries, as: 'entries', class: Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponseEntry, decorator: Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponseEntry::Representation
property :kind, as: 'kind'
end
end
class ReturnpolicyCustomBatchResponseEntry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :batch_id, as: 'batchId'
property :errors, as: 'errors', class: Google::Apis::ContentV2_1::Errors, decorator: Google::Apis::ContentV2_1::Errors::Representation
property :kind, as: 'kind'
property :return_policy, as: 'returnPolicy', class: Google::Apis::ContentV2_1::ReturnPolicy, decorator: Google::Apis::ContentV2_1::ReturnPolicy::Representation
end
end
class ReturnpolicyListResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
collection :resources, as: 'resources', class: Google::Apis::ContentV2_1::ReturnPolicy, decorator: Google::Apis::ContentV2_1::ReturnPolicy::Representation
end
end
class Row class Row
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -3159,6 +3159,360 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Batches multiple return address related calls in a single request.
# @param [Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequest] returnaddress_custom_batch_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def custombatch_returnaddress(returnaddress_custom_batch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'returnaddress/batch', options)
command.request_representation = Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequest::Representation
command.request_object = returnaddress_custom_batch_request_object
command.response_representation = Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponse::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnaddressCustomBatchResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes a return address for the given Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account from which to delete the given return address.
# @param [String] return_address_id
# Return address ID generated by Google.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_returnaddress(merchant_id, return_address_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{merchantId}/returnaddress/{returnAddressId}', options)
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.params['returnAddressId'] = return_address_id unless return_address_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets a return address of the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to get a return address for.
# @param [String] return_address_id
# Return address ID generated by Google.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnAddress] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnAddress]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_returnaddress(merchant_id, return_address_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{merchantId}/returnaddress/{returnAddressId}', options)
command.response_representation = Google::Apis::ContentV2_1::ReturnAddress::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnAddress
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.params['returnAddressId'] = return_address_id unless return_address_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Inserts a return address for the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to insert a return address for.
# @param [Google::Apis::ContentV2_1::ReturnAddress] return_address_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnAddress] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnAddress]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_returnaddress(merchant_id, return_address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{merchantId}/returnaddress', options)
command.request_representation = Google::Apis::ContentV2_1::ReturnAddress::Representation
command.request_object = return_address_object
command.response_representation = Google::Apis::ContentV2_1::ReturnAddress::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnAddress
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the return addresses of the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to list return addresses for.
# @param [String] country
# List only return addresses applicable to the given country of sale. When
# omitted, all return addresses are listed.
# @param [Fixnum] max_results
# The maximum number of addresses in the response, used for paging.
# @param [String] page_token
# The token returned by the previous request.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnaddressListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnaddressListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_returnaddresses(merchant_id, country: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{merchantId}/returnaddress', options)
command.response_representation = Google::Apis::ContentV2_1::ReturnaddressListResponse::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnaddressListResponse
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.query['country'] = country unless country.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Batches multiple return policy related calls in a single request.
# @param [Google::Apis::ContentV2_1::ReturnpolicyCustomBatchRequest] returnpolicy_custom_batch_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def custombatch_returnpolicy(returnpolicy_custom_batch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'returnpolicy/batch', options)
command.request_representation = Google::Apis::ContentV2_1::ReturnpolicyCustomBatchRequest::Representation
command.request_object = returnpolicy_custom_batch_request_object
command.response_representation = Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponse::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnpolicyCustomBatchResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes a return policy for the given Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account from which to delete the given return policy.
# @param [String] return_policy_id
# Return policy ID generated by Google.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_returnpolicy(merchant_id, return_policy_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{merchantId}/returnpolicy/{returnPolicyId}', options)
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.params['returnPolicyId'] = return_policy_id unless return_policy_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets a return policy of the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to get a return policy for.
# @param [String] return_policy_id
# Return policy ID generated by Google.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnPolicy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_returnpolicy(merchant_id, return_policy_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{merchantId}/returnpolicy/{returnPolicyId}', options)
command.response_representation = Google::Apis::ContentV2_1::ReturnPolicy::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnPolicy
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.params['returnPolicyId'] = return_policy_id unless return_policy_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Inserts a return policy for the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to insert a return policy for.
# @param [Google::Apis::ContentV2_1::ReturnPolicy] return_policy_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnPolicy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_returnpolicy(merchant_id, return_policy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{merchantId}/returnpolicy', options)
command.request_representation = Google::Apis::ContentV2_1::ReturnPolicy::Representation
command.request_object = return_policy_object
command.response_representation = Google::Apis::ContentV2_1::ReturnPolicy::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnPolicy
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the return policies of the Merchant Center account.
# @param [Fixnum] merchant_id
# The Merchant Center account to list return policies for.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2_1::ReturnpolicyListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2_1::ReturnpolicyListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_returnpolicies(merchant_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{merchantId}/returnpolicy', options)
command.response_representation = Google::Apis::ContentV2_1::ReturnpolicyListResponse::Representation
command.response_class = Google::Apis::ContentV2_1::ReturnpolicyListResponse
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves and updates the shipping settings of multiple accounts in a single # Retrieves and updates the shipping settings of multiple accounts in a single
# request. # request.
# @param [Google::Apis::ContentV2_1::ShippingsettingsCustomBatchRequest] shippingsettings_custom_batch_request_object # @param [Google::Apis::ContentV2_1::ShippingsettingsCustomBatchRequest] shippingsettings_custom_batch_request_object

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/ml/ # @see https://cloud.google.com/ml/
module MlV1 module MlV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20190801' REVISION = '20190808'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -1216,6 +1216,41 @@ module Google
end end
end end
# Configurations for logging request-response pairs. Currently only BigQuery
# logging is supported. The request and response will be converted to raw
# string and stored within the specified BigQuery table. The schema is:
# model: STRING
# version: STRING
# time: Timestamp
# raw_data: STRING
# raw_prediction: STRING
# ground_truth: STRING
class GoogleCloudMlV1RequestLoggingConfig
include Google::Apis::Core::Hashable
# Fully qualified BigQuery table name in the format of
# "[project_id].[dataset_name].[table_name]".
# Corresponds to the JSON property `bigqueryTableName`
# @return [String]
attr_accessor :bigquery_table_name
# Percentage of the request being logged. The sampling window is the lifetime
# of the Version. Defaults to 0.
# Corresponds to the JSON property `samplingPercentage`
# @return [Float]
attr_accessor :sampling_percentage
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bigquery_table_name = args[:bigquery_table_name] if args.key?(:bigquery_table_name)
@sampling_percentage = args[:sampling_percentage] if args.key?(:sampling_percentage)
end
end
# Request message for the SetDefaultVersion request. # Request message for the SetDefaultVersion request.
class GoogleCloudMlV1SetDefaultVersionRequest class GoogleCloudMlV1SetDefaultVersionRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -1760,6 +1795,19 @@ module Google
# @return [String] # @return [String]
attr_accessor :python_version attr_accessor :python_version
# Configurations for logging request-response pairs. Currently only BigQuery
# logging is supported. The request and response will be converted to raw
# string and stored within the specified BigQuery table. The schema is:
# model: STRING
# version: STRING
# time: Timestamp
# raw_data: STRING
# raw_prediction: STRING
# ground_truth: STRING
# Corresponds to the JSON property `requestLoggingConfig`
# @return [Google::Apis::MlV1::GoogleCloudMlV1RequestLoggingConfig]
attr_accessor :request_logging_config
# Optional. The AI Platform runtime version to use for this deployment. # Optional. The AI Platform runtime version to use for this deployment.
# If not set, AI Platform uses the default stable version, 1.0. For more # If not set, AI Platform uses the default stable version, 1.0. For more
# information, see the # information, see the
@ -1801,6 +1849,7 @@ module Google
@package_uris = args[:package_uris] if args.key?(:package_uris) @package_uris = args[:package_uris] if args.key?(:package_uris)
@prediction_class = args[:prediction_class] if args.key?(:prediction_class) @prediction_class = args[:prediction_class] if args.key?(:prediction_class)
@python_version = args[:python_version] if args.key?(:python_version) @python_version = args[:python_version] if args.key?(:python_version)
@request_logging_config = args[:request_logging_config] if args.key?(:request_logging_config)
@runtime_version = args[:runtime_version] if args.key?(:runtime_version) @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
@service_account = args[:service_account] if args.key?(:service_account) @service_account = args[:service_account] if args.key?(:service_account)
@state = args[:state] if args.key?(:state) @state = args[:state] if args.key?(:state)

View File

@ -172,6 +172,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class GoogleCloudMlV1RequestLoggingConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudMlV1SetDefaultVersionRequest class GoogleCloudMlV1SetDefaultVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -539,6 +545,14 @@ module Google
end end
end end
class GoogleCloudMlV1RequestLoggingConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bigquery_table_name, as: 'bigqueryTableName'
property :sampling_percentage, as: 'samplingPercentage'
end
end
class GoogleCloudMlV1SetDefaultVersionRequest class GoogleCloudMlV1SetDefaultVersionRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -609,6 +623,8 @@ module Google
collection :package_uris, as: 'packageUris' collection :package_uris, as: 'packageUris'
property :prediction_class, as: 'predictionClass' property :prediction_class, as: 'predictionClass'
property :python_version, as: 'pythonVersion' property :python_version, as: 'pythonVersion'
property :request_logging_config, as: 'requestLoggingConfig', class: Google::Apis::MlV1::GoogleCloudMlV1RequestLoggingConfig, decorator: Google::Apis::MlV1::GoogleCloudMlV1RequestLoggingConfig::Representation
property :runtime_version, as: 'runtimeVersion' property :runtime_version, as: 'runtimeVersion'
property :service_account, as: 'serviceAccount' property :service_account, as: 'serviceAccount'
property :state, as: 'state' property :state, as: 'state'

View File

@ -1,35 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/run_v1beta1/service.rb'
require 'google/apis/run_v1beta1/classes.rb'
require 'google/apis/run_v1beta1/representations.rb'
module Google
module Apis
# Cloud Run API
#
# Deploy and manage user provided container images that scale automatically
# based on HTTP traffic.
#
# @see https://cloud.google.com/run/
module RunV1beta1
VERSION = 'V1beta1'
REVISION = '20190701'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -1,98 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module RunV1beta1
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
# A list of locations that matches the specified filter in the request.
# Corresponds to the JSON property `locations`
# @return [Array<Google::Apis::RunV1beta1::Location>]
attr_accessor :locations
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@locations = args[:locations] if args.key?(:locations)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A resource that represents Google Cloud Platform location.
class Location
include Google::Apis::Core::Hashable
# The friendly name for this location, typically a nearby city name.
# For example, "Tokyo".
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Cross-service attributes for the location. For example
# `"cloud.googleapis.com/region": "us-east1"`
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The canonical id for this location. For example: `"us-east1"`.
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Service-specific metadata. For example the available capacity at the given
# location.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# Resource name for the location, which may vary between implementations.
# For example: `"projects/example-project/locations/us-east1"`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@labels = args[:labels] if args.key?(:labels)
@location_id = args[:location_id] if args.key?(:location_id)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
end
end
end
end
end

View File

@ -1,58 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module RunV1beta1
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locations, as: 'locations', class: Google::Apis::RunV1beta1::Location, decorator: Google::Apis::RunV1beta1::Location::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Location
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
hash :labels, as: 'labels'
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
property :name, as: 'name'
end
end
end
end
end

View File

@ -1,99 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module RunV1beta1
# Cloud Run API
#
# Deploy and manage user provided container images that scale automatically
# based on HTTP traffic.
#
# @example
# require 'google/apis/run_v1beta1'
#
# Run = Google::Apis::RunV1beta1 # Alias the module
# service = Run::CloudRunService.new
#
# @see https://cloud.google.com/run/
class CloudRunService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://run.googleapis.com/', '')
@batch_path = 'batch'
end
# Lists information about the supported locations for this service.
# @param [String] name
# The resource that owns the locations collection, if applicable.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::RunV1beta1::ListLocationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::RunV1beta1::ListLocationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
command.response_representation = Google::Apis::RunV1beta1::ListLocationsResponse::Representation
command.response_class = Google::Apis::RunV1beta1::ListLocationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/translate/docs/quickstarts # @see https://cloud.google.com/translate/docs/quickstarts
module TranslateV3beta1 module TranslateV3beta1
VERSION = 'V3beta1' VERSION = 'V3beta1'
REVISION = '20190713' REVISION = '20190810'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -420,6 +420,31 @@ module Google
end end
end end
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
# A list of locations that matches the specified filter in the request.
# Corresponds to the JSON property `locations`
# @return [Array<Google::Apis::TranslateV3beta1::Location>]
attr_accessor :locations
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@locations = args[:locations] if args.key?(:locations)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# The response message for Operations.ListOperations. # The response message for Operations.ListOperations.
class ListOperationsResponse class ListOperationsResponse
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
@ -445,6 +470,53 @@ module Google
end end
end end
# A resource that represents Google Cloud Platform location.
class Location
include Google::Apis::Core::Hashable
# The friendly name for this location, typically a nearby city name.
# For example, "Tokyo".
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Cross-service attributes for the location. For example
# `"cloud.googleapis.com/region": "us-east1"`
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The canonical id for this location. For example: `"us-east1"`.
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Service-specific metadata. For example the available capacity at the given
# location.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# Resource name for the location, which may vary between implementations.
# For example: `"projects/example-project/locations/us-east1"`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@labels = args[:labels] if args.key?(:labels)
@location_id = args[:location_id] if args.key?(:location_id)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
end
end
# This resource represents a long-running operation that is the result of a # This resource represents a long-running operation that is the result of a
# network API call. # network API call.
class Operation class Operation

View File

@ -106,12 +106,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListOperationsResponse class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport include Google::Apis::Core::JsonObjectSupport
end end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end class Representation < Google::Apis::Core::JsonRepresentation; end
@ -295,6 +307,15 @@ module Google
end end
end end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locations, as: 'locations', class: Google::Apis::TranslateV3beta1::Location, decorator: Google::Apis::TranslateV3beta1::Location::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListOperationsResponse class ListOperationsResponse
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
@ -304,6 +325,17 @@ module Google
end end
end end
class Location
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
hash :labels, as: 'labels'
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
property :name, as: 'name'
end
end
class Operation class Operation
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -262,6 +262,36 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Gets information about a location.
# @param [String] name
# Resource name for the location.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::TranslateV3beta1::Location] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TranslateV3beta1::Location]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v3beta1/{+name}', options)
command.response_representation = Google::Apis::TranslateV3beta1::Location::Representation
command.response_class = Google::Apis::TranslateV3beta1::Location
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns a list of supported languages for translation. # Returns a list of supported languages for translation.
# @param [String] parent # @param [String] parent
# Required. Target project or location to make a call. # Required. Target project or location to make a call.
@ -315,6 +345,45 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Lists information about the supported locations for this service.
# @param [String] name
# The resource that owns the locations collection, if applicable.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::TranslateV3beta1::ListLocationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::TranslateV3beta1::ListLocationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v3beta1/{+name}/locations', options)
command.response_representation = Google::Apis::TranslateV3beta1::ListLocationsResponse::Representation
command.response_class = Google::Apis::TranslateV3beta1::ListLocationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Translates input text and returns translated text. # Translates input text and returns translated text.
# @param [String] parent # @param [String] parent
# Required. Target project or location to make a call. # Required. Target project or location to make a call.

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/ # @see https://cloud.google.com/vision/
module VisionV1 module VisionV1
VERSION = 'V1' VERSION = 'V1'
REVISION = '20190718' REVISION = '20190809'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -327,6 +327,18 @@ module Google
class AsyncBatchAnnotateFilesRequest class AsyncBatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual async file annotation requests for this batch. # Individual async file annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1::AsyncAnnotateFileRequest>] # @return [Array<Google::Apis::VisionV1::AsyncAnnotateFileRequest>]
@ -338,6 +350,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -371,6 +384,18 @@ module Google
# @return [Google::Apis::VisionV1::OutputConfig] # @return [Google::Apis::VisionV1::OutputConfig]
attr_accessor :output_config attr_accessor :output_config
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>]
@ -383,6 +408,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@output_config = args[:output_config] if args.key?(:output_config) @output_config = args[:output_config] if args.key?(:output_config)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -410,6 +436,18 @@ module Google
class BatchAnnotateFilesRequest class BatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# The list of file annotation requests. Right now we support only one # The list of file annotation requests. Right now we support only one
# AnnotateFileRequest in BatchAnnotateFilesRequest. # AnnotateFileRequest in BatchAnnotateFilesRequest.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
@ -422,6 +460,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -450,6 +489,18 @@ module Google
class BatchAnnotateImagesRequest class BatchAnnotateImagesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>]
@ -461,6 +512,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -7550,12 +7602,21 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A score representing the aesthetic/technical quality of the image. The
# score is in range [0, 1]. Higher value corresponds to more professional
# looking photos. 0 means the image looks very bad, 1 means the image with
# very high quality.
# Corresponds to the JSON property `qualityScore`
# @return [Float]
attr_accessor :quality_score
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@quality_score = args[:quality_score] if args.key?(:quality_score)
end end
end end
@ -8205,11 +8266,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -8218,6 +8297,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -8225,11 +8310,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -8237,10 +8334,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -10189,11 +10292,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -10202,6 +10323,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -10209,11 +10336,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -10221,10 +10360,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -12007,11 +12152,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -12020,6 +12183,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -12027,11 +12196,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -12039,10 +12220,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end

View File

@ -2086,6 +2086,7 @@ module Google
class AsyncBatchAnnotateFilesRequest class AsyncBatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1::AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1::AsyncAnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1::AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1::AsyncAnnotateFileRequest::Representation
end end
@ -2104,6 +2105,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1::OutputConfig, decorator: Google::Apis::VisionV1::OutputConfig::Representation property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1::OutputConfig, decorator: Google::Apis::VisionV1::OutputConfig::Representation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation
end end
@ -2120,6 +2122,7 @@ module Google
class BatchAnnotateFilesRequest class BatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateFileRequest, decorator: Google::Apis::VisionV1::AnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateFileRequest, decorator: Google::Apis::VisionV1::AnnotateFileRequest::Representation
end end
@ -2136,6 +2139,7 @@ module Google
class BatchAnnotateImagesRequest class BatchAnnotateImagesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation
end end
@ -4055,6 +4059,7 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :quality_score, as: 'qualityScore'
end end
end end
@ -4242,10 +4247,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -4795,10 +4806,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -5316,10 +5333,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end

View File

@ -371,6 +371,358 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::BatchAnnotateFilesRequest] batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_file(parent, batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1::BatchAnnotateFilesRequest::Representation
command.request_object = batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1::BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1::BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::AsyncBatchAnnotateFilesRequest] async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_file_batch_annotate(parent, async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1::AsyncBatchAnnotateFilesRequest::Representation
command.request_object = async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1::Operation::Representation
command.response_class = Google::Apis::VisionV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_image(parent, batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation
command.request_object = batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::AsyncBatchAnnotateImagesRequest] async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_image_batch_annotate(parent, async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1::AsyncBatchAnnotateImagesRequest::Representation
command.request_object = async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1::Operation::Representation
command.response_class = Google::Apis::VisionV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::BatchAnnotateFilesRequest] batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_file(parent, batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1::BatchAnnotateFilesRequest::Representation
command.request_object = batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1::BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1::BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::AsyncBatchAnnotateFilesRequest] async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_file_batch_annotate(parent, async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1::AsyncBatchAnnotateFilesRequest::Representation
command.request_object = async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1::Operation::Representation
command.response_class = Google::Apis::VisionV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_image(parent, batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation
command.request_object = batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1::AsyncBatchAnnotateImagesRequest] async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_image_batch_annotate(parent, async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1::AsyncBatchAnnotateImagesRequest::Representation
command.request_object = async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1::Operation::Representation
command.response_class = Google::Apis::VisionV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this # Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API # method to poll the operation result at intervals as recommended by the API
# service. # service.

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/ # @see https://cloud.google.com/vision/
module VisionV1p1beta1 module VisionV1p1beta1
VERSION = 'V1p1beta1' VERSION = 'V1p1beta1'
REVISION = '20190718' REVISION = '20190809'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -1283,6 +1283,18 @@ module Google
class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual async file annotation requests for this batch. # Individual async file annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest>] # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest>]
@ -1294,6 +1306,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -1327,6 +1340,18 @@ module Google
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig] # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig]
attr_accessor :output_config attr_accessor :output_config
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest>]
@ -1339,6 +1364,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@output_config = args[:output_config] if args.key?(:output_config) @output_config = args[:output_config] if args.key?(:output_config)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -1347,6 +1373,18 @@ module Google
class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# The list of file annotation requests. Right now we support only one # The list of file annotation requests. Right now we support only one
# AnnotateFileRequest in BatchAnnotateFilesRequest. # AnnotateFileRequest in BatchAnnotateFilesRequest.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
@ -1359,6 +1397,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -1387,6 +1426,18 @@ module Google
class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest>]
@ -1398,6 +1449,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -7741,12 +7793,21 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A score representing the aesthetic/technical quality of the image. The
# score is in range [0, 1]. Higher value corresponds to more professional
# looking photos. 0 means the image looks very bad, 1 means the image with
# very high quality.
# Corresponds to the JSON property `qualityScore`
# @return [Float]
attr_accessor :quality_score
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@quality_score = args[:quality_score] if args.key?(:quality_score)
end end
end end
@ -8396,11 +8457,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -8409,6 +8488,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -8416,11 +8501,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -8428,10 +8525,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -10380,11 +10483,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -10393,6 +10514,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -10400,11 +10527,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -10412,10 +10551,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -11682,11 +11827,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -11695,6 +11858,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -11702,11 +11871,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -11714,10 +11895,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end

View File

@ -2235,6 +2235,7 @@ module Google
class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest::Representation
end end
@ -2253,6 +2254,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig::Representation property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig::Representation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest::Representation
end end
@ -2261,6 +2263,7 @@ module Google
class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateFileRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateFileRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateFileRequest::Representation
end end
@ -2277,6 +2280,7 @@ module Google
class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest::Representation
end end
@ -4032,6 +4036,7 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :quality_score, as: 'qualityScore'
end end
end end
@ -4219,10 +4224,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -4772,10 +4783,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -5153,10 +5170,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end

View File

@ -185,6 +185,358 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_file(parent, google_cloud_vision_v1p1beta1_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_file_batch_annotate(parent, google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_image(parent, google_cloud_vision_v1p1beta1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_image_batch_annotate(parent, google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_file(parent, google_cloud_vision_v1p1beta1_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_file_batch_annotate(parent, google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_image(parent, google_cloud_vision_v1p1beta1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p1beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_image_batch_annotate(parent, google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p1beta1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)

View File

@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/ # @see https://cloud.google.com/vision/
module VisionV1p2beta1 module VisionV1p2beta1
VERSION = 'V1p2beta1' VERSION = 'V1p2beta1'
REVISION = '20190718' REVISION = '20190809'
# View and manage your data across Google Cloud Platform services # View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -3031,6 +3031,18 @@ module Google
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual async file annotation requests for this batch. # Individual async file annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>] # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
@ -3042,6 +3054,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -3075,6 +3088,18 @@ module Google
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig] # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
attr_accessor :output_config attr_accessor :output_config
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
@ -3087,6 +3112,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@output_config = args[:output_config] if args.key?(:output_config) @output_config = args[:output_config] if args.key?(:output_config)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -3095,6 +3121,18 @@ module Google
class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# The list of file annotation requests. Right now we support only one # The list of file annotation requests. Right now we support only one
# AnnotateFileRequest in BatchAnnotateFilesRequest. # AnnotateFileRequest in BatchAnnotateFilesRequest.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
@ -3107,6 +3145,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -3135,6 +3174,18 @@ module Google
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Individual image annotation requests for this batch. # Individual image annotation requests for this batch.
# Corresponds to the JSON property `requests` # Corresponds to the JSON property `requests`
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>] # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
@ -3146,6 +3197,7 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@parent = args[:parent] if args.key?(:parent)
@requests = args[:requests] if args.key?(:requests) @requests = args[:requests] if args.key?(:requests)
end end
end end
@ -7741,12 +7793,21 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
include Google::Apis::Core::Hashable include Google::Apis::Core::Hashable
# A score representing the aesthetic/technical quality of the image. The
# score is in range [0, 1]. Higher value corresponds to more professional
# looking photos. 0 means the image looks very bad, 1 means the image with
# very high quality.
# Corresponds to the JSON property `qualityScore`
# @return [Float]
attr_accessor :quality_score
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@quality_score = args[:quality_score] if args.key?(:quality_score)
end end
end end
@ -8396,11 +8457,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -8409,6 +8488,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -8416,11 +8501,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -8428,10 +8525,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -10380,11 +10483,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -10393,6 +10514,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -10400,11 +10527,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -10412,10 +10551,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end
@ -11682,11 +11827,29 @@ module Google
# @return [String] # @return [String]
attr_accessor :adult attr_accessor :adult
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `adultConfidence`
# @return [Float]
attr_accessor :adult_confidence
# Likelihood that this is a medical image. # Likelihood that this is a medical image.
# Corresponds to the JSON property `medical` # Corresponds to the JSON property `medical`
# @return [String] # @return [String]
attr_accessor :medical attr_accessor :medical
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `medicalConfidence`
# @return [Float]
attr_accessor :medical_confidence
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `nsfwConfidence`
# @return [Float]
attr_accessor :nsfw_confidence
# Likelihood that the request image contains racy content. Racy content may # Likelihood that the request image contains racy content. Racy content may
# include (but is not limited to) skimpy or sheer clothing, strategically # include (but is not limited to) skimpy or sheer clothing, strategically
# covered nudity, lewd or provocative poses, or close-ups of sensitive # covered nudity, lewd or provocative poses, or close-ups of sensitive
@ -11695,6 +11858,12 @@ module Google
# @return [String] # @return [String]
attr_accessor :racy attr_accessor :racy
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
# confident.
# Corresponds to the JSON property `racyConfidence`
# @return [Float]
attr_accessor :racy_confidence
# Spoof likelihood. The likelihood that an modification # Spoof likelihood. The likelihood that an modification
# was made to the image's canonical version to make it appear # was made to the image's canonical version to make it appear
# funny or offensive. # funny or offensive.
@ -11702,11 +11871,23 @@ module Google
# @return [String] # @return [String]
attr_accessor :spoof attr_accessor :spoof
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `spoofConfidence`
# @return [Float]
attr_accessor :spoof_confidence
# Likelihood that this image contains violent content. # Likelihood that this image contains violent content.
# Corresponds to the JSON property `violence` # Corresponds to the JSON property `violence`
# @return [String] # @return [String]
attr_accessor :violence attr_accessor :violence
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
# very confident.
# Corresponds to the JSON property `violenceConfidence`
# @return [Float]
attr_accessor :violence_confidence
def initialize(**args) def initialize(**args)
update!(**args) update!(**args)
end end
@ -11714,10 +11895,16 @@ module Google
# Update properties of this object # Update properties of this object
def update!(**args) def update!(**args)
@adult = args[:adult] if args.key?(:adult) @adult = args[:adult] if args.key?(:adult)
@adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
@medical = args[:medical] if args.key?(:medical) @medical = args[:medical] if args.key?(:medical)
@medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
@nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
@racy = args[:racy] if args.key?(:racy) @racy = args[:racy] if args.key?(:racy)
@racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
@spoof = args[:spoof] if args.key?(:spoof) @spoof = args[:spoof] if args.key?(:spoof)
@spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
@violence = args[:violence] if args.key?(:violence) @violence = args[:violence] if args.key?(:violence)
@violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
end end
end end

View File

@ -2723,6 +2723,7 @@ module Google
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest::Representation
end end
@ -2741,6 +2742,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest::Representation
end end
@ -2749,6 +2751,7 @@ module Google
class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest::Representation
end end
@ -2765,6 +2768,7 @@ module Google
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :parent, as: 'parent'
collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest::Representation collection :requests, as: 'requests', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest::Representation
end end
@ -4032,6 +4036,7 @@ module Google
class GoogleCloudVisionV1p4beta1ImageQuality class GoogleCloudVisionV1p4beta1ImageQuality
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :quality_score, as: 'qualityScore'
end end
end end
@ -4219,10 +4224,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -4772,10 +4783,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end
@ -5153,10 +5170,16 @@ module Google
# @private # @private
class Representation < Google::Apis::Core::JsonRepresentation class Representation < Google::Apis::Core::JsonRepresentation
property :adult, as: 'adult' property :adult, as: 'adult'
property :adult_confidence, as: 'adultConfidence'
property :medical, as: 'medical' property :medical, as: 'medical'
property :medical_confidence, as: 'medicalConfidence'
property :nsfw_confidence, as: 'nsfwConfidence'
property :racy, as: 'racy' property :racy, as: 'racy'
property :racy_confidence, as: 'racyConfidence'
property :spoof, as: 'spoof' property :spoof, as: 'spoof'
property :spoof_confidence, as: 'spoofConfidence'
property :violence, as: 'violence' property :violence, as: 'violence'
property :violence_confidence, as: 'violenceConfidence'
end end
end end

View File

@ -185,6 +185,358 @@ module Google
execute_or_queue_command(command, &block) execute_or_queue_command(command, &block)
end end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest] google_cloud_vision_v1p2beta1_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_file(parent, google_cloud_vision_v1p2beta1_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_file_batch_annotate(parent, google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p2beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_image(parent, google_cloud_vision_v1p2beta1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest] google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_image_batch_annotate(parent, google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p2beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Service that performs image detection and annotation for a batch of files.
# Now only "application/pdf", "image/tiff" and "image/gif" are supported.
# This service will extract at most 5 (customers can specify which 5 in
# AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
# file provided and perform detection and annotation for each image
# extracted.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest] google_cloud_vision_v1p2beta1_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_file(parent, google_cloud_vision_v1p2beta1_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/files:annotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse::Representation
command.response_class = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of generic
# files, such as PDF files, which may contain multiple pages and multiple
# images per page. Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_file_batch_annotate(parent, google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/files:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_async_batch_annotate_files_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p2beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run image detection and annotation for a batch of images.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def annotate_project_location_image(parent, google_cloud_vision_v1p2beta1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/images:annotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse::Representation
command.response_class = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Run asynchronous image detection and annotation for a list of images.
# Progress and results can be retrieved through the
# `google.longrunning.Operations` interface.
# `Operation.metadata` contains `OperationMetadata` (metadata).
# `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
# This service will write image annotation outputs to json files in customer
# GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
# @param [String] parent
# Optional. Target project and location to make a call.
# Format: `projects/`project-id`/locations/`location-id``.
# If no parent is specified, a region will be chosen automatically.
# Supported location-ids:
# `us`: USA country only,
# `asia`: East asia areas, like Japan, Taiwan,
# `eu`: The European Union.
# Example: `projects/project-A/locations/eu`.
# @param [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest] google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VisionV1p2beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VisionV1p2beta1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def async_project_location_image_batch_annotate(parent, google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1p2beta1/{+parent}/images:asyncBatchAnnotate', options)
command.request_representation = Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest::Representation
command.request_object = google_cloud_vision_v1p2beta1_async_batch_annotate_images_request_object
command.response_representation = Google::Apis::VisionV1p2beta1::Operation::Representation
command.response_class = Google::Apis::VisionV1p2beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected protected
def apply_command_defaults(command) def apply_command_defaults(command)