Class MerchantCenterLink.Builder (2.8.0)

public static final class MerchantCenterLink.Builder extends GeneratedMessageV3.Builder<MerchantCenterLink.Builder> implements MerchantCenterLinkOrBuilder

Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.

Protobuf type google.cloud.retail.v2beta.MerchantCenterLink

Static Methods

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

public MerchantCenterLink.Builder addAllDestinations(Iterable<String> values)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameter
NameDescription
valuesIterable<String>

The destinations to add.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder addDestinations(String value)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameter
NameDescription
valueString

The destinations to add.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder addDestinationsBytes(ByteString value)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameter
NameDescription
valueByteString

The bytes of the destinations to add.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink build()
Returns
TypeDescription
MerchantCenterLink
public MerchantCenterLink buildPartial()
Returns
TypeDescription
MerchantCenterLink
public MerchantCenterLink.Builder clear()
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink.Builder clearBranchId()

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.

string branch_id = 2;

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder clearDestinations()

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink.Builder clearLanguageCode()

Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: en.

string language_code = 5;

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder clearMerchantCenterAccountId()

Required. The linked Merchant center account id. The account must be a standalone account or a sub-account of a MCA.

int64 merchant_center_account_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink.Builder clearRegionCode()

Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the region tag. If left blank no region filtering will be performed. Example value: US.

string region_code = 4;

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder clone()
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public String getBranchId()

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.

string branch_id = 2;

Returns
TypeDescription
String

The branchId.

public ByteString getBranchIdBytes()

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.

string branch_id = 2;

Returns
TypeDescription
ByteString

The bytes for branchId.

public MerchantCenterLink getDefaultInstanceForType()
Returns
TypeDescription
MerchantCenterLink
public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides
public String getDestinations(int index)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The destinations at the given index.

public ByteString getDestinationsBytes(int index)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the destinations at the given index.

public int getDestinationsCount()

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Returns
TypeDescription
int

The count of destinations.

public ProtocolStringList getDestinationsList()

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the destinations.

public String getLanguageCode()

Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: en.

string language_code = 5;

Returns
TypeDescription
String

The languageCode.

public ByteString getLanguageCodeBytes()

Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: en.

string language_code = 5;

Returns
TypeDescription
ByteString

The bytes for languageCode.

public long getMerchantCenterAccountId()

Required. The linked Merchant center account id. The account must be a standalone account or a sub-account of a MCA.

int64 merchant_center_account_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
long

The merchantCenterAccountId.

public String getRegionCode()

Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the region tag. If left blank no region filtering will be performed. Example value: US.

string region_code = 4;

Returns
TypeDescription
String

The regionCode.

public ByteString getRegionCodeBytes()

Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the region tag. If left blank no region filtering will be performed. Example value: US.

string region_code = 4;

Returns
TypeDescription
ByteString

The bytes for regionCode.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides
public MerchantCenterLink.Builder mergeFrom(MerchantCenterLink other)
Parameter
NameDescription
otherMerchantCenterLink
Returns
TypeDescription
MerchantCenterLink.Builder
public MerchantCenterLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides Exceptions
TypeDescription
IOException
public MerchantCenterLink.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public final MerchantCenterLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink.Builder setBranchId(String value)

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.

string branch_id = 2;

Parameter
NameDescription
valueString

The branchId to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setBranchIdBytes(ByteString value)

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.

string branch_id = 2;

Parameter
NameDescription
valueByteString

The bytes for branchId to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setDestinations(int index, String value)

String representing the destination to import for, all if left empty. List of possible values is given in Included destination. List of allowed string values: "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory _ads", "Free_listings", "Free_local_listings" NOTE: The string values are case sensitive.

repeated string destinations = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The destinations to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public MerchantCenterLink.Builder setLanguageCode(String value)

Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: en.

string language_code = 5;

Parameter
NameDescription
valueString

The languageCode to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setLanguageCodeBytes(ByteString value)

Language of the title/description and other string attributes. Use language tags defined by BCP 47. ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: en.

string language_code = 5;

Parameter
NameDescription
valueByteString

The bytes for languageCode to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setMerchantCenterAccountId(long value)

Required. The linked Merchant center account id. The account must be a standalone account or a sub-account of a MCA.

int64 merchant_center_account_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuelong

The merchantCenterAccountId to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setRegionCode(String value)

Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the region tag. If left blank no region filtering will be performed. Example value: US.

string region_code = 4;

Parameter
NameDescription
valueString

The regionCode to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setRegionCodeBytes(ByteString value)

Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found here under the region tag. If left blank no region filtering will be performed. Example value: US.

string region_code = 4;

Parameter
NameDescription
valueByteString

The bytes for regionCode to set.

Returns
TypeDescription
MerchantCenterLink.Builder

This builder for chaining.

public MerchantCenterLink.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides
public final MerchantCenterLink.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MerchantCenterLink.Builder
Overrides