Class Promotion (2.39.0)

public final class Promotion extends GeneratedMessageV3 implements PromotionOrBuilder

Promotion information.

Protobuf type google.cloud.retail.v2.Promotion

Implements

PromotionOrBuilder

Static Fields

PROMOTION_ID_FIELD_NUMBER

public static final int PROMOTION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Promotion getDefaultInstance()
Returns
TypeDescription
Promotion

getDescriptor()

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

newBuilder()

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

newBuilder(Promotion prototype)

public static Promotion.Builder newBuilder(Promotion prototype)
Parameter
NameDescription
prototypePromotion
Returns
TypeDescription
Promotion.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Promotion getDefaultInstanceForType()
Returns
TypeDescription
Promotion

getParserForType()

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

getPromotionId()

public String getPromotionId()

ID of the promotion. For example, "free gift".

The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property promotion.

string promotion_id = 1;

Returns
TypeDescription
String

The promotionId.

getPromotionIdBytes()

public ByteString getPromotionIdBytes()

ID of the promotion. For example, "free gift".

The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property promotion.

string promotion_id = 1;

Returns
TypeDescription
ByteString

The bytes for promotionId.

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 Promotion.Builder newBuilderForType()
Returns
TypeDescription
Promotion.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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