Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImage
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImage
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2beta/classes.rb,
lib/google/apis/retail_v2beta/representations.rb,
lib/google/apis/retail_v2beta/representations.rb
Overview
Product image. Recommendations AI and Retail Search use product images to improve prediction and search results. Product images can be returned in results, and are shown in prediction or search previews in the console. Please try to provide correct product images and avoid using images with size too small.
Instance Attribute Summary collapse
-
#height ⇒ Fixnum
Height of the image in number of pixels.
-
#uri ⇒ String
Required.
-
#width ⇒ Fixnum
Width of the image in number of pixels.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaImage
constructor
A new instance of GoogleCloudRetailV2betaImage.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaImage
Returns a new instance of GoogleCloudRetailV2betaImage.
4932 4933 4934 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4932 def initialize(**args) update!(**args) end |
Instance Attribute Details
#height ⇒ Fixnum
Height of the image in number of pixels. This field must be nonnegative.
Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property height
4915 4916 4917 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4915 def height @height end |
#uri ⇒ String
Required. URI of the image. This field must be a valid UTF-8 encoded URI with
a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
returned. Google Merchant Center property image_link. Schema.org property Product.image.
Corresponds to the JSON property uri
4924 4925 4926 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4924 def uri @uri end |
#width ⇒ Fixnum
Width of the image in number of pixels. This field must be nonnegative.
Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property width
4930 4931 4932 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4930 def width @width end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4937 4938 4939 4940 4941 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4937 def update!(**args) @height = args[:height] if args.key?(:height) @uri = args[:uri] if args.key?(:uri) @width = args[:width] if args.key?(:width) end |