Class PromotionDataSource.Builder (0.8.0)

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

The promotion data source.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

clone()

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

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

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.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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.

setUnknownFields(UnknownFieldSet unknownFields)

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