Class Promotion.Builder (2.46.0)

public static final class Promotion.Builder extends GeneratedMessageV3.Builder<Promotion.Builder> implements PromotionOrBuilder

Promotion information.

Protobuf type google.cloud.retail.v2beta.Promotion

Implements

PromotionOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Promotion.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Promotion.Builder
Overrides

build()

public Promotion build()
Returns
Type Description
Promotion

buildPartial()

public Promotion buildPartial()
Returns
Type Description
Promotion

clear()

public Promotion.Builder clear()
Returns
Type Description
Promotion.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Promotion.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Promotion.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Promotion.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Promotion.Builder
Overrides

clearPromotionId()

public Promotion.Builder clearPromotionId()

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
Type Description
Promotion.Builder

This builder for chaining.

clone()

public Promotion.Builder clone()
Returns
Type Description
Promotion.Builder
Overrides

getDefaultInstanceForType()

public Promotion getDefaultInstanceForType()
Returns
Type Description
Promotion

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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
Type Description
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
Type Description
ByteString

The bytes for promotionId.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Promotion other)

public Promotion.Builder mergeFrom(Promotion other)
Parameter
Name Description
other Promotion
Returns
Type Description
Promotion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Promotion.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Promotion.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Promotion.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Promotion.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Promotion.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Promotion.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Promotion.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Promotion.Builder
Overrides

setPromotionId(String value)

public Promotion.Builder setPromotionId(String value)

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;

Parameter
Name Description
value String

The promotionId to set.

Returns
Type Description
Promotion.Builder

This builder for chaining.

setPromotionIdBytes(ByteString value)

public Promotion.Builder setPromotionIdBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for promotionId to set.

Returns
Type Description
Promotion.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Promotion.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Promotion.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Promotion.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Promotion.Builder
Overrides