Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImage

Inherits:
Object
  • Object
show all
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 thumbnail/detail image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaImage

Returns a new instance of GoogleCloudRetailV2betaImage.



2104
2105
2106
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2104

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#heightFixnum

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

Returns:

  • (Fixnum)


2087
2088
2089
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2087

def height
  @height
end

#uriString

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

Returns:

  • (String)


2096
2097
2098
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2096

def uri
  @uri
end

#widthFixnum

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

Returns:

  • (Fixnum)


2102
2103
2104
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2102

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2109
2110
2111
2112
2113
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2109

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