Class: Google::Apis::RetailV2::GoogleCloudRetailV2Image
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2Image
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb
Overview
Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.
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) ⇒ GoogleCloudRetailV2Image
constructor
A new instance of GoogleCloudRetailV2Image.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2Image
Returns a new instance of GoogleCloudRetailV2Image.
1868 1869 1870 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1868 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
1851 1852 1853 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1851 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
1860 1861 1862 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1860 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
1866 1867 1868 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1866 def width @width end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1873 1874 1875 1876 1877 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1873 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 |