Class Promotion.Builder (2.34.0)

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

Promotion information.

Protobuf type google.cloud.retail.v2alpha.Promotion

Implements

PromotionOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Promotion.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Promotion.Builder
Overrides

build()

public Promotion build()
Returns
TypeDescription
Promotion

buildPartial()

public Promotion buildPartial()
Returns
TypeDescription
Promotion

clear()

public Promotion.Builder clear()
Returns
TypeDescription
Promotion.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Promotion.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Promotion.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Promotion.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Promotion.Builder

This builder for chaining.

clone()

public Promotion.Builder clone()
Returns
TypeDescription
Promotion.Builder
Overrides

getDefaultInstanceForType()

public Promotion getDefaultInstanceForType()
Returns
TypeDescription
Promotion

getDescriptorForType()

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Promotion other)

public Promotion.Builder mergeFrom(Promotion other)
Parameter
NameDescription
otherPromotion
Returns
TypeDescription
Promotion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Promotion.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Promotion.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Promotion.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Promotion.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Promotion.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Promotion.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Promotion.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The promotionId to set.

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

The bytes for promotionId to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Promotion.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Promotion.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Promotion.Builder
Overrides