Class Audience (2.54.0)

public final class Audience extends GeneratedMessageV3 implements AudienceOrBuilder

An intended audience of the Product for whom it's sold.

Protobuf type google.cloud.retail.v2beta.Audience

Implements

AudienceOrBuilder

Static Fields

AGE_GROUPS_FIELD_NUMBER

public static final int AGE_GROUPS_FIELD_NUMBER
Field Value
Type Description
int

GENDERS_FIELD_NUMBER

public static final int GENDERS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Audience getDefaultInstance()
Returns
Type Description
Audience

getDescriptor()

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

newBuilder()

public static Audience.Builder newBuilder()
Returns
Type Description
Audience.Builder

newBuilder(Audience prototype)

public static Audience.Builder newBuilder(Audience prototype)
Parameter
Name Description
prototype Audience
Returns
Type Description
Audience.Builder

parseDelimitedFrom(InputStream input)

public static Audience parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Audience parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Audience parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Audience parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Audience parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Audience parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Audience> parser()
Returns
Type Description
Parser<Audience>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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–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;

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–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;

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–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;

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–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;

Returns
Type Description
ProtocolStringList

A list containing the ageGroups.

getDefaultInstanceForType()

public Audience getDefaultInstanceForType()
Returns
Type Description
Audience

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
Type Description
ProtocolStringList

A list containing the genders.

getParserForType()

public Parser<Audience> getParserForType()
Returns
Type Description
Parser<Audience>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Audience.Builder newBuilderForType()
Returns
Type Description
Audience.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Audience.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Audience.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Audience.Builder toBuilder()
Returns
Type Description
Audience.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException