From a953ec560706902083a40ae653763872cafcda98 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 14 Aug 2019 00:38:24 +0000 Subject: [PATCH] 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 --- .../google/apis/adexperiencereport_v1.rb | 2 +- generated/google/apis/analytics_v3.rb | 2 +- generated/google/apis/analytics_v3/classes.rb | 6 + .../apis/analytics_v3/representations.rb | 1 + generated/google/apis/cloudasset_v1.rb | 2 +- .../google/apis/cloudasset_v1/classes.rb | 9 - .../apis/cloudasset_v1/representations.rb | 1 - generated/google/apis/cloudasset_v1beta1.rb | 2 +- .../google/apis/cloudasset_v1beta1/classes.rb | 9 - .../cloudasset_v1beta1/representations.rb | 1 - generated/google/apis/cloudiot_v1.rb | 2 +- generated/google/apis/cloudiot_v1/classes.rb | 2 +- generated/google/apis/content_v2_1.rb | 2 +- generated/google/apis/content_v2_1/classes.rb | 563 ++++++++++++++++++ .../apis/content_v2_1/representations.rb | 253 ++++++++ generated/google/apis/content_v2_1/service.rb | 354 +++++++++++ generated/google/apis/ml_v1.rb | 2 +- generated/google/apis/ml_v1/classes.rb | 49 ++ .../google/apis/ml_v1/representations.rb | 16 + generated/google/apis/run_v1beta1.rb | 35 -- generated/google/apis/run_v1beta1/classes.rb | 98 --- .../apis/run_v1beta1/representations.rb | 58 -- generated/google/apis/run_v1beta1/service.rb | 99 --- generated/google/apis/translate_v3beta1.rb | 2 +- .../google/apis/translate_v3beta1/classes.rb | 72 +++ .../apis/translate_v3beta1/representations.rb | 32 + .../google/apis/translate_v3beta1/service.rb | 69 +++ generated/google/apis/vision_v1.rb | 2 +- generated/google/apis/vision_v1/classes.rb | 187 ++++++ .../google/apis/vision_v1/representations.rb | 23 + generated/google/apis/vision_v1/service.rb | 352 +++++++++++ generated/google/apis/vision_v1p1beta1.rb | 2 +- .../google/apis/vision_v1p1beta1/classes.rb | 187 ++++++ .../apis/vision_v1p1beta1/representations.rb | 23 + .../google/apis/vision_v1p1beta1/service.rb | 352 +++++++++++ generated/google/apis/vision_v1p2beta1.rb | 2 +- .../google/apis/vision_v1p2beta1/classes.rb | 187 ++++++ .../apis/vision_v1p2beta1/representations.rb | 23 + .../google/apis/vision_v1p2beta1/service.rb | 352 +++++++++++ 39 files changed, 3113 insertions(+), 322 deletions(-) delete mode 100644 generated/google/apis/run_v1beta1.rb delete mode 100644 generated/google/apis/run_v1beta1/classes.rb delete mode 100644 generated/google/apis/run_v1beta1/representations.rb delete mode 100644 generated/google/apis/run_v1beta1/service.rb diff --git a/generated/google/apis/adexperiencereport_v1.rb b/generated/google/apis/adexperiencereport_v1.rb index 5f37a34c5..59a02168f 100644 --- a/generated/google/apis/adexperiencereport_v1.rb +++ b/generated/google/apis/adexperiencereport_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/ad-experience-report/ module AdexperiencereportV1 VERSION = 'V1' - REVISION = '20190729' + REVISION = '20190812' # Test scope for access to the Zoo service AUTH_XAPI_ZOO = 'https://www.googleapis.com/auth/xapi.zoo' diff --git a/generated/google/apis/analytics_v3.rb b/generated/google/apis/analytics_v3.rb index cb3870742..602f1edd3 100644 --- a/generated/google/apis/analytics_v3.rb +++ b/generated/google/apis/analytics_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/analytics/ module AnalyticsV3 VERSION = 'V3' - REVISION = '20190604' + REVISION = '20190807' # View and manage your Google Analytics data AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics' diff --git a/generated/google/apis/analytics_v3/classes.rb b/generated/google/apis/analytics_v3/classes.rb index d9c8c2be9..c60cc2144 100644 --- a/generated/google/apis/analytics_v3/classes.rb +++ b/generated/google/apis/analytics_v3/classes.rb @@ -5325,6 +5325,11 @@ module Google # @return [String] 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. # Corresponds to the JSON property `webPropertyId` # @return [String] @@ -5340,6 +5345,7 @@ module Google @firebase_project_id = args[:firebase_project_id] if args.key?(:firebase_project_id) @id = args[:id] if args.key?(:id) @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) end diff --git a/generated/google/apis/analytics_v3/representations.rb b/generated/google/apis/analytics_v3/representations.rb index cbaf4e071..abff0b8a4 100644 --- a/generated/google/apis/analytics_v3/representations.rb +++ b/generated/google/apis/analytics_v3/representations.rb @@ -1978,6 +1978,7 @@ module Google property :id, as: 'id', class: Google::Apis::AnalyticsV3::UserDeletionRequest::Id, decorator: Google::Apis::AnalyticsV3::UserDeletionRequest::Id::Representation property :kind, as: 'kind' + property :property_id, as: 'propertyId' property :web_property_id, as: 'webPropertyId' end diff --git a/generated/google/apis/cloudasset_v1.rb b/generated/google/apis/cloudasset_v1.rb index d5ab88e04..5a89c1612 100644 --- a/generated/google/apis/cloudasset_v1.rb +++ b/generated/google/apis/cloudasset_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory module CloudassetV1 VERSION = 'V1' - REVISION = '20190722' + REVISION = '20190812' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudasset_v1/classes.rb b/generated/google/apis/cloudasset_v1/classes.rb index 63059a342..6bd8e82da 100644 --- a/generated/google/apis/cloudasset_v1/classes.rb +++ b/generated/google/apis/cloudasset_v1/classes.rb @@ -240,14 +240,6 @@ module Google # @return [Array] 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. # Corresponds to the JSON property `logType` # @return [String] @@ -260,7 +252,6 @@ module Google # Update properties of this object def update!(**args) @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) end end diff --git a/generated/google/apis/cloudasset_v1/representations.rb b/generated/google/apis/cloudasset_v1/representations.rb index 2027ec375..03ae4b067 100644 --- a/generated/google/apis/cloudasset_v1/representations.rb +++ b/generated/google/apis/cloudasset_v1/representations.rb @@ -217,7 +217,6 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation collection :exempted_members, as: 'exemptedMembers' - property :ignore_child_exemptions, as: 'ignoreChildExemptions' property :log_type, as: 'logType' end end diff --git a/generated/google/apis/cloudasset_v1beta1.rb b/generated/google/apis/cloudasset_v1beta1.rb index c24962ddb..953528abf 100644 --- a/generated/google/apis/cloudasset_v1beta1.rb +++ b/generated/google/apis/cloudasset_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory module CloudassetV1beta1 VERSION = 'V1beta1' - REVISION = '20190709' + REVISION = '20190812' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudasset_v1beta1/classes.rb b/generated/google/apis/cloudasset_v1beta1/classes.rb index 081af95c6..cb271cb46 100644 --- a/generated/google/apis/cloudasset_v1beta1/classes.rb +++ b/generated/google/apis/cloudasset_v1beta1/classes.rb @@ -201,14 +201,6 @@ module Google # @return [Array] 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. # Corresponds to the JSON property `logType` # @return [String] @@ -221,7 +213,6 @@ module Google # Update properties of this object def update!(**args) @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) end end diff --git a/generated/google/apis/cloudasset_v1beta1/representations.rb b/generated/google/apis/cloudasset_v1beta1/representations.rb index c3722ecc7..4703cecc1 100644 --- a/generated/google/apis/cloudasset_v1beta1/representations.rb +++ b/generated/google/apis/cloudasset_v1beta1/representations.rb @@ -137,7 +137,6 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation collection :exempted_members, as: 'exemptedMembers' - property :ignore_child_exemptions, as: 'ignoreChildExemptions' property :log_type, as: 'logType' end end diff --git a/generated/google/apis/cloudiot_v1.rb b/generated/google/apis/cloudiot_v1.rb index 1c0af0a9c..f3dd3fbcd 100644 --- a/generated/google/apis/cloudiot_v1.rb +++ b/generated/google/apis/cloudiot_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/iot module CloudiotV1 VERSION = 'V1' - REVISION = '20190709' + REVISION = '20190805' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudiot_v1/classes.rb b/generated/google/apis/cloudiot_v1/classes.rb index a840ac621..9f57757d5 100644 --- a/generated/google/apis/cloudiot_v1/classes.rb +++ b/generated/google/apis/cloudiot_v1/classes.rb @@ -611,7 +611,7 @@ module Google include Google::Apis::Core::Hashable # 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 # returned. # Corresponds to the JSON property `requestedPolicyVersion` diff --git a/generated/google/apis/content_v2_1.rb b/generated/google/apis/content_v2_1.rb index 285ed8fb9..f466a82e6 100644 --- a/generated/google/apis/content_v2_1.rb +++ b/generated/google/apis/content_v2_1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/shopping-content module ContentV2_1 VERSION = 'V2_1' - REVISION = '20190805' + REVISION = '20190809' # Manage your product listings and accounts for Google Shopping AUTH_CONTENT = 'https://www.googleapis.com/auth/content' diff --git a/generated/google/apis/content_v2_1/classes.rb b/generated/google/apis/content_v2_1/classes.rb index c008b4ad2..a43bea93a 100644 --- a/generated/google/apis/content_v2_1/classes.rb +++ b/generated/google/apis/content_v2_1/classes.rb @@ -3858,6 +3858,11 @@ module Google # @return [Fixnum] 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. # Corresponds to the JSON property `returnInfo` # @return [Google::Apis::ContentV2_1::OrderLineItemReturnInfo] @@ -3897,6 +3902,7 @@ module Google @quantity_pending = args[:quantity_pending] if args.key?(:quantity_pending) @quantity_returned = args[:quantity_returned] if args.key?(:quantity_returned) @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) @returns = args[:returns] if args.key?(:returns) @shipping_details = args[:shipping_details] if args.key?(:shipping_details) @@ -8284,6 +8290,253 @@ module Google 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] + 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] + 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] + 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 include Google::Apis::Core::Hashable @@ -8339,6 +8592,316 @@ module Google 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] + 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] + 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] + 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] + 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] + 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] + 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 include Google::Apis::Core::Hashable diff --git a/generated/google/apis/content_v2_1/representations.rb b/generated/google/apis/content_v2_1/representations.rb index ae09fade1..0e2cade70 100644 --- a/generated/google/apis/content_v2_1/representations.rb +++ b/generated/google/apis/content_v2_1/representations.rb @@ -1252,12 +1252,102 @@ module Google include Google::Apis::Core::JsonObjectSupport 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 Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport 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 Representation < Google::Apis::Core::JsonRepresentation; end @@ -2504,6 +2594,7 @@ module Google property :quantity_pending, as: 'quantityPending' property :quantity_returned, as: 'quantityReturned' 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 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 + 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 # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3723,6 +3875,107 @@ module Google 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 # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/content_v2_1/service.rb b/generated/google/apis/content_v2_1/service.rb index 86090a93c..3ab15429c 100644 --- a/generated/google/apis/content_v2_1/service.rb +++ b/generated/google/apis/content_v2_1/service.rb @@ -3159,6 +3159,360 @@ module Google execute_or_queue_command(command, &block) 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 # request. # @param [Google::Apis::ContentV2_1::ShippingsettingsCustomBatchRequest] shippingsettings_custom_batch_request_object diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index be0d02f35..4110125d8 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20190801' + REVISION = '20190808' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/ml_v1/classes.rb b/generated/google/apis/ml_v1/classes.rb index c1d8120e5..618bb9211 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -1216,6 +1216,41 @@ module Google 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. class GoogleCloudMlV1SetDefaultVersionRequest include Google::Apis::Core::Hashable @@ -1760,6 +1795,19 @@ module Google # @return [String] 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. # If not set, AI Platform uses the default stable version, 1.0. For more # information, see the @@ -1801,6 +1849,7 @@ module Google @package_uris = args[:package_uris] if args.key?(:package_uris) @prediction_class = args[:prediction_class] if args.key?(:prediction_class) @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) @service_account = args[:service_account] if args.key?(:service_account) @state = args[:state] if args.key?(:state) diff --git a/generated/google/apis/ml_v1/representations.rb b/generated/google/apis/ml_v1/representations.rb index 3b35669a1..b1a13ad6d 100644 --- a/generated/google/apis/ml_v1/representations.rb +++ b/generated/google/apis/ml_v1/representations.rb @@ -172,6 +172,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudMlV1RequestLoggingConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudMlV1SetDefaultVersionRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -539,6 +545,14 @@ module Google 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 # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -609,6 +623,8 @@ module Google collection :package_uris, as: 'packageUris' property :prediction_class, as: 'predictionClass' 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 :service_account, as: 'serviceAccount' property :state, as: 'state' diff --git a/generated/google/apis/run_v1beta1.rb b/generated/google/apis/run_v1beta1.rb deleted file mode 100644 index b34b4af6d..000000000 --- a/generated/google/apis/run_v1beta1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/run_v1beta1/classes.rb b/generated/google/apis/run_v1beta1/classes.rb deleted file mode 100644 index 75d4280b6..000000000 --- a/generated/google/apis/run_v1beta1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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 diff --git a/generated/google/apis/run_v1beta1/representations.rb b/generated/google/apis/run_v1beta1/representations.rb deleted file mode 100644 index 7ddd720be..000000000 --- a/generated/google/apis/run_v1beta1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/run_v1beta1/service.rb b/generated/google/apis/run_v1beta1/service.rb deleted file mode 100644 index dd3dbb306..000000000 --- a/generated/google/apis/run_v1beta1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/translate_v3beta1.rb b/generated/google/apis/translate_v3beta1.rb index 1eb475f9d..5778886c5 100644 --- a/generated/google/apis/translate_v3beta1.rb +++ b/generated/google/apis/translate_v3beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/translate/docs/quickstarts module TranslateV3beta1 VERSION = 'V3beta1' - REVISION = '20190713' + REVISION = '20190810' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/translate_v3beta1/classes.rb b/generated/google/apis/translate_v3beta1/classes.rb index 0025bb6b9..3653ce58f 100644 --- a/generated/google/apis/translate_v3beta1/classes.rb +++ b/generated/google/apis/translate_v3beta1/classes.rb @@ -420,6 +420,31 @@ module Google 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] + 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. class ListOperationsResponse include Google::Apis::Core::Hashable @@ -445,6 +470,53 @@ module Google 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] + 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] + 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 # network API call. class Operation diff --git a/generated/google/apis/translate_v3beta1/representations.rb b/generated/google/apis/translate_v3beta1/representations.rb index 50e02c87c..e6af99e83 100644 --- a/generated/google/apis/translate_v3beta1/representations.rb +++ b/generated/google/apis/translate_v3beta1/representations.rb @@ -106,12 +106,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListOperationsResponse 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 Operation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -295,6 +307,15 @@ module Google 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 # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -304,6 +325,17 @@ module Google 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 # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/translate_v3beta1/service.rb b/generated/google/apis/translate_v3beta1/service.rb index 777d579e4..d5a9429e6 100644 --- a/generated/google/apis/translate_v3beta1/service.rb +++ b/generated/google/apis/translate_v3beta1/service.rb @@ -262,6 +262,36 @@ module Google execute_or_queue_command(command, &block) 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. # @param [String] parent # Required. Target project or location to make a call. @@ -315,6 +345,45 @@ module Google execute_or_queue_command(command, &block) 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. # @param [String] parent # Required. Target project or location to make a call. diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index d40ed2b8e..e4f0807e5 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20190718' + REVISION = '20190809' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index 54491f406..2b76a2028 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -327,6 +327,18 @@ module Google class AsyncBatchAnnotateFilesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -338,6 +350,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -371,6 +384,18 @@ module Google # @return [Google::Apis::VisionV1::OutputConfig] 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -383,6 +408,7 @@ module Google # Update properties of this object def update!(**args) @output_config = args[:output_config] if args.key?(:output_config) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -410,6 +436,18 @@ module Google class BatchAnnotateFilesRequest 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 # AnnotateFileRequest in BatchAnnotateFilesRequest. # Corresponds to the JSON property `requests` @@ -422,6 +460,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -450,6 +489,18 @@ module Google class BatchAnnotateImagesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -461,6 +512,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -7550,12 +7602,21 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality 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) update!(**args) end # Update properties of this object def update!(**args) + @quality_score = args[:quality_score] if args.key?(:quality_score) end end @@ -8205,11 +8266,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -8218,6 +8297,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -8225,11 +8310,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -8237,10 +8334,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -10189,11 +10292,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -10202,6 +10323,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -10209,11 +10336,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -10221,10 +10360,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -12007,11 +12152,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -12020,6 +12183,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -12027,11 +12196,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -12039,10 +12220,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end diff --git a/generated/google/apis/vision_v1/representations.rb b/generated/google/apis/vision_v1/representations.rb index 3507b948b..72934990b 100644 --- a/generated/google/apis/vision_v1/representations.rb +++ b/generated/google/apis/vision_v1/representations.rb @@ -2086,6 +2086,7 @@ module Google class AsyncBatchAnnotateFilesRequest # @private 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 end @@ -2104,6 +2105,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation 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 end @@ -2120,6 +2122,7 @@ module Google class BatchAnnotateFilesRequest # @private 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 end @@ -2136,6 +2139,7 @@ module Google class BatchAnnotateImagesRequest # @private 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 end @@ -4055,6 +4059,7 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality # @private class Representation < Google::Apis::Core::JsonRepresentation + property :quality_score, as: 'qualityScore' end end @@ -4242,10 +4247,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -4795,10 +4806,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -5316,10 +5333,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end diff --git a/generated/google/apis/vision_v1/service.rb b/generated/google/apis/vision_v1/service.rb index ca6edbcb7..454998d16 100644 --- a/generated/google/apis/vision_v1/service.rb +++ b/generated/google/apis/vision_v1/service.rb @@ -371,6 +371,358 @@ module Google 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_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 # method to poll the operation result at intervals as recommended by the API # service. diff --git a/generated/google/apis/vision_v1p1beta1.rb b/generated/google/apis/vision_v1p1beta1.rb index 427bf351e..52c972590 100644 --- a/generated/google/apis/vision_v1p1beta1.rb +++ b/generated/google/apis/vision_v1p1beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1p1beta1 VERSION = 'V1p1beta1' - REVISION = '20190718' + REVISION = '20190809' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1p1beta1/classes.rb b/generated/google/apis/vision_v1p1beta1/classes.rb index 6a4649d31..d72271867 100644 --- a/generated/google/apis/vision_v1p1beta1/classes.rb +++ b/generated/google/apis/vision_v1p1beta1/classes.rb @@ -1283,6 +1283,18 @@ module Google class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -1294,6 +1306,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -1327,6 +1340,18 @@ module Google # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1OutputConfig] 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -1339,6 +1364,7 @@ module Google # Update properties of this object def update!(**args) @output_config = args[:output_config] if args.key?(:output_config) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -1347,6 +1373,18 @@ module Google class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest 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 # AnnotateFileRequest in BatchAnnotateFilesRequest. # Corresponds to the JSON property `requests` @@ -1359,6 +1397,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -1387,6 +1426,18 @@ module Google class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -1398,6 +1449,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -7741,12 +7793,21 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality 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) update!(**args) end # Update properties of this object def update!(**args) + @quality_score = args[:quality_score] if args.key?(:quality_score) end end @@ -8396,11 +8457,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -8409,6 +8488,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -8416,11 +8501,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -8428,10 +8525,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -10380,11 +10483,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -10393,6 +10514,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -10400,11 +10527,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -10412,10 +10551,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -11682,11 +11827,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -11695,6 +11858,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -11702,11 +11871,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -11714,10 +11895,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end diff --git a/generated/google/apis/vision_v1p1beta1/representations.rb b/generated/google/apis/vision_v1p1beta1/representations.rb index d01408089..155952d0d 100644 --- a/generated/google/apis/vision_v1p1beta1/representations.rb +++ b/generated/google/apis/vision_v1p1beta1/representations.rb @@ -2235,6 +2235,7 @@ module Google class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest # @private 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 end @@ -2253,6 +2254,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation 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 end @@ -2261,6 +2263,7 @@ module Google class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest # @private 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 end @@ -2277,6 +2280,7 @@ module Google class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest # @private 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 end @@ -4032,6 +4036,7 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality # @private class Representation < Google::Apis::Core::JsonRepresentation + property :quality_score, as: 'qualityScore' end end @@ -4219,10 +4224,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -4772,10 +4783,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -5153,10 +5170,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end diff --git a/generated/google/apis/vision_v1p1beta1/service.rb b/generated/google/apis/vision_v1p1beta1/service.rb index 4c09b5998..37ed0bb96 100644 --- a/generated/google/apis/vision_v1p1beta1/service.rb +++ b/generated/google/apis/vision_v1p1beta1/service.rb @@ -184,6 +184,358 @@ module Google 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_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 diff --git a/generated/google/apis/vision_v1p2beta1.rb b/generated/google/apis/vision_v1p2beta1.rb index eee1be2c6..b60d2d55a 100644 --- a/generated/google/apis/vision_v1p2beta1.rb +++ b/generated/google/apis/vision_v1p2beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1p2beta1 VERSION = 'V1p2beta1' - REVISION = '20190718' + REVISION = '20190809' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1p2beta1/classes.rb b/generated/google/apis/vision_v1p2beta1/classes.rb index 58f5c255c..39d85e2f0 100644 --- a/generated/google/apis/vision_v1p2beta1/classes.rb +++ b/generated/google/apis/vision_v1p2beta1/classes.rb @@ -3031,6 +3031,18 @@ module Google class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -3042,6 +3054,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -3075,6 +3088,18 @@ module Google # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig] 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -3087,6 +3112,7 @@ module Google # Update properties of this object def update!(**args) @output_config = args[:output_config] if args.key?(:output_config) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -3095,6 +3121,18 @@ module Google class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest 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 # AnnotateFileRequest in BatchAnnotateFilesRequest. # Corresponds to the JSON property `requests` @@ -3107,6 +3145,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -3135,6 +3174,18 @@ module Google class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest 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. # Corresponds to the JSON property `requests` # @return [Array] @@ -3146,6 +3197,7 @@ module Google # Update properties of this object def update!(**args) + @parent = args[:parent] if args.key?(:parent) @requests = args[:requests] if args.key?(:requests) end end @@ -7741,12 +7793,21 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality 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) update!(**args) end # Update properties of this object def update!(**args) + @quality_score = args[:quality_score] if args.key?(:quality_score) end end @@ -8396,11 +8457,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -8409,6 +8488,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -8416,11 +8501,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -8428,10 +8525,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -10380,11 +10483,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -10393,6 +10514,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -10400,11 +10527,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -10412,10 +10551,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end @@ -11682,11 +11827,29 @@ module Google # @return [String] 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. # Corresponds to the JSON property `medical` # @return [String] 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 # include (but is not limited to) skimpy or sheer clothing, strategically # covered nudity, lewd or provocative poses, or close-ups of sensitive @@ -11695,6 +11858,12 @@ module Google # @return [String] 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 # was made to the image's canonical version to make it appear # funny or offensive. @@ -11702,11 +11871,23 @@ module Google # @return [String] 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. # Corresponds to the JSON property `violence` # @return [String] 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) update!(**args) end @@ -11714,10 +11895,16 @@ module Google # Update properties of this object def update!(**args) @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_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_confidence = args[:racy_confidence] if args.key?(:racy_confidence) @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_confidence = args[:violence_confidence] if args.key?(:violence_confidence) end end diff --git a/generated/google/apis/vision_v1p2beta1/representations.rb b/generated/google/apis/vision_v1p2beta1/representations.rb index b7272e1f6..b08b4554d 100644 --- a/generated/google/apis/vision_v1p2beta1/representations.rb +++ b/generated/google/apis/vision_v1p2beta1/representations.rb @@ -2723,6 +2723,7 @@ module Google class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest # @private 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 end @@ -2741,6 +2742,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation 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 end @@ -2749,6 +2751,7 @@ module Google class GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest # @private 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 end @@ -2765,6 +2768,7 @@ module Google class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest # @private 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 end @@ -4032,6 +4036,7 @@ module Google class GoogleCloudVisionV1p4beta1ImageQuality # @private class Representation < Google::Apis::Core::JsonRepresentation + property :quality_score, as: 'qualityScore' end end @@ -4219,10 +4224,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -4772,10 +4783,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end @@ -5153,10 +5170,16 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :adult, as: 'adult' + property :adult_confidence, as: 'adultConfidence' property :medical, as: 'medical' + property :medical_confidence, as: 'medicalConfidence' + property :nsfw_confidence, as: 'nsfwConfidence' property :racy, as: 'racy' + property :racy_confidence, as: 'racyConfidence' property :spoof, as: 'spoof' + property :spoof_confidence, as: 'spoofConfidence' property :violence, as: 'violence' + property :violence_confidence, as: 'violenceConfidence' end end diff --git a/generated/google/apis/vision_v1p2beta1/service.rb b/generated/google/apis/vision_v1p2beta1/service.rb index 95e08bec3..6b02b6692 100644 --- a/generated/google/apis/vision_v1p2beta1/service.rb +++ b/generated/google/apis/vision_v1p2beta1/service.rb @@ -184,6 +184,358 @@ module Google 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_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