Class Promotion.Builder (2.85.0)

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

Promotion information.

Protobuf type google.cloud.retail.v2.Promotion

Implements

PromotionOrBuilder

Static Methods

getDescriptor()

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

Methods

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

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.

Corresponds to Google Merchant Center property promotion_id.

string promotion_id = 1;

Returns
Type Description
Promotion.Builder

This builder for chaining.

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.

Corresponds to Google Merchant Center property promotion_id.

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.

Corresponds to Google Merchant Center property promotion_id.

string promotion_id = 1;

Returns
Type Description
ByteString

The bytes for promotionId.

internalGetFieldAccessorTable()

protected GeneratedMessage.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

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.

Corresponds to Google Merchant Center property promotion_id.

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.

Corresponds to Google Merchant Center property promotion_id.

string promotion_id = 1;

Parameter
Name Description
value ByteString

The bytes for promotionId to set.

Returns
Type Description
Promotion.Builder

This builder for chaining.