Show / Hide Table of Contents

Class AccountServicesServiceClient

AccountServicesService client wrapper, for convenient use.

Inheritance
object
AccountServicesServiceClient
AccountServicesServiceClientImpl
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 AccountServicesServiceClient
Remarks

Service to support AccountService API.

Properties

DefaultEndpoint

The default endpoint for the AccountServicesService 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 AccountServicesService scopes.

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

The default AccountServicesService scopes are:

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

GrpcClient

The underlying gRPC AccountServicesService client

Declaration
public virtual AccountServicesService.AccountServicesServiceClient GrpcClient { get; }
Property Value
Type Description
AccountServicesService.AccountServicesServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

ApproveAccountService(AccountServiceName, CallSettings)

Approve an account service proposal.

Declaration
public virtual AccountService ApproveAccountService(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = accountServicesServiceClient.ApproveAccountService(name);

ApproveAccountService(ApproveAccountServiceRequest, CallSettings)

Approve an account service proposal.

Declaration
public virtual AccountService ApproveAccountService(ApproveAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ApproveAccountServiceRequest 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
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
ApproveAccountServiceRequest request = new ApproveAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = accountServicesServiceClient.ApproveAccountService(request);

ApproveAccountService(string, CallSettings)

Approve an account service proposal.

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

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = accountServicesServiceClient.ApproveAccountService(name);

ApproveAccountServiceAsync(AccountServiceName, CallSettings)

Approve an account service proposal.

Declaration
public virtual Task<AccountService> ApproveAccountServiceAsync(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(name);

ApproveAccountServiceAsync(AccountServiceName, CancellationToken)

Approve an account service proposal.

Declaration
public virtual Task<AccountService> ApproveAccountServiceAsync(AccountServiceName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(name);

ApproveAccountServiceAsync(ApproveAccountServiceRequest, CallSettings)

Approve an account service proposal.

Declaration
public virtual Task<AccountService> ApproveAccountServiceAsync(ApproveAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ApproveAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
ApproveAccountServiceRequest request = new ApproveAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(request);

ApproveAccountServiceAsync(ApproveAccountServiceRequest, CancellationToken)

Approve an account service proposal.

Declaration
public virtual Task<AccountService> ApproveAccountServiceAsync(ApproveAccountServiceRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
ApproveAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
ApproveAccountServiceRequest request = new ApproveAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(request);

ApproveAccountServiceAsync(string, CallSettings)

Approve an account service proposal.

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

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(name);

ApproveAccountServiceAsync(string, CancellationToken)

Approve an account service proposal.

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

Required. The resource name of the account service to approve. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = await accountServicesServiceClient.ApproveAccountServiceAsync(name);

Create()

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

Declaration
public static AccountServicesServiceClient Create()
Returns
Type Description
AccountServicesServiceClient

The created AccountServicesServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AccountServicesServiceClient>

The task representing the created AccountServicesServiceClient.

GetAccountService(AccountServiceName, CallSettings)

Retrieve an account service.

Declaration
public virtual AccountService GetAccountService(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = accountServicesServiceClient.GetAccountService(name);

GetAccountService(GetAccountServiceRequest, CallSettings)

Retrieve an account service.

Declaration
public virtual AccountService GetAccountService(GetAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAccountServiceRequest 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
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
GetAccountServiceRequest request = new GetAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = accountServicesServiceClient.GetAccountService(request);

GetAccountService(string, CallSettings)

Retrieve an account service.

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

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = accountServicesServiceClient.GetAccountService(name);

GetAccountServiceAsync(AccountServiceName, CallSettings)

Retrieve an account service.

Declaration
public virtual Task<AccountService> GetAccountServiceAsync(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(name);

GetAccountServiceAsync(AccountServiceName, CancellationToken)

Retrieve an account service.

Declaration
public virtual Task<AccountService> GetAccountServiceAsync(AccountServiceName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(name);

GetAccountServiceAsync(GetAccountServiceRequest, CallSettings)

Retrieve an account service.

Declaration
public virtual Task<AccountService> GetAccountServiceAsync(GetAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountServiceRequest request = new GetAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(request);

GetAccountServiceAsync(GetAccountServiceRequest, CancellationToken)

Retrieve an account service.

Declaration
public virtual Task<AccountService> GetAccountServiceAsync(GetAccountServiceRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountServiceRequest request = new GetAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(request);

GetAccountServiceAsync(string, CallSettings)

Retrieve an account service.

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

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(name);

GetAccountServiceAsync(string, CancellationToken)

Retrieve an account service.

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

Required. The resource name of the account service to get. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
AccountService response = await accountServicesServiceClient.GetAccountServiceAsync(name);

ListAccountServices(AccountName, string, int?, CallSettings)

List account services for the specified accounts. Supports filtering.

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

Required. The parent account of the account service 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<ListAccountServicesResponse, AccountService>

A pageable sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServices(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountService 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 (ListAccountServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ListAccountServices(ListAccountServicesRequest, CallSettings)

List account services for the specified accounts. Supports filtering.

Declaration
public virtual PagedEnumerable<ListAccountServicesResponse, AccountService> ListAccountServices(ListAccountServicesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountServicesRequest 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<ListAccountServicesResponse, AccountService>

A pageable sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
ListAccountServicesRequest request = new ListAccountServicesRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServices(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountService 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 (ListAccountServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ListAccountServices(string, string, int?, CallSettings)

List account services for the specified accounts. Supports filtering.

Declaration
public virtual PagedEnumerable<ListAccountServicesResponse, AccountService> ListAccountServices(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account of the account service 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<ListAccountServicesResponse, AccountService>

A pageable sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServices(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AccountService 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 (ListAccountServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ListAccountServicesAsync(AccountName, string, int?, CallSettings)

List account services for the specified accounts. Supports filtering.

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

Required. The parent account of the account service 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<ListAccountServicesResponse, AccountService>

A pageable asynchronous sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServicesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountService 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((ListAccountServicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ListAccountServicesAsync(ListAccountServicesRequest, CallSettings)

List account services for the specified accounts. Supports filtering.

Declaration
public virtual PagedAsyncEnumerable<ListAccountServicesResponse, AccountService> ListAccountServicesAsync(ListAccountServicesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAccountServicesRequest 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<ListAccountServicesResponse, AccountService>

A pageable asynchronous sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
ListAccountServicesRequest request = new ListAccountServicesRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServicesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountService 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((ListAccountServicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ListAccountServicesAsync(string, string, int?, CallSettings)

List account services for the specified accounts. Supports filtering.

Declaration
public virtual PagedAsyncEnumerable<ListAccountServicesResponse, AccountService> ListAccountServicesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account of the account service 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<ListAccountServicesResponse, AccountService>

A pageable asynchronous sequence of AccountService resources.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListAccountServicesResponse, AccountService> response = accountServicesServiceClient.ListAccountServicesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountService 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((ListAccountServicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AccountService 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<AccountService> 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 (AccountService 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;

ProposeAccountService(AccountName, string, AccountService, CallSettings)

Propose an account service.

Declaration
public virtual AccountService ProposeAccountService(AccountName parent, string provider, AccountService accountService, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = accountServicesServiceClient.ProposeAccountService(parent, provider, accountService);

ProposeAccountService(ProposeAccountServiceRequest, CallSettings)

Propose an account service.

Declaration
public virtual AccountService ProposeAccountService(ProposeAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ProposeAccountServiceRequest 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
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
ProposeAccountServiceRequest request = new ProposeAccountServiceRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    Provider = "",
    AccountService = new AccountService(),
};
// Make the request
AccountService response = accountServicesServiceClient.ProposeAccountService(request);

ProposeAccountService(string, string, AccountService, CallSettings)

Propose an account service.

Declaration
public virtual AccountService ProposeAccountService(string parent, string provider, AccountService accountService, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AccountService

The RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = accountServicesServiceClient.ProposeAccountService(parent, provider, accountService);

ProposeAccountServiceAsync(AccountName, string, AccountService, CallSettings)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(AccountName parent, string provider, AccountService accountService, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(parent, provider, accountService);

ProposeAccountServiceAsync(AccountName, string, AccountService, CancellationToken)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(AccountName parent, string provider, AccountService accountService, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountName parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(parent, provider, accountService);

ProposeAccountServiceAsync(ProposeAccountServiceRequest, CallSettings)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(ProposeAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ProposeAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
ProposeAccountServiceRequest request = new ProposeAccountServiceRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    Provider = "",
    AccountService = new AccountService(),
};
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(request);

ProposeAccountServiceAsync(ProposeAccountServiceRequest, CancellationToken)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(ProposeAccountServiceRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
ProposeAccountServiceRequest 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<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
ProposeAccountServiceRequest request = new ProposeAccountServiceRequest
{
    ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
    Provider = "",
    AccountService = new AccountService(),
};
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(request);

ProposeAccountServiceAsync(string, string, AccountService, CallSettings)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(string parent, string provider, AccountService accountService, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(parent, provider, accountService);

ProposeAccountServiceAsync(string, string, AccountService, CancellationToken)

Propose an account service.

Declaration
public virtual Task<AccountService> ProposeAccountServiceAsync(string parent, string provider, AccountService accountService, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The resource name of the parent account for the service. Format: accounts/{account}

string provider

Required. 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).

AccountService accountService

Required. The account service to propose.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AccountService>

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
string provider = "";
AccountService accountService = new AccountService();
// Make the request
AccountService response = await accountServicesServiceClient.ProposeAccountServiceAsync(parent, provider, accountService);

RejectAccountService(AccountServiceName, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual void RejectAccountService(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
accountServicesServiceClient.RejectAccountService(name);

RejectAccountService(RejectAccountServiceRequest, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual void RejectAccountService(RejectAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
RejectAccountServiceRequest request

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

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
RejectAccountServiceRequest request = new RejectAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
accountServicesServiceClient.RejectAccountService(request);

RejectAccountService(string, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

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

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = AccountServicesServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
accountServicesServiceClient.RejectAccountService(name);

RejectAccountServiceAsync(AccountServiceName, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual Task RejectAccountServiceAsync(AccountServiceName name, CallSettings callSettings = null)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(name);

RejectAccountServiceAsync(AccountServiceName, CancellationToken)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual Task RejectAccountServiceAsync(AccountServiceName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountServiceName name

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountServiceName name = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]");
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(name);

RejectAccountServiceAsync(RejectAccountServiceRequest, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual Task RejectAccountServiceAsync(RejectAccountServiceRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
RejectAccountServiceRequest 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

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
RejectAccountServiceRequest request = new RejectAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(request);

RejectAccountServiceAsync(RejectAccountServiceRequest, CancellationToken)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual Task RejectAccountServiceAsync(RejectAccountServiceRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
RejectAccountServiceRequest 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

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
RejectAccountServiceRequest request = new RejectAccountServiceRequest
{
    AccountServiceName = AccountServiceName.FromAccountService("[ACCOUNT]", "[SERVICE]"),
};
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(request);

RejectAccountServiceAsync(string, CallSettings)

Reject an account service (both proposed and approve services can be rejected).

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

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(name);

RejectAccountServiceAsync(string, CancellationToken)

Reject an account service (both proposed and approve services can be rejected).

Declaration
public virtual Task RejectAccountServiceAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The resource name of the account service to reject. Format: accounts/{account}/services/{service}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
AccountServicesServiceClient accountServicesServiceClient = await AccountServicesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/services/[SERVICE]";
// Make the request
await accountServicesServiceClient.RejectAccountServiceAsync(name);

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.

In this article
Back to top Generated by DocFX