public final class Image extends GeneratedMessageV3 implements ImageOrBuilder
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.
Protobuf type google.cloud.retail.v2beta.Image
Static Fields
HEIGHT_FIELD_NUMBER
public static final int HEIGHT_FIELD_NUMBER
Field Value
URI_FIELD_NUMBER
public static final int URI_FIELD_NUMBER
Field Value
WIDTH_FIELD_NUMBER
public static final int WIDTH_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Image getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Image.Builder newBuilder()
Returns
newBuilder(Image prototype)
public static Image.Builder newBuilder(Image prototype)
Parameter
Name | Description |
prototype | Image
|
Returns
public static Image parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Image parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Image parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Image parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Image parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Image parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Image parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Image parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Image parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Image> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public Image getDefaultInstanceForType()
Returns
getHeight()
Height of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is
returned.
int32 height = 2;
Returns
Type | Description |
int | The height.
|
getParserForType()
public Parser<Image> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUri()
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.
string uri = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
getUriBytes()
public ByteString getUriBytes()
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.
string uri = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
getWidth()
Width of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is
returned.
int32 width = 3;
Returns
Type | Description |
int | The width.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Image.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Image.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Image.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions