Show / Hide Table of Contents

Class AccountRelationshipsServiceClient

AccountRelationshipsService client wrapper, for convenient use.

Inheritance
object
AccountRelationshipsServiceClient
AccountRelationshipsServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Shopping.Merchant.Accounts.V1
Assembly: Google.Shopping.Merchant.Accounts.V1.dll
Syntax
public abstract class AccountRelationshipsServiceClient
Remarks

Service to support AccountRelationship API.

Properties

DefaultEndpoint

The default endpoint for the AccountRelationshipsService service, which is a host of "merchantapi.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default AccountRelationshipsService scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default AccountRelationshipsService scopes are:

  • https://www.googleapis.com/auth/content

GrpcClient

The underlying gRPC AccountRelationshipsService client

Declaration
public virtual AccountRelationshipsService.AccountRelationshipsServiceClient GrpcClient { get; }
Property Value
Type Description
AccountRelationshipsService.AccountRelationshipsServiceClient

ServiceMetadata

The service metadata associated with this client type.

Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type Description
ServiceMetadata

Methods

Create()

Synchronously creates a AccountRelationshipsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountRelationshipsServiceClientBuilder.

Declaration
public static AccountRelationshipsServiceClient Create()
Returns
Type Description
AccountRelationshipsServiceClient

The created AccountRelationshipsServiceClient.

CreateAsync(CancellationToken)

Asynchronously creates a AccountRelationshipsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountRelationshipsServiceClientBuilder.

Declaration
public static Task<AccountRelationshipsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AccountRelationshipsServiceClient>

The task representing the created AccountRelationshipsServiceClient.

GetAccountRelationship(AccountRelationshipName, CallSettings)

Retrieve an account relationship.

Declaration
public virtual AccountRelationship GetAccountRelationship(AccountRelationshipName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountRelationshipName name

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountRelationship

The RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
AccountRelationshipName name = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]");
// Make the request
AccountRelationship response = accountRelationshipsServiceClient.GetAccountRelationship(name);

GetAccountRelationship(GetAccountRelationshipRequest, CallSettings)

Retrieve an account relationship.

Declaration
public virtual AccountRelationship GetAccountRelationship(GetAccountRelationshipRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountRelationship

The RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
GetAccountRelationshipRequest request = new GetAccountRelationshipRequest
{
    AccountRelationshipName = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]"),
};
// Make the request
AccountRelationship response = accountRelationshipsServiceClient.GetAccountRelationship(request);

GetAccountRelationship(string, CallSettings)

Retrieve an account relationship.

Declaration
public virtual AccountRelationship GetAccountRelationship(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountRelationship

The RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/relationships/[RELATIONSHIP]";
// Make the request
AccountRelationship response = accountRelationshipsServiceClient.GetAccountRelationship(name);

GetAccountRelationshipAsync(AccountRelationshipName, CallSettings)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(AccountRelationshipName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountRelationshipName name

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountRelationshipName name = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]");
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(name);

GetAccountRelationshipAsync(AccountRelationshipName, CancellationToken)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(AccountRelationshipName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountRelationshipName name

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

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountRelationshipName name = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]");
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(name);

GetAccountRelationshipAsync(GetAccountRelationshipRequest, CallSettings)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(GetAccountRelationshipRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountRelationshipRequest request = new GetAccountRelationshipRequest
{
    AccountRelationshipName = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]"),
};
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(request);

GetAccountRelationshipAsync(GetAccountRelationshipRequest, CancellationToken)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(GetAccountRelationshipRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountRelationshipRequest request = new GetAccountRelationshipRequest
{
    AccountRelationshipName = AccountRelationshipName.FromAccountRelationship("[ACCOUNT]", "[RELATIONSHIP]"),
};
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(request);

GetAccountRelationshipAsync(string, CallSettings)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/relationships/[RELATIONSHIP]";
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(name);

GetAccountRelationshipAsync(string, CancellationToken)

Retrieve an account relationship.

Declaration
public virtual Task<AccountRelationship> GetAccountRelationshipAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

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

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/relationships/[RELATIONSHIP]";
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.GetAccountRelationshipAsync(name);

ListAccountRelationships(AccountName, string, int?, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationships(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account of the account relationship to filter by. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationships(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountRelationship item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountRelationshipsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountRelationships(ListAccountRelationshipsRequest, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationships(ListAccountRelationshipsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountRelationshipsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
ListAccountRelationshipsRequest request = new ListAccountRelationshipsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationships(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountRelationship item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountRelationshipsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountRelationships(string, string, int?, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationships(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account of the account relationship to filter by. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationships(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountRelationship item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAccountRelationshipsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountRelationshipsAsync(AccountName, string, int?, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationshipsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account of the account relationship to filter by. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable asynchronous sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationshipsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountRelationship item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountRelationshipsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountRelationshipsAsync(ListAccountRelationshipsRequest, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationshipsAsync(ListAccountRelationshipsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountRelationshipsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable asynchronous sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
ListAccountRelationshipsRequest request = new ListAccountRelationshipsRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationshipsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountRelationship item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountRelationshipsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAccountRelationshipsAsync(string, string, int?, CallSettings)

List account relationships for the specified account.

Declaration
public virtual PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> ListAccountRelationshipsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account of the account relationship to filter by. Format: accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship>

A pageable asynchronous sequence of AccountRelationship resources.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListAccountRelationshipsResponse, AccountRelationship> response = accountRelationshipsServiceClient.ListAccountRelationshipsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountRelationship item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAccountRelationshipsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountRelationship item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AccountRelationship> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AccountRelationship item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateAccountRelationship(AccountRelationship, FieldMask, CallSettings)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual AccountRelationship UpdateAccountRelationship(AccountRelationship accountRelationship, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
AccountRelationship accountRelationship

Required. The new version of the account relationship.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • account_id_alias
CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountRelationship

The RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
AccountRelationship accountRelationship = new AccountRelationship();
FieldMask updateMask = new FieldMask();
// Make the request
AccountRelationship response = accountRelationshipsServiceClient.UpdateAccountRelationship(accountRelationship, updateMask);

UpdateAccountRelationship(UpdateAccountRelationshipRequest, CallSettings)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual AccountRelationship UpdateAccountRelationship(UpdateAccountRelationshipRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountRelationship

The RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = AccountRelationshipsServiceClient.Create();
// Initialize request argument(s)
UpdateAccountRelationshipRequest request = new UpdateAccountRelationshipRequest
{
    AccountRelationship = new AccountRelationship(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccountRelationship response = accountRelationshipsServiceClient.UpdateAccountRelationship(request);

UpdateAccountRelationshipAsync(AccountRelationship, FieldMask, CallSettings)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual Task<AccountRelationship> UpdateAccountRelationshipAsync(AccountRelationship accountRelationship, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
AccountRelationship accountRelationship

Required. The new version of the account relationship.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • account_id_alias
CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountRelationship accountRelationship = new AccountRelationship();
FieldMask updateMask = new FieldMask();
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.UpdateAccountRelationshipAsync(accountRelationship, updateMask);

UpdateAccountRelationshipAsync(AccountRelationship, FieldMask, CancellationToken)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual Task<AccountRelationship> UpdateAccountRelationshipAsync(AccountRelationship accountRelationship, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountRelationship accountRelationship

Required. The new version of the account relationship.

FieldMask updateMask

Optional. List of fields being updated.

The following fields are supported (in both snake_case and lowerCamelCase):

  • account_id_alias
CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountRelationship accountRelationship = new AccountRelationship();
FieldMask updateMask = new FieldMask();
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.UpdateAccountRelationshipAsync(accountRelationship, updateMask);

UpdateAccountRelationshipAsync(UpdateAccountRelationshipRequest, CallSettings)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual Task<AccountRelationship> UpdateAccountRelationshipAsync(UpdateAccountRelationshipRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccountRelationshipRequest request = new UpdateAccountRelationshipRequest
{
    AccountRelationship = new AccountRelationship(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.UpdateAccountRelationshipAsync(request);

UpdateAccountRelationshipAsync(UpdateAccountRelationshipRequest, CancellationToken)

Updates the account relationship. Executing this method requires admin access.

Declaration
public virtual Task<AccountRelationship> UpdateAccountRelationshipAsync(UpdateAccountRelationshipRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateAccountRelationshipRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountRelationship>

A Task containing the RPC response.

Sample code
// Create client
AccountRelationshipsServiceClient accountRelationshipsServiceClient = await AccountRelationshipsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccountRelationshipRequest request = new UpdateAccountRelationshipRequest
{
    AccountRelationship = new AccountRelationship(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccountRelationship response = await accountRelationshipsServiceClient.UpdateAccountRelationshipAsync(request);
In this article
Back to top Generated by DocFX