Class AccountService (1.0.0)

public final class AccountService extends GeneratedMessageV3 implements AccountServiceOrBuilder

The AccountService message represents a specific service that a provider account offers to a Merchant Center account.

AccountService defines the permissions and capabilities granted to the provider, allowing for operations such as product management or campaign management.

The lifecycle of an AccountService involves a proposal phase, where one party suggests the service, and an approval phase, where the other party accepts or rejects it. This handshake mechanism ensures mutual consent before any access is granted. This mechanism safeguards both parties by ensuring that access rights are granted appropriately and that both the business and provider are aware of the services enabled. In scenarios where a user is an admin of both accounts, the approval can happen automatically.

The mutability of a service is also managed through AccountService. Some services might be immutable, for example, if they were established through other systems or APIs, and you cannot alter them through this API.

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

Static Fields

ACCOUNT_AGGREGATION_FIELD_NUMBER

public static final int ACCOUNT_AGGREGATION_FIELD_NUMBER
Field Value
Type Description
int

ACCOUNT_MANAGEMENT_FIELD_NUMBER

public static final int ACCOUNT_MANAGEMENT_FIELD_NUMBER
Field Value
Type Description
int

CAMPAIGNS_MANAGEMENT_FIELD_NUMBER

public static final int CAMPAIGNS_MANAGEMENT_FIELD_NUMBER
Field Value
Type Description
int

EXTERNAL_ACCOUNT_ID_FIELD_NUMBER

public static final int EXTERNAL_ACCOUNT_ID_FIELD_NUMBER
Field Value
Type Description
int

HANDSHAKE_FIELD_NUMBER

public static final int HANDSHAKE_FIELD_NUMBER
Field Value
Type Description
int

LOCAL_LISTING_MANAGEMENT_FIELD_NUMBER

public static final int LOCAL_LISTING_MANAGEMENT_FIELD_NUMBER
Field Value
Type Description
int

MUTABILITY_FIELD_NUMBER

public static final int MUTABILITY_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PRODUCTS_MANAGEMENT_FIELD_NUMBER

public static final int PRODUCTS_MANAGEMENT_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 AccountService getDefaultInstance()
Returns
Type Description
AccountService

getDescriptor()

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

newBuilder()

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

newBuilder(AccountService prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAccountAggregation()

public AccountAggregation getAccountAggregation()

Service type for account aggregation. This enables the provider, which is an advanced account, to manage multiple sub-accounts (client accounts). Through this service, the advanced account provider can perform administrative and operational tasks across all linked sub-accounts.

This is useful for agencies, aggregators, or large retailers that need centralized control over many Merchant Center accounts.

.google.shopping.merchant.accounts.v1.AccountAggregation account_aggregation = 103;

Returns
Type Description
AccountAggregation

The accountAggregation.

getAccountAggregationOrBuilder()

public AccountAggregationOrBuilder getAccountAggregationOrBuilder()

Service type for account aggregation. This enables the provider, which is an advanced account, to manage multiple sub-accounts (client accounts). Through this service, the advanced account provider can perform administrative and operational tasks across all linked sub-accounts.

This is useful for agencies, aggregators, or large retailers that need centralized control over many Merchant Center accounts.

.google.shopping.merchant.accounts.v1.AccountAggregation account_aggregation = 103;

Returns
Type Description
AccountAggregationOrBuilder

getAccountManagement()

public AccountManagement getAccountManagement()

Service type for account management. Enables the provider to perform administrative actions on the business's account, such as configuring account settings, managing users, or updating business information.

.google.shopping.merchant.accounts.v1.AccountManagement account_management = 102;

Returns
Type Description
AccountManagement

The accountManagement.

getAccountManagementOrBuilder()

public AccountManagementOrBuilder getAccountManagementOrBuilder()

Service type for account management. Enables the provider to perform administrative actions on the business's account, such as configuring account settings, managing users, or updating business information.

.google.shopping.merchant.accounts.v1.AccountManagement account_management = 102;

Returns
Type Description
AccountManagementOrBuilder

getCampaignsManagement()

public CampaignsManagement getCampaignsManagement()

Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance.

.google.shopping.merchant.accounts.v1.CampaignsManagement campaigns_management = 101;

Returns
Type Description
CampaignsManagement

The campaignsManagement.

getCampaignsManagementOrBuilder()

public CampaignsManagementOrBuilder getCampaignsManagementOrBuilder()

Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance.

.google.shopping.merchant.accounts.v1.CampaignsManagement campaigns_management = 101;

Returns
Type Description
CampaignsManagementOrBuilder

getDefaultInstanceForType()

public AccountService getDefaultInstanceForType()
Returns
Type Description
AccountService

getExternalAccountId()

public String getExternalAccountId()

Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify).

If you have multiple accounts with the same provider - for instance, different accounts for various regions — the external_account_id differentiates between them, ensuring accurate linking and integration between Google and the provider.

string external_account_id = 6 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The externalAccountId.

getExternalAccountIdBytes()

public ByteString getExternalAccountIdBytes()

Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify).

If you have multiple accounts with the same provider - for instance, different accounts for various regions — the external_account_id differentiates between them, ensuring accurate linking and integration between Google and the provider.

string external_account_id = 6 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for externalAccountId.

getHandshake()

public Handshake getHandshake()

Output only. Information about the state of the service in terms of establishing it (e.g. is it pending approval or approved).

.google.shopping.merchant.accounts.v1.Handshake handshake = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Handshake

The handshake.

getHandshakeOrBuilder()

public HandshakeOrBuilder getHandshakeOrBuilder()

Output only. Information about the state of the service in terms of establishing it (e.g. is it pending approval or approved).

.google.shopping.merchant.accounts.v1.Handshake handshake = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
HandshakeOrBuilder

getLocalListingManagement()

public LocalListingManagement getLocalListingManagement()

Service type for local listings management. The business group associated with the external account id will be used to provide local inventory to this Merchant Center account.

.google.shopping.merchant.accounts.v1.LocalListingManagement local_listing_management = 104;

Returns
Type Description
LocalListingManagement

The localListingManagement.

getLocalListingManagementOrBuilder()

public LocalListingManagementOrBuilder getLocalListingManagementOrBuilder()

Service type for local listings management. The business group associated with the external account id will be used to provide local inventory to this Merchant Center account.

.google.shopping.merchant.accounts.v1.LocalListingManagement local_listing_management = 104;

Returns
Type Description
LocalListingManagementOrBuilder

getMutability()

public AccountService.Mutability getMutability()

Output only. Whether the service is mutable (e.g. through Approve / Reject RPCs). A service that was created through another system or API might be immutable.

.google.shopping.merchant.accounts.v1.AccountService.Mutability mutability = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AccountService.Mutability

The mutability.

getMutabilityValue()

public int getMutabilityValue()

Output only. Whether the service is mutable (e.g. through Approve / Reject RPCs). A service that was created through another system or API might be immutable.

.google.shopping.merchant.accounts.v1.AccountService.Mutability mutability = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for mutability.

getName()

public String getName()

Identifier. The resource name of the account service. Format: accounts/{account}/services/{service}

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 service. Format: accounts/{account}/services/{service}

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getProductsManagement()

public ProductsManagement getProductsManagement()

Service type for managing products. This allows the provider to handle product data on behalf of the business, including reading and writing product listings. It's commonly used when the provider offers inventory management or catalog synchronization services to keep the business's product information up-to-date across platforms.

.google.shopping.merchant.accounts.v1.ProductsManagement products_management = 100;

Returns
Type Description
ProductsManagement

The productsManagement.

getProductsManagementOrBuilder()

public ProductsManagementOrBuilder getProductsManagementOrBuilder()

Service type for managing products. This allows the provider to handle product data on behalf of the business, including reading and writing product listings. It's commonly used when the provider offers inventory management or catalog synchronization services to keep the business's product information up-to-date across platforms.

.google.shopping.merchant.accounts.v1.ProductsManagement products_management = 100;

Returns
Type Description
ProductsManagementOrBuilder

getProvider()

public String getProvider()

Output only. 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) = OUTPUT_ONLY];

Returns
Type Description
String

The provider.

getProviderBytes()

public ByteString getProviderBytes()

Output only. 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) = OUTPUT_ONLY];

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

getServiceTypeCase()

public AccountService.ServiceTypeCase getServiceTypeCase()
Returns
Type Description
AccountService.ServiceTypeCase

hasAccountAggregation()

public boolean hasAccountAggregation()

Service type for account aggregation. This enables the provider, which is an advanced account, to manage multiple sub-accounts (client accounts). Through this service, the advanced account provider can perform administrative and operational tasks across all linked sub-accounts.

This is useful for agencies, aggregators, or large retailers that need centralized control over many Merchant Center accounts.

.google.shopping.merchant.accounts.v1.AccountAggregation account_aggregation = 103;

Returns
Type Description
boolean

Whether the accountAggregation field is set.

hasAccountManagement()

public boolean hasAccountManagement()

Service type for account management. Enables the provider to perform administrative actions on the business's account, such as configuring account settings, managing users, or updating business information.

.google.shopping.merchant.accounts.v1.AccountManagement account_management = 102;

Returns
Type Description
boolean

Whether the accountManagement field is set.

hasCampaignsManagement()

public boolean hasCampaignsManagement()

Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance.

.google.shopping.merchant.accounts.v1.CampaignsManagement campaigns_management = 101;

Returns
Type Description
boolean

Whether the campaignsManagement field is set.

hasHandshake()

public boolean hasHandshake()

Output only. Information about the state of the service in terms of establishing it (e.g. is it pending approval or approved).

.google.shopping.merchant.accounts.v1.Handshake handshake = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the handshake field is set.

hasLocalListingManagement()

public boolean hasLocalListingManagement()

Service type for local listings management. The business group associated with the external account id will be used to provide local inventory to this Merchant Center account.

.google.shopping.merchant.accounts.v1.LocalListingManagement local_listing_management = 104;

Returns
Type Description
boolean

Whether the localListingManagement field is set.

hasProductsManagement()

public boolean hasProductsManagement()

Service type for managing products. This allows the provider to handle product data on behalf of the business, including reading and writing product listings. It's commonly used when the provider offers inventory management or catalog synchronization services to keep the business's product information up-to-date across platforms.

.google.shopping.merchant.accounts.v1.ProductsManagement products_management = 100;

Returns
Type Description
boolean

Whether the productsManagement field is set.

hasProvider()

public boolean hasProvider()

Output only. 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) = OUTPUT_ONLY];

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 AccountService.Builder newBuilderForType()
Returns
Type Description
AccountService.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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