public static final class Audience.Builder extends GeneratedMessageV3.Builder<Audience.Builder> implements AudienceOrBuilderAn intended audience of the Product for whom it's sold.
Protobuf type google.cloud.retail.v2beta.Audience
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Audience.BuilderImplements
AudienceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Type | Description |
| Descriptor |
Methods
addAgeGroups(String value)
public Audience.Builder addAgeGroups(String value)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| value | StringThe ageGroups to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addAgeGroupsBytes(ByteString value)
public Audience.Builder addAgeGroupsBytes(ByteString value)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| value | ByteStringThe bytes of the ageGroups to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addAllAgeGroups(Iterable<String> values)
public Audience.Builder addAllAgeGroups(Iterable<String> values)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| values | Iterable<String>The ageGroups to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addAllGenders(Iterable<String> values)
public Audience.Builder addAllGenders(Iterable<String> values)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| values | Iterable<String>The genders to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addGenders(String value)
public Audience.Builder addGenders(String value)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| value | StringThe genders to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addGendersBytes(ByteString value)
public Audience.Builder addGendersBytes(ByteString value)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| value | ByteStringThe bytes of the genders to add. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Audience.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Name | Description |
| field | FieldDescriptor |
| value | Object |
| Type | Description |
| Audience.Builder |
build()
public Audience build()| Type | Description |
| Audience |
buildPartial()
public Audience buildPartial()| Type | Description |
| Audience |
clear()
public Audience.Builder clear()| Type | Description |
| Audience.Builder |
clearAgeGroups()
public Audience.Builder clearAgeGroups()The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Type | Description |
| Audience.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Audience.Builder clearField(Descriptors.FieldDescriptor field)| Name | Description |
| field | FieldDescriptor |
| Type | Description |
| Audience.Builder |
clearGenders()
public Audience.Builder clearGenders()The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Type | Description |
| Audience.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Audience.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Name | Description |
| oneof | OneofDescriptor |
| Type | Description |
| Audience.Builder |
clone()
public Audience.Builder clone()| Type | Description |
| Audience.Builder |
getAgeGroups(int index)
public String getAgeGroups(int index)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| index | intThe index of the element to return. |
| Type | Description |
| String | The ageGroups at the given index. |
getAgeGroupsBytes(int index)
public ByteString getAgeGroupsBytes(int index)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| index | intThe index of the value to return. |
| Type | Description |
| ByteString | The bytes of the ageGroups at the given index. |
getAgeGroupsCount()
public int getAgeGroupsCount()The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Type | Description |
| int | The count of ageGroups. |
getAgeGroupsList()
public ProtocolStringList getAgeGroupsList()The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Type | Description |
| ProtocolStringList | A list containing the ageGroups. |
getDefaultInstanceForType()
public Audience getDefaultInstanceForType()| Type | Description |
| Audience |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Type | Description |
| Descriptor |
getGenders(int index)
public String getGenders(int index)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| index | intThe index of the element to return. |
| Type | Description |
| String | The genders at the given index. |
getGendersBytes(int index)
public ByteString getGendersBytes(int index)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| index | intThe index of the value to return. |
| Type | Description |
| ByteString | The bytes of the genders at the given index. |
getGendersCount()
public int getGendersCount()The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Type | Description |
| int | The count of genders. |
getGendersList()
public ProtocolStringList getGendersList()The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Type | Description |
| ProtocolStringList | A list containing the genders. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Type | Description |
| FieldAccessorTable |
isInitialized()
public final boolean isInitialized()| Type | Description |
| boolean |
mergeFrom(Audience other)
public Audience.Builder mergeFrom(Audience other)| Name | Description |
| other | Audience |
| Type | Description |
| Audience.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Audience.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Name | Description |
| input | CodedInputStream |
| extensionRegistry | ExtensionRegistryLite |
| Type | Description |
| Audience.Builder |
| Type | Description |
| IOException |
mergeFrom(Message other)
public Audience.Builder mergeFrom(Message other)| Name | Description |
| other | Message |
| Type | Description |
| Audience.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Audience.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Name | Description |
| unknownFields | UnknownFieldSet |
| Type | Description |
| Audience.Builder |
setAgeGroups(int index, String value)
public Audience.Builder setAgeGroups(int index, String value)The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience.suggestedMinAge and Product.audience.suggestedMaxAge.
repeated string age_groups = 2;
| Name | Description |
| index | intThe index to set the value at. |
| value | StringThe ageGroups to set. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Audience.Builder setField(Descriptors.FieldDescriptor field, Object value)| Name | Description |
| field | FieldDescriptor |
| value | Object |
| Type | Description |
| Audience.Builder |
setGenders(int index, String value)
public Audience.Builder setGenders(int index, String value)The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender.
repeated string genders = 1;
| Name | Description |
| index | intThe index to set the value at. |
| value | StringThe genders to set. |
| Type | Description |
| Audience.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Audience.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Name | Description |
| field | FieldDescriptor |
| index | int |
| value | Object |
| Type | Description |
| Audience.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Audience.Builder setUnknownFields(UnknownFieldSet unknownFields)| Name | Description |
| unknownFields | UnknownFieldSet |
| Type | Description |
| Audience.Builder |