Class AccountRelationship.Builder (1.11.0)

public static final class AccountRelationship.Builder extends GeneratedMessage.Builder<AccountRelationship.Builder> implements AccountRelationshipOrBuilder

The AccountRelationship message defines a formal connection between a merchant's account and a service provider's account. This relationship enables the provider to offer specific services to the business, such as product management or campaign management. It specifies the access rights and permissions to the business's data relevant to those services.

Establishing an account relationship involves linking the merchant's account with a provider's account. The provider could be another Google account (like Google Ads or Google My Business) or a third-party platform (such as Shopify or WooCommerce).

Protobuf type google.shopping.merchant.accounts.v1.AccountRelationship

Static Methods

getDescriptor()

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

Methods

build()

public AccountRelationship build()
Returns
Type Description
AccountRelationship

buildPartial()

public AccountRelationship buildPartial()
Returns
Type Description
AccountRelationship

clear()

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

clearAccountIdAlias()

public AccountRelationship.Builder clearAccountIdAlias()

Optional. An optional alias you can assign to this account relationship. This alias acts as a convenient identifier for your own reference and management. It must be unique among all your account relationships with the same provider.

For example, you might use account_id_alias to assign a friendly name to this relationship for easier identification in your systems.

string account_id_alias = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

clearName()

public AccountRelationship.Builder clearName()

Identifier. The resource name of the account relationship. Format: accounts/{account}/relationships/{relationship}. For example, accounts/123456/relationships/567890.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

clearProvider()

public AccountRelationship.Builder clearProvider()

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

clearProviderDisplayName()

public AccountRelationship.Builder clearProviderDisplayName()

Output only. The human-readable display name of the provider account.

string provider_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

getAccountIdAlias()

public String getAccountIdAlias()

Optional. An optional alias you can assign to this account relationship. This alias acts as a convenient identifier for your own reference and management. It must be unique among all your account relationships with the same provider.

For example, you might use account_id_alias to assign a friendly name to this relationship for easier identification in your systems.

string account_id_alias = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The accountIdAlias.

getAccountIdAliasBytes()

public ByteString getAccountIdAliasBytes()

Optional. An optional alias you can assign to this account relationship. This alias acts as a convenient identifier for your own reference and management. It must be unique among all your account relationships with the same provider.

For example, you might use account_id_alias to assign a friendly name to this relationship for easier identification in your systems.

string account_id_alias = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for accountIdAlias.

getDefaultInstanceForType()

public AccountRelationship getDefaultInstanceForType()
Returns
Type Description
AccountRelationship

getDescriptorForType()

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

getName()

public String getName()

Identifier. The resource name of the account relationship. Format: accounts/{account}/relationships/{relationship}. For example, accounts/123456/relationships/567890.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the account relationship. Format: accounts/{account}/relationships/{relationship}. For example, accounts/123456/relationships/567890.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getProvider()

public String getProvider()

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The provider.

getProviderBytes()

public ByteString getProviderBytes()

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for provider.

getProviderDisplayName()

public String getProviderDisplayName()

Output only. The human-readable display name of the provider account.

string provider_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The providerDisplayName.

getProviderDisplayNameBytes()

public ByteString getProviderDisplayNameBytes()

Output only. The human-readable display name of the provider account.

string provider_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for providerDisplayName.

hasProvider()

public boolean hasProvider()

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the provider field is set.

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

mergeFrom(Message other)

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

mergeFrom(AccountRelationship other)

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

setAccountIdAlias(String value)

public AccountRelationship.Builder setAccountIdAlias(String value)

Optional. An optional alias you can assign to this account relationship. This alias acts as a convenient identifier for your own reference and management. It must be unique among all your account relationships with the same provider.

For example, you might use account_id_alias to assign a friendly name to this relationship for easier identification in your systems.

string account_id_alias = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The accountIdAlias to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setAccountIdAliasBytes(ByteString value)

public AccountRelationship.Builder setAccountIdAliasBytes(ByteString value)

Optional. An optional alias you can assign to this account relationship. This alias acts as a convenient identifier for your own reference and management. It must be unique among all your account relationships with the same provider.

For example, you might use account_id_alias to assign a friendly name to this relationship for easier identification in your systems.

string account_id_alias = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for accountIdAlias to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setName(String value)

public AccountRelationship.Builder setName(String value)

Identifier. The resource name of the account relationship. Format: accounts/{account}/relationships/{relationship}. For example, accounts/123456/relationships/567890.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AccountRelationship.Builder setNameBytes(ByteString value)

Identifier. The resource name of the account relationship. Format: accounts/{account}/relationships/{relationship}. For example, accounts/123456/relationships/567890.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setProvider(String value)

public AccountRelationship.Builder setProvider(String value)

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The provider to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setProviderBytes(ByteString value)

public AccountRelationship.Builder setProviderBytes(ByteString value)

Immutable. The provider of the service. Either the reference to an account such as providers/123 or a well-known service provider (one of providers/GOOGLE_ADS or providers/GOOGLE_BUSINESS_PROFILE).

optional string provider = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for provider to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setProviderDisplayName(String value)

public AccountRelationship.Builder setProviderDisplayName(String value)

Output only. The human-readable display name of the provider account.

string provider_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The providerDisplayName to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.

setProviderDisplayNameBytes(ByteString value)

public AccountRelationship.Builder setProviderDisplayNameBytes(ByteString value)

Output only. The human-readable display name of the provider account.

string provider_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for providerDisplayName to set.

Returns
Type Description
AccountRelationship.Builder

This builder for chaining.