Class AccountRelationship (1.0.0)

public final class AccountRelationship extends GeneratedMessageV3 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 Fields

ACCOUNT_ID_ALIAS_FIELD_NUMBER

public static final int ACCOUNT_ID_ALIAS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PROVIDER_DISPLAY_NAME_FIELD_NUMBER

public static final int PROVIDER_DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

PROVIDER_FIELD_NUMBER

public static final int PROVIDER_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AccountRelationship getDefaultInstance()
Returns
Type Description
AccountRelationship

getDescriptor()

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

newBuilder()

public static AccountRelationship.Builder newBuilder()
Returns
Type Description
AccountRelationship.Builder

newBuilder(AccountRelationship prototype)

public static AccountRelationship.Builder newBuilder(AccountRelationship prototype)
Parameter
Name Description
prototype AccountRelationship
Returns
Type Description
AccountRelationship.Builder

parseDelimitedFrom(InputStream input)

public static AccountRelationship parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AccountRelationship parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AccountRelationship parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AccountRelationship parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AccountRelationship parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AccountRelationship parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AccountRelationship parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AccountRelationship
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AccountRelationship> parser()
Returns
Type Description
Parser<AccountRelationship>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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

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.

getParserForType()

public Parser<AccountRelationship> getParserForType()
Returns
Type Description
Parser<AccountRelationship>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AccountRelationship.Builder newBuilderForType()
Returns
Type Description
AccountRelationship.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AccountRelationship.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AccountRelationship.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AccountRelationship.Builder toBuilder()
Returns
Type Description
AccountRelationship.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException