Class InsertPromotionRequest.Builder (0.7.0)

public static final class InsertPromotionRequest.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

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.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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