Class Audience (2.39.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
TypeDescription
int

GENDERS_FIELD_NUMBER

public static final int GENDERS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Audience getDefaultInstance()
Returns
TypeDescription
Audience

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Audience.Builder newBuilder()
Returns
TypeDescription
Audience.Builder

newBuilder(Audience prototype)

public static Audience.Builder newBuilder(Audience prototype)
Parameter
NameDescription
prototypeAudience
Returns
TypeDescription
Audience.Builder

parseDelimitedFrom(InputStream input)

public static Audience parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Audience parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Audience parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Audience parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Audience parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Audience parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Audience
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Audience> parser()
Returns
TypeDescription
Parser<Audience>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the ageGroups.

getDefaultInstanceForType()

public Audience getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the genders.

getParserForType()

public Parser<Audience> getParserForType()
Returns
TypeDescription
Parser<Audience>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Audience.Builder newBuilderForType()
Returns
TypeDescription
Audience.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Audience.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Audience.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Audience.Builder toBuilder()
Returns
TypeDescription
Audience.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException