Class TitleExample.Builder (0.2.0)

public static final class TitleExample.Builder extends GeneratedMessageV3.Builder<TitleExample.Builder> implements TitleExampleOrBuilder

A hand-crafted example of a product title improvement. These examples are provided to the AI to improve its quality and guide it towards required outputs.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TitleExample build()
Returns
Type Description
TitleExample

buildPartial()

public TitleExample buildPartial()
Returns
Type Description
TitleExample

clear()

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

clearCategory()

public TitleExample.Builder clearCategory()

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TitleExample.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFinalProductInfo()

public TitleExample.Builder clearFinalProductInfo()
Returns
Type Description
TitleExample.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProductInfo()

public TitleExample.Builder clearProductInfo()
Returns
Type Description
TitleExample.Builder

clearTitleFormat()

public TitleExample.Builder clearTitleFormat()

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TitleExample.Builder

This builder for chaining.

clone()

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

containsFinalProductInfo(String key)

public boolean containsFinalProductInfo(String key)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Parameter
Name Description
key String
Returns
Type Description
boolean

containsProductInfo(String key)

public boolean containsProductInfo(String key)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Parameter
Name Description
key String
Returns
Type Description
boolean

getCategory()

public String getCategory()

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The category.

getCategoryBytes()

public ByteString getCategoryBytes()

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for category.

getDefaultInstanceForType()

public TitleExample getDefaultInstanceForType()
Returns
Type Description
TitleExample

getDescriptorForType()

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

getFinalProductInfo() (deprecated)

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

getFinalProductInfoCount()

public int getFinalProductInfoCount()

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Returns
Type Description
int

getFinalProductInfoMap()

public Map<String,String> getFinalProductInfoMap()

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Returns
Type Description
Map<String,String>

getFinalProductInfoOrDefault(String key, String defaultValue)

public String getFinalProductInfoOrDefault(String key, String defaultValue)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getFinalProductInfoOrThrow(String key)

public String getFinalProductInfoOrThrow(String key)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Parameter
Name Description
key String
Returns
Type Description
String

getMutableFinalProductInfo() (deprecated)

public Map<String,String> getMutableFinalProductInfo()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableProductInfo() (deprecated)

public Map<String,String> getMutableProductInfo()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getProductInfo() (deprecated)

public Map<String,String> getProductInfo()

Use #getProductInfoMap() instead.

Returns
Type Description
Map<String,String>

getProductInfoCount()

public int getProductInfoCount()

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Returns
Type Description
int

getProductInfoMap()

public Map<String,String> getProductInfoMap()

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Returns
Type Description
Map<String,String>

getProductInfoOrDefault(String key, String defaultValue)

public String getProductInfoOrDefault(String key, String defaultValue)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getProductInfoOrThrow(String key)

public String getProductInfoOrThrow(String key)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Parameter
Name Description
key String
Returns
Type Description
String

getTitleFormat()

public String getTitleFormat()

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The titleFormat.

getTitleFormatBytes()

public ByteString getTitleFormatBytes()

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for titleFormat.

hasCategory()

public boolean hasCategory()

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the category field is set.

hasTitleFormat()

public boolean hasTitleFormat()

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the titleFormat 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 TitleExample.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TitleExample.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(TitleExample other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllFinalProductInfo(Map<String,String> values)

public TitleExample.Builder putAllFinalProductInfo(Map<String,String> values)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

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

putAllProductInfo(Map<String,String> values)

public TitleExample.Builder putAllProductInfo(Map<String,String> values)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

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

putFinalProductInfo(String key, String value)

public TitleExample.Builder putFinalProductInfo(String key, String value)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

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

putProductInfo(String key, String value)

public TitleExample.Builder putProductInfo(String key, String value)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

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

removeFinalProductInfo(String key)

public TitleExample.Builder removeFinalProductInfo(String key)

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

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

Parameter
Name Description
key String
Returns
Type Description
TitleExample.Builder

removeProductInfo(String key)

public TitleExample.Builder removeProductInfo(String key)

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

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

Parameter
Name Description
key String
Returns
Type Description
TitleExample.Builder

setCategory(String value)

public TitleExample.Builder setCategory(String value)

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The category to set.

Returns
Type Description
TitleExample.Builder

This builder for chaining.

setCategoryBytes(ByteString value)

public TitleExample.Builder setCategoryBytes(ByteString value)

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

optional string category = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for category to set.

Returns
Type Description
TitleExample.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTitleFormat(String value)

public TitleExample.Builder setTitleFormat(String value)

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The titleFormat to set.

Returns
Type Description
TitleExample.Builder

This builder for chaining.

setTitleFormatBytes(ByteString value)

public TitleExample.Builder setTitleFormatBytes(ByteString value)

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

optional string title_format = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for titleFormat to set.

Returns
Type Description
TitleExample.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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