Class AccountLimitsServiceClient
AccountLimitsService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.Quota.V1
Assembly: Google.Shopping.Merchant.Quota.V1.dll
Syntax
public abstract class AccountLimitsServiceClient
Remarks
Service to retrieve account limits.
Properties
DefaultEndpoint
The default endpoint for the AccountLimitsService 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 AccountLimitsService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default AccountLimitsService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC AccountLimitsService client
Declaration
public virtual AccountLimitsService.AccountLimitsServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| AccountLimitsService.AccountLimitsServiceClient |
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 AccountLimitsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountLimitsServiceClientBuilder.
Declaration
public static AccountLimitsServiceClient Create()
Returns
| Type | Description |
|---|---|
| AccountLimitsServiceClient | The created AccountLimitsServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a AccountLimitsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountLimitsServiceClientBuilder.
Declaration
public static Task<AccountLimitsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<AccountLimitsServiceClient> | The task representing the created AccountLimitsServiceClient. |
GetAccountLimit(AccountLimitName, CallSettings)
Retrieves an account limit.
Declaration
public virtual AccountLimit GetAccountLimit(AccountLimitName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AccountLimitName | name | Required. The name of the limit to retrieve.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| AccountLimit | The RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
AccountLimitName name = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]");
// Make the request
AccountLimit response = accountLimitsServiceClient.GetAccountLimit(name);
GetAccountLimit(GetAccountLimitRequest, CallSettings)
Retrieves an account limit.
Declaration
public virtual AccountLimit GetAccountLimit(GetAccountLimitRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAccountLimitRequest | 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 |
|---|---|
| AccountLimit | The RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
GetAccountLimitRequest request = new GetAccountLimitRequest
{
AccountLimitName = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]"),
};
// Make the request
AccountLimit response = accountLimitsServiceClient.GetAccountLimit(request);
GetAccountLimit(string, CallSettings)
Retrieves an account limit.
Declaration
public virtual AccountLimit GetAccountLimit(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the limit to retrieve.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| AccountLimit | The RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/limits/[LIMIT]";
// Make the request
AccountLimit response = accountLimitsServiceClient.GetAccountLimit(name);
GetAccountLimitAsync(AccountLimitName, CallSettings)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(AccountLimitName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AccountLimitName | name | Required. The name of the limit to retrieve.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountLimitName name = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]");
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(name);
GetAccountLimitAsync(AccountLimitName, CancellationToken)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(AccountLimitName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| AccountLimitName | name | Required. The name of the limit to retrieve.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountLimitName name = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]");
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(name);
GetAccountLimitAsync(GetAccountLimitRequest, CallSettings)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(GetAccountLimitRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAccountLimitRequest | 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<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountLimitRequest request = new GetAccountLimitRequest
{
AccountLimitName = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]"),
};
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(request);
GetAccountLimitAsync(GetAccountLimitRequest, CancellationToken)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(GetAccountLimitRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAccountLimitRequest | 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<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountLimitRequest request = new GetAccountLimitRequest
{
AccountLimitName = AccountLimitName.FromAccountLimit("[ACCOUNT]", "[LIMIT]"),
};
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(request);
GetAccountLimitAsync(string, CallSettings)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the limit to retrieve.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/limits/[LIMIT]";
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(name);
GetAccountLimitAsync(string, CancellationToken)
Retrieves an account limit.
Declaration
public virtual Task<AccountLimit> GetAccountLimitAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the limit to retrieve.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<AccountLimit> | A Task containing the RPC response. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/limits/[LIMIT]";
// Make the request
AccountLimit response = await accountLimitsServiceClient.GetAccountLimitAsync(name);
ListAccountLimits(AccountName, string, int?, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimits(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AccountName | parent | Required. The parent account.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListAccountLimitsResponse, AccountLimit> | A pageable sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimits(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AccountLimit 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 (ListAccountLimitsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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;
ListAccountLimits(ListAccountLimitsRequest, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimits(ListAccountLimitsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListAccountLimitsRequest | 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<ListAccountLimitsResponse, AccountLimit> | A pageable sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
ListAccountLimitsRequest request = new ListAccountLimitsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimits(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AccountLimit 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 (ListAccountLimitsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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;
ListAccountLimits(string, string, int?, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimits(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent account.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListAccountLimitsResponse, AccountLimit> | A pageable sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = AccountLimitsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimits(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AccountLimit 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 (ListAccountLimitsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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;
ListAccountLimitsAsync(AccountName, string, int?, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimitsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AccountName | parent | Required. The parent account.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> | A pageable asynchronous sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimitsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountLimit 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((ListAccountLimitsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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;
ListAccountLimitsAsync(ListAccountLimitsRequest, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimitsAsync(ListAccountLimitsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListAccountLimitsRequest | 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<ListAccountLimitsResponse, AccountLimit> | A pageable asynchronous sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
ListAccountLimitsRequest request = new ListAccountLimitsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimitsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountLimit 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((ListAccountLimitsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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;
ListAccountLimitsAsync(string, string, int?, CallSettings)
Lists the limits of an account.
Declaration
public virtual PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> ListAccountLimitsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent account.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> | A pageable asynchronous sequence of AccountLimit resources. |
Sample code
// Create client
AccountLimitsServiceClient accountLimitsServiceClient = await AccountLimitsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListAccountLimitsResponse, AccountLimit> response = accountLimitsServiceClient.ListAccountLimitsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AccountLimit 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((ListAccountLimitsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AccountLimit 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<AccountLimit> 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 (AccountLimit 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.