Class ProductInfo.Builder (0.2.0)

public static final class ProductInfo.Builder extends GeneratedMessageV3.Builder<ProductInfo.Builder> implements ProductInfoOrBuilder

Available information about the product. Used to inform the genAI models.

Protobuf type google.shopping.merchant.productstudio.v1alpha.ProductInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductInfo.Builder
Overrides

build()

public ProductInfo build()
Returns
Type Description
ProductInfo

buildPartial()

public ProductInfo buildPartial()
Returns
Type Description
ProductInfo

clear()

public ProductInfo.Builder clear()
Returns
Type Description
ProductInfo.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ProductInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ProductInfo.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ProductInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ProductInfo.Builder
Overrides

clearProductAttributes()

public ProductInfo.Builder clearProductAttributes()
Returns
Type Description
ProductInfo.Builder

clearProductImage()

public ProductInfo.Builder clearProductImage()

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProductInfo.Builder

clone()

public ProductInfo.Builder clone()
Returns
Type Description
ProductInfo.Builder
Overrides

containsProductAttributes(String key)

public boolean containsProductAttributes(String key)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public ProductInfo getDefaultInstanceForType()
Returns
Type Description
ProductInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableProductAttributes() (deprecated)

public Map<String,String> getMutableProductAttributes()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getProductAttributes() (deprecated)

public Map<String,String> getProductAttributes()
Returns
Type Description
Map<String,String>

getProductAttributesCount()

public int getProductAttributesCount()

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getProductAttributesMap()

public Map<String,String> getProductAttributesMap()

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Map<String,String>

getProductAttributesOrDefault(String key, String defaultValue)

public String getProductAttributesOrDefault(String key, String defaultValue)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getProductAttributesOrThrow(String key)

public String getProductAttributesOrThrow(String key)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
String

getProductImage()

public Image getProductImage()

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Image

The productImage.

getProductImageBuilder()

public Image.Builder getProductImageBuilder()

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Image.Builder

getProductImageOrBuilder()

public ImageOrBuilder getProductImageOrBuilder()

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ImageOrBuilder

hasProductImage()

public boolean hasProductImage()

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the productImage field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProductInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ProductInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ProductInfo.Builder
Overrides

mergeFrom(ProductInfo other)

public ProductInfo.Builder mergeFrom(ProductInfo other)
Parameter
Name Description
other ProductInfo
Returns
Type Description
ProductInfo.Builder

mergeProductImage(Image value)

public ProductInfo.Builder mergeProductImage(Image value)

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Image
Returns
Type Description
ProductInfo.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProductInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductInfo.Builder
Overrides

putAllProductAttributes(Map<String,String> values)

public ProductInfo.Builder putAllProductAttributes(Map<String,String> values)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
ProductInfo.Builder

putProductAttributes(String key, String value)

public ProductInfo.Builder putProductAttributes(String key, String value)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
key String
value String
Returns
Type Description
ProductInfo.Builder

removeProductAttributes(String key)

public ProductInfo.Builder removeProductAttributes(String key)

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

map<string, string> product_attributes = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
ProductInfo.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ProductInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductInfo.Builder
Overrides

setProductImage(Image value)

public ProductInfo.Builder setProductImage(Image value)

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Image
Returns
Type Description
ProductInfo.Builder

setProductImage(Image.Builder builderForValue)

public ProductInfo.Builder setProductImage(Image.Builder builderForValue)

Optional. Image associated with the product.

optional .google.shopping.merchant.productstudio.v1alpha.Image product_image = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Image.Builder
Returns
Type Description
ProductInfo.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ProductInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ProductInfo.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ProductInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductInfo.Builder
Overrides