Class InsertPromotionRequest.Builder (1.13.0)

public static final class InsertPromotionRequest.Builder extends GeneratedMessage.Builder<InsertPromotionRequest.Builder> implements InsertPromotionRequestOrBuilder

Request message for the InsertPromotion method.

Protobuf type google.shopping.merchant.promotions.v1beta.InsertPromotionRequest

Static Methods

getDescriptor()

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

Methods

build()

public InsertPromotionRequest build()
Returns
Type Description
InsertPromotionRequest

buildPartial()

public InsertPromotionRequest buildPartial()
Returns
Type Description
InsertPromotionRequest

clear()

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

clearDataSource()

public InsertPromotionRequest.Builder clearDataSource()

Required. The data source of the promotion Format: accounts/{account}/dataSources/{datasource}.

string data_source = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

clearParent()

public InsertPromotionRequest.Builder clearParent()

Required. The account where the promotion will be inserted. Format: accounts/{account}

string parent = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

clearPromotion()

public InsertPromotionRequest.Builder clearPromotion()

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
InsertPromotionRequest.Builder

getDataSource()

public String getDataSource()

Required. The data source of the promotion Format: accounts/{account}/dataSources/{datasource}.

string data_source = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The dataSource.

getDataSourceBytes()

public ByteString getDataSourceBytes()

Required. The data source of the promotion Format: accounts/{account}/dataSources/{datasource}.

string data_source = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for dataSource.

getDefaultInstanceForType()

public InsertPromotionRequest getDefaultInstanceForType()
Returns
Type Description
InsertPromotionRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getParent()

public String getParent()

Required. The account where the promotion will be inserted. Format: accounts/{account}

string parent = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The account where the promotion will be inserted. Format: accounts/{account}

string parent = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for parent.

getPromotion()

public Promotion getPromotion()

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Promotion

The promotion.

getPromotionBuilder()

public Promotion.Builder getPromotionBuilder()

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Promotion.Builder

getPromotionOrBuilder()

public PromotionOrBuilder getPromotionOrBuilder()

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PromotionOrBuilder

hasPromotion()

public boolean hasPromotion()

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the promotion field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(InsertPromotionRequest other)

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

mergePromotion(Promotion value)

public InsertPromotionRequest.Builder mergePromotion(Promotion value)

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Promotion
Returns
Type Description
InsertPromotionRequest.Builder

setDataSource(String value)

public InsertPromotionRequest.Builder setDataSource(String value)

Required. The data source of the promotion Format: accounts/{account}/dataSources/{datasource}.

string data_source = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The dataSource to set.

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

setDataSourceBytes(ByteString value)

public InsertPromotionRequest.Builder setDataSourceBytes(ByteString value)

Required. The data source of the promotion Format: accounts/{account}/dataSources/{datasource}.

string data_source = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for dataSource to set.

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

setParent(String value)

public InsertPromotionRequest.Builder setParent(String value)

Required. The account where the promotion will be inserted. Format: accounts/{account}

string parent = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public InsertPromotionRequest.Builder setParentBytes(ByteString value)

Required. The account where the promotion will be inserted. Format: accounts/{account}

string parent = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
InsertPromotionRequest.Builder

This builder for chaining.

setPromotion(Promotion value)

public InsertPromotionRequest.Builder setPromotion(Promotion value)

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Promotion
Returns
Type Description
InsertPromotionRequest.Builder

setPromotion(Promotion.Builder builderForValue)

public InsertPromotionRequest.Builder setPromotion(Promotion.Builder builderForValue)

Required. The promotion to insert.

.google.shopping.merchant.promotions.v1beta.Promotion promotion = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Promotion.Builder
Returns
Type Description
InsertPromotionRequest.Builder