public static final class PrimaryProductDataSource.Builder extends GeneratedMessageV3.Builder<PrimaryProductDataSource.Builder> implements PrimaryProductDataSourceOrBuilder
The primary data source for local and online products.
Protobuf type google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > PrimaryProductDataSource.BuilderImplements
PrimaryProductDataSourceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllCountries(Iterable<String> values)
public PrimaryProductDataSource.Builder addAllCountries(Iterable<String> values)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The countries to add. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
addCountries(String value)
public PrimaryProductDataSource.Builder addCountries(String value)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
String The countries to add. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
addCountriesBytes(ByteString value)
public PrimaryProductDataSource.Builder addCountriesBytes(ByteString value)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the countries to add. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PrimaryProductDataSource.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
build()
public PrimaryProductDataSource build()
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource |
buildPartial()
public PrimaryProductDataSource buildPartial()
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource |
clear()
public PrimaryProductDataSource.Builder clear()
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
clearChannel()
public PrimaryProductDataSource.Builder clearChannel()
Required. Immutable. Specifies the type of data source channel.
.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
clearContentLanguage()
public PrimaryProductDataSource.Builder clearContentLanguage()
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
clearCountries()
public PrimaryProductDataSource.Builder clearCountries()
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
clearFeedLabel()
public PrimaryProductDataSource.Builder clearFeedLabel()
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public PrimaryProductDataSource.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public PrimaryProductDataSource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
clone()
public PrimaryProductDataSource.Builder clone()
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
getChannel()
public PrimaryProductDataSource.Channel getChannel()
Required. Immutable. Specifies the type of data source channel.
.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Channel |
The channel. |
getChannelValue()
public int getChannelValue()
Required. Immutable. Specifies the type of data source channel.
.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
int |
The enum numeric value on the wire for channel. |
getContentLanguage()
public String getContentLanguage()
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
String |
The contentLanguage. |
getContentLanguageBytes()
public ByteString getContentLanguageBytes()
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for contentLanguage. |
getCountries(int index)
public String getCountries(int index)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The countries at the given index. |
getCountriesBytes(int index)
public ByteString getCountriesBytes(int index)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the countries at the given index. |
getCountriesCount()
public int getCountriesCount()
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
The count of countries. |
getCountriesList()
public ProtocolStringList getCountriesList()
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the countries. |
getDefaultInstanceForType()
public PrimaryProductDataSource getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getFeedLabel()
public String getFeedLabel()
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
String |
The feedLabel. |
getFeedLabelBytes()
public ByteString getFeedLabelBytes()
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for feedLabel. |
hasContentLanguage()
public boolean hasContentLanguage()
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
boolean |
Whether the contentLanguage field is set. |
hasFeedLabel()
public boolean hasFeedLabel()
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
boolean |
Whether the feedLabel field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PrimaryProductDataSource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public PrimaryProductDataSource.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
mergeFrom(PrimaryProductDataSource other)
public PrimaryProductDataSource.Builder mergeFrom(PrimaryProductDataSource other)
Parameter | |
---|---|
Name | Description |
other |
PrimaryProductDataSource |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PrimaryProductDataSource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
setChannel(PrimaryProductDataSource.Channel value)
public PrimaryProductDataSource.Builder setChannel(PrimaryProductDataSource.Channel value)
Required. Immutable. Specifies the type of data source channel.
.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
PrimaryProductDataSource.Channel The channel to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setChannelValue(int value)
public PrimaryProductDataSource.Builder setChannelValue(int value)
Required. Immutable. Specifies the type of data source channel.
.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
int The enum numeric value on the wire for channel to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setContentLanguage(String value)
public PrimaryProductDataSource.Builder setContentLanguage(String value)
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
String The contentLanguage to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setContentLanguageBytes(ByteString value)
public PrimaryProductDataSource.Builder setContentLanguageBytes(ByteString value)
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabel
and contentLanguage
must be either both set or unset.
The fields can only be unset for data sources without file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string content_language = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for contentLanguage to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setCountries(int index, String value)
public PrimaryProductDataSource.Builder setCountries(int index, String value)
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
repeated string countries = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The countries to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setFeedLabel(String value)
public PrimaryProductDataSource.Builder setFeedLabel(String value)
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
String The feedLabel to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setFeedLabelBytes(ByteString value)
public PrimaryProductDataSource.Builder setFeedLabelBytes(ByteString value)
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabel
and contentLanguage
must be either both set or unset for data
sources with product content type.
They must be set for data sources with a file input.
If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
optional string feed_label = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for feedLabel to set. |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public PrimaryProductDataSource.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PrimaryProductDataSource.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final PrimaryProductDataSource.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PrimaryProductDataSource.Builder |