public static final class Promotion.Builder extends GeneratedMessage.Builder<Promotion.Builder> implements PromotionOrBuilderPromotion information.
Protobuf type google.cloud.retail.v2beta.Promotion
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Promotion.BuilderImplements
PromotionOrBuilderStatic 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 |
|
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 |
|
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 |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Promotion.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Promotion.Builder |
|
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 |
StringThe 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 |
ByteStringThe bytes for promotionId to set. |
| Returns | |
|---|---|
| Type | Description |
Promotion.Builder |
This builder for chaining. |