Cloud Billing Budget v1 API - Class BudgetService.BudgetServiceClient (2.5.0)

public class BudgetService.BudgetServiceClient : ClientBase<BudgetService.BudgetServiceClient>

Reference documentation and code samples for the Cloud Billing Budget v1 API class BudgetService.BudgetServiceClient.

Client for BudgetService

Inheritance

object > ClientBase > ClientBaseBudgetServiceBudgetServiceClient > BudgetService.BudgetServiceClient

Namespace

Google.Cloud.Billing.Budgets.V1

Assembly

Google.Cloud.Billing.Budgets.V1.dll

Constructors

BudgetServiceClient()

protected BudgetServiceClient()

Protected parameterless constructor to allow creation of test doubles.

BudgetServiceClient(CallInvoker)

public BudgetServiceClient(CallInvoker callInvoker)

Creates a new client for BudgetService that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

BudgetServiceClient(ChannelBase)

public BudgetServiceClient(ChannelBase channel)

Creates a new client for BudgetService

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

BudgetServiceClient(ClientBaseConfiguration)

protected BudgetServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateBudget(CreateBudgetRequest, CallOptions)

public virtual Budget CreateBudget(CreateBudgetRequest request, CallOptions options)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
Name Description
request CreateBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Budget

The response received from the server.

CreateBudget(CreateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget CreateBudget(CreateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
Name Description
request CreateBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Budget

The response received from the server.

CreateBudgetAsync(CreateBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> CreateBudgetAsync(CreateBudgetRequest request, CallOptions options)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
Name Description
request CreateBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.

CreateBudgetAsync(CreateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> CreateBudgetAsync(CreateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
Name Description
request CreateBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.

DeleteBudget(DeleteBudgetRequest, CallOptions)

public virtual Empty DeleteBudget(DeleteBudgetRequest request, CallOptions options)

Deletes a budget. Returns successfully if already deleted.

Parameters
Name Description
request DeleteBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteBudget(DeleteBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteBudget(DeleteBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a budget. Returns successfully if already deleted.

Parameters
Name Description
request DeleteBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteBudgetAsync(DeleteBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteBudgetAsync(DeleteBudgetRequest request, CallOptions options)

Deletes a budget. Returns successfully if already deleted.

Parameters
Name Description
request DeleteBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteBudgetAsync(DeleteBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteBudgetAsync(DeleteBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a budget. Returns successfully if already deleted.

Parameters
Name Description
request DeleteBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetBudget(GetBudgetRequest, CallOptions)

public virtual Budget GetBudget(GetBudgetRequest request, CallOptions options)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request GetBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Budget

The response received from the server.

GetBudget(GetBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget GetBudget(GetBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request GetBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Budget

The response received from the server.

GetBudgetAsync(GetBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> GetBudgetAsync(GetBudgetRequest request, CallOptions options)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request GetBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.

GetBudgetAsync(GetBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> GetBudgetAsync(GetBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request GetBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.

ListBudgets(ListBudgetsRequest, CallOptions)

public virtual ListBudgetsResponse ListBudgets(ListBudgetsRequest request, CallOptions options)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request ListBudgetsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListBudgetsResponse

The response received from the server.

ListBudgets(ListBudgetsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListBudgetsResponse ListBudgets(ListBudgetsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request ListBudgetsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListBudgetsResponse

The response received from the server.

ListBudgetsAsync(ListBudgetsRequest, CallOptions)

public virtual AsyncUnaryCall<ListBudgetsResponse> ListBudgetsAsync(ListBudgetsRequest request, CallOptions options)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request ListBudgetsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListBudgetsResponse

The call object.

ListBudgetsAsync(ListBudgetsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListBudgetsResponse> ListBudgetsAsync(ListBudgetsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
Name Description
request ListBudgetsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListBudgetsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override BudgetService.BudgetServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
BudgetServiceBudgetServiceClient
Overrides

UpdateBudget(UpdateBudgetRequest, CallOptions)

public virtual Budget UpdateBudget(UpdateBudgetRequest request, CallOptions options)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
Name Description
request UpdateBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Budget

The response received from the server.

UpdateBudget(UpdateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget UpdateBudget(UpdateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
Name Description
request UpdateBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Budget

The response received from the server.

UpdateBudgetAsync(UpdateBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CallOptions options)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
Name Description
request UpdateBudgetRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.

UpdateBudgetAsync(UpdateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
Name Description
request UpdateBudgetRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBudget

The call object.