Class PromotionDataSource.Builder (1.13.0)

public static final class PromotionDataSource.Builder extends GeneratedMessage.Builder<PromotionDataSource.Builder> implements PromotionDataSourceOrBuilder

The promotion data source.

Protobuf type google.shopping.merchant.datasources.v1.PromotionDataSource

Static Methods

getDescriptor()

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

Methods

build()

public PromotionDataSource build()
Returns
Type Description
PromotionDataSource

buildPartial()

public PromotionDataSource buildPartial()
Returns
Type Description
PromotionDataSource

clear()

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

clearContentLanguage()

public PromotionDataSource.Builder clearContentLanguage()

Required. Immutable. The two-letter ISO 639-1 language of the items in the data source.

string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.

clearTargetCountry()

public PromotionDataSource.Builder clearTargetCountry()

Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries.

string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.

getContentLanguage()

public String getContentLanguage()

Required. Immutable. The two-letter ISO 639-1 language of the items in the data source.

string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Required. Immutable. The two-letter ISO 639-1 language of the items in the data source.

string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getDefaultInstanceForType()

public PromotionDataSource getDefaultInstanceForType()
Returns
Type Description
PromotionDataSource

getDescriptorForType()

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

getTargetCountry()

public String getTargetCountry()

Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries.

string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The targetCountry.

getTargetCountryBytes()

public ByteString getTargetCountryBytes()

Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries.

string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for targetCountry.

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 PromotionDataSource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PromotionDataSource.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(PromotionDataSource other)

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

setContentLanguage(String value)

public PromotionDataSource.Builder setContentLanguage(String value)

Required. Immutable. The two-letter ISO 639-1 language of the items in the data source.

string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The contentLanguage to set.

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.

setContentLanguageBytes(ByteString value)

public PromotionDataSource.Builder setContentLanguageBytes(ByteString value)

Required. Immutable. The two-letter ISO 639-1 language of the items in the data source.

string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for contentLanguage to set.

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.

setTargetCountry(String value)

public PromotionDataSource.Builder setTargetCountry(String value)

Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries.

string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The targetCountry to set.

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.

setTargetCountryBytes(ByteString value)

public PromotionDataSource.Builder setTargetCountryBytes(ByteString value)

Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries.

string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for targetCountry to set.

Returns
Type Description
PromotionDataSource.Builder

This builder for chaining.