public final class Audience extends GeneratedMessageV3 implements AudienceOrBuilder
An intended audience of the Product
for whom it's sold.
Protobuf type google.cloud.retail.v2alpha.Audience
Static Fields
AGE_GROUPS_FIELD_NUMBER
public static final int AGE_GROUPS_FIELD_NUMBER
Field Value
GENDERS_FIELD_NUMBER
public static final int GENDERS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Audience getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Audience.Builder newBuilder()
Returns
newBuilder(Audience prototype)
public static Audience.Builder newBuilder(Audience prototype)
Parameter
Returns
public static Audience parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Audience parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Audience parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Audience parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Audience parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Audience parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Audience parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Audience parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Audience parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Audience> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
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\u201312 months old),
"toddler" (1\u20135 years old), "kids" (5\u201313 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;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
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\u201312 months old),
"toddler" (1\u20135 years old), "kids" (5\u201313 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;
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
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\u201312 months old),
"toddler" (1\u20135 years old), "kids" (5\u201313 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;
Returns
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\u201312 months old),
"toddler" (1\u20135 years old), "kids" (5\u201313 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;
Returns
getDefaultInstanceForType()
public Audience getDefaultInstanceForType()
Returns
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;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
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;
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
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;
Returns
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;
Returns
getParserForType()
public Parser<Audience> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Audience.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Audience.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Audience.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions