2.7.0 (latest) 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.2.0 1.1.0

    public abstract class BudgetServiceClient

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

BudgetService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BudgetServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[BudgetServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClientImpl.md.txt)

## Namespace

[Google.Cloud.Billing.Budgets.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.md.txt)

## Assembly

Google.Cloud.Billing.Budgets.V1.dll

## Remarks

BudgetService stores Cloud Billing budgets, which define a
budget plan and rules to execute as we track spend against that plan.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default BudgetService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IReadOnlyListstring` |   |

**Remarks** The default BudgetService scopes are:

- <https://www.googleapis.com/auth/cloud-billing>
- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual BudgetService.BudgetServiceClient GrpcClient { get; }

The underlying gRPC BudgetService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `BudgetServiceBudgetServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ServiceMetadata` |   |

## Methods

### Create()

    public static BudgetServiceClient Create()

Synchronously creates a [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BudgetServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `BudgetServiceClient` | The created [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt). |

### CreateAsync(CancellationToken)

    public static Task<BudgetServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BudgetServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClientBuilder.md.txt).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `CancellationToken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudgetServiceClient` | The task representing the created [BudgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt). |

### CreateBudget(BillingAccountName, Budget, CallSettings)

    public virtual Budget CreateBudget(BillingAccountName parent, Budget budget, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `BillingAccountName` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
BillingAccountName parent = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
Budget budget = new Budget();
// Make the request
Budget response = budgetServiceClient.CreateBudget(parent, budget);
```

### CreateBudget(CreateBudgetRequest, CallSettings)

    public virtual Budget CreateBudget(CreateBudgetRequest request, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateBudgetRequest` 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** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
CreateBudgetRequest request = new CreateBudgetRequest
{
    ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
    Budget = new Budget(),
};
// Make the request
Budget response = budgetServiceClient.CreateBudget(request);
```

### CreateBudget(string, Budget, CallSettings)

    public virtual Budget CreateBudget(string parent, Budget budget, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
string parent = "billingAccounts/[BILLING_ACCOUNT]";
Budget budget = new Budget();
// Make the request
Budget response = budgetServiceClient.CreateBudget(parent, budget);
```

### CreateBudgetAsync(BillingAccountName, Budget, CallSettings)

    public virtual Task<Budget> CreateBudgetAsync(BillingAccountName parent, Budget budget, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `BillingAccountName` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName parent = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
Budget budget = new Budget();
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(parent, budget);
```

### CreateBudgetAsync(BillingAccountName, Budget, CancellationToken)

    public virtual Task<Budget> CreateBudgetAsync(BillingAccountName parent, Budget budget, CancellationToken cancellationToken)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `BillingAccountName` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName parent = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
Budget budget = new Budget();
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(parent, budget);
```

### CreateBudgetAsync(CreateBudgetRequest, CallSettings)

    public virtual Task<Budget> CreateBudgetAsync(CreateBudgetRequest request, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateBudgetRequest` 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** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateBudgetRequest request = new CreateBudgetRequest
{
    ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
    Budget = new Budget(),
};
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(request);
```

### CreateBudgetAsync(CreateBudgetRequest, CancellationToken)

    public virtual Task<Budget> CreateBudgetAsync(CreateBudgetRequest request, CancellationToken cancellationToken)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateBudgetRequest request = new CreateBudgetRequest
{
    ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
    Budget = new Budget(),
};
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(request);
```

### CreateBudgetAsync(string, Budget, CallSettings)

    public virtual Task<Budget> CreateBudgetAsync(string parent, Budget budget, CallSettings callSettings = null)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "billingAccounts/[BILLING_ACCOUNT]";
Budget budget = new Budget();
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(parent, budget);
```

### CreateBudgetAsync(string, Budget, CancellationToken)

    public virtual Task<Budget> CreateBudgetAsync(string parent, Budget budget, CancellationToken cancellationToken)

Creates a new budget. See
[Quotas and limits](https://cloud.google.com/billing/quotas)
for more information on the limits of the number of budgets you can create.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The name of the billing account to create the budget in. Values are of the form `billingAccounts/{billingAccountId}`. |
| `budget` | `Budget` Required. Budget to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "billingAccounts/[BILLING_ACCOUNT]";
Budget budget = new Budget();
// Make the request
Budget response = await budgetServiceClient.CreateBudgetAsync(parent, budget);
```

### DeleteBudget(BudgetName, CallSettings)

    public virtual void DeleteBudget(BudgetName name, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `BudgetName` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
budgetServiceClient.DeleteBudget(name);
```

### DeleteBudget(DeleteBudgetRequest, CallSettings)

    public virtual void DeleteBudget(DeleteBudgetRequest request, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteBudgetRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
DeleteBudgetRequest request = new DeleteBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
budgetServiceClient.DeleteBudget(request);
```

### DeleteBudget(string, CallSettings)

    public virtual void DeleteBudget(string name, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
budgetServiceClient.DeleteBudget(name);
```

### DeleteBudgetAsync(BudgetName, CallSettings)

    public virtual Task DeleteBudgetAsync(BudgetName name, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `BudgetName` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
await budgetServiceClient.DeleteBudgetAsync(name);
```

### DeleteBudgetAsync(BudgetName, CancellationToken)

    public virtual Task DeleteBudgetAsync(BudgetName name, CancellationToken cancellationToken)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `BudgetName` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
await budgetServiceClient.DeleteBudgetAsync(name);
```

### DeleteBudgetAsync(DeleteBudgetRequest, CallSettings)

    public virtual Task DeleteBudgetAsync(DeleteBudgetRequest request, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteBudgetRequest` 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. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteBudgetRequest request = new DeleteBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
await budgetServiceClient.DeleteBudgetAsync(request);
```

### DeleteBudgetAsync(DeleteBudgetRequest, CancellationToken)

    public virtual Task DeleteBudgetAsync(DeleteBudgetRequest request, CancellationToken cancellationToken)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteBudgetRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteBudgetRequest request = new DeleteBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
await budgetServiceClient.DeleteBudgetAsync(request);
```

### DeleteBudgetAsync(string, CallSettings)

    public virtual Task DeleteBudgetAsync(string name, CallSettings callSettings = null)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
await budgetServiceClient.DeleteBudgetAsync(name);
```

### DeleteBudgetAsync(string, CancellationToken)

    public virtual Task DeleteBudgetAsync(string name, CancellationToken cancellationToken)

Deletes a budget. Returns successfully if already deleted.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the budget to delete. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
await budgetServiceClient.DeleteBudgetAsync(name);
```

### GetBudget(BudgetName, CallSettings)

    public virtual Budget GetBudget(BudgetName name, CallSettings callSettings = null)

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** |
| `name` | `BudgetName` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
Budget response = budgetServiceClient.GetBudget(name);
```

### GetBudget(GetBudgetRequest, CallSettings)

    public virtual Budget GetBudget(GetBudgetRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
GetBudgetRequest request = new GetBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
Budget response = budgetServiceClient.GetBudget(request);
```

### GetBudget(string, CallSettings)

    public virtual Budget GetBudget(string name, CallSettings callSettings = null)

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** |
| `name` | `string` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
Budget response = budgetServiceClient.GetBudget(name);
```

### GetBudgetAsync(BudgetName, CallSettings)

    public virtual Task<Budget> GetBudgetAsync(BudgetName name, CallSettings callSettings = null)

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** |
| `name` | `BudgetName` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(name);
```

### GetBudgetAsync(BudgetName, CancellationToken)

    public virtual Task<Budget> GetBudgetAsync(BudgetName name, CancellationToken cancellationToken)

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** |
| `name` | `BudgetName` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BudgetName name = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]");
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(name);
```

### GetBudgetAsync(GetBudgetRequest, CallSettings)

    public virtual Task<Budget> GetBudgetAsync(GetBudgetRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
GetBudgetRequest request = new GetBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(request);
```

### GetBudgetAsync(GetBudgetRequest, CancellationToken)

    public virtual Task<Budget> GetBudgetAsync(GetBudgetRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
GetBudgetRequest request = new GetBudgetRequest
{
    BudgetName = BudgetName.FromBillingAccountBudget("[BILLING_ACCOUNT]", "[BUDGET]"),
};
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(request);
```

### GetBudgetAsync(string, CallSettings)

    public virtual Task<Budget> GetBudgetAsync(string name, CallSettings callSettings = null)

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** |
| `name` | `string` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(name);
```

### GetBudgetAsync(string, CancellationToken)

    public virtual Task<Budget> GetBudgetAsync(string name, CancellationToken cancellationToken)

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** |
| `name` | `string` Required. Name of budget to get. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "billingAccounts/[BILLING_ACCOUNT]/budgets/[BUDGET]";
// Make the request
Budget response = await budgetServiceClient.GetBudgetAsync(name);
```

### ListBudgets(BillingAccountName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListBudgetsResponse, Budget> ListBudgets(BillingAccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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** |
| `parent` | `BillingAccountName` Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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** |
| `PagedEnumerableListBudgetsResponseBudget` | A pageable sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
BillingAccountName parent = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
PagedEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgets(parent);

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

### ListBudgets(ListBudgetsRequest, CallSettings)

    public virtual PagedEnumerable<ListBudgetsResponse, Budget> ListBudgets(ListBudgetsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListBudgetsResponseBudget` | A pageable sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
ListBudgetsRequest request = new ListBudgetsRequest
{
    ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
    Scope = "",
};
// Make the request
PagedEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgets(request);

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

### ListBudgets(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListBudgetsResponse, Budget> ListBudgets(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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** |
| `parent` | `string` Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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** |
| `PagedEnumerableListBudgetsResponseBudget` | A pageable sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
string parent = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
PagedEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgets(parent);

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

### ListBudgetsAsync(BillingAccountName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListBudgetsResponse, Budget> ListBudgetsAsync(BillingAccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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** |
| `parent` | `BillingAccountName` Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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** |
| `PagedAsyncEnumerableListBudgetsResponseBudget` | A pageable asynchronous sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
BillingAccountName parent = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgetsAsync(parent);

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

### ListBudgetsAsync(ListBudgetsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListBudgetsResponse, Budget> ListBudgetsAsync(ListBudgetsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListBudgetsResponseBudget` | A pageable asynchronous sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
ListBudgetsRequest request = new ListBudgetsRequest
{
    ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
    Scope = "",
};
// Make the request
PagedAsyncEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgetsAsync(request);

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

### ListBudgetsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListBudgetsResponse, Budget> ListBudgetsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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** |
| `parent` | `string` Required. Name of billing account to list budgets under. Values are of the form `billingAccounts/{billingAccountId}`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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** |
| `PagedAsyncEnumerableListBudgetsResponseBudget` | A pageable asynchronous sequence of [Budget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.Budget.md.txt) resources. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "billingAccounts/[BILLING_ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListBudgetsResponse, Budget> response = budgetServiceClient.ListBudgetsAsync(parent);

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

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt#Google_Cloud_Billing_Budgets_V1_BudgetServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt#Google_Cloud_Billing_Budgets_V1_BudgetServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt#Google_Cloud_Billing_Budgets_V1_BudgetServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Billing.Budgets.V1/latest/Google.Cloud.Billing.Budgets.V1.BudgetServiceClient.md.txt#Google_Cloud_Billing_Budgets_V1_BudgetServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateBudget(Budget, FieldMask, CallSettings)

    public virtual Budget UpdateBudget(Budget budget, FieldMask updateMask, CallSettings callSettings = null)

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** |
| `budget` | `Budget` Required. The updated budget object. The budget to update is specified by the budget name in the budget. |
| `updateMask` | `FieldMask` Optional. Indicates which fields in the provided budget to update. Read-only fields (such as `name`) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See <https://developers.google.com/protocol-buffers/docs/proto3#default> for more details about default values. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
Budget budget = new Budget();
FieldMask updateMask = new FieldMask();
// Make the request
Budget response = budgetServiceClient.UpdateBudget(budget, updateMask);
```

### UpdateBudget(UpdateBudgetRequest, CallSettings)

    public virtual Budget UpdateBudget(UpdateBudgetRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Budget` | The RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = BudgetServiceClient.Create();
// Initialize request argument(s)
UpdateBudgetRequest request = new UpdateBudgetRequest
{
    Budget = new Budget(),
    UpdateMask = new FieldMask(),
};
// Make the request
Budget response = budgetServiceClient.UpdateBudget(request);
```

### UpdateBudgetAsync(Budget, FieldMask, CallSettings)

    public virtual Task<Budget> UpdateBudgetAsync(Budget budget, FieldMask updateMask, CallSettings callSettings = null)

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** |
| `budget` | `Budget` Required. The updated budget object. The budget to update is specified by the budget name in the budget. |
| `updateMask` | `FieldMask` Optional. Indicates which fields in the provided budget to update. Read-only fields (such as `name`) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See <https://developers.google.com/protocol-buffers/docs/proto3#default> for more details about default values. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
Budget budget = new Budget();
FieldMask updateMask = new FieldMask();
// Make the request
Budget response = await budgetServiceClient.UpdateBudgetAsync(budget, updateMask);
```

### UpdateBudgetAsync(Budget, FieldMask, CancellationToken)

    public virtual Task<Budget> UpdateBudgetAsync(Budget budget, FieldMask updateMask, CancellationToken cancellationToken)

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** |
| `budget` | `Budget` Required. The updated budget object. The budget to update is specified by the budget name in the budget. |
| `updateMask` | `FieldMask` Optional. Indicates which fields in the provided budget to update. Read-only fields (such as `name`) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See <https://developers.google.com/protocol-buffers/docs/proto3#default> for more details about default values. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
Budget budget = new Budget();
FieldMask updateMask = new FieldMask();
// Make the request
Budget response = await budgetServiceClient.UpdateBudgetAsync(budget, updateMask);
```

### UpdateBudgetAsync(UpdateBudgetRequest, CallSettings)

    public virtual Task<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBudgetRequest request = new UpdateBudgetRequest
{
    Budget = new Budget(),
    UpdateMask = new FieldMask(),
};
// Make the request
Budget response = await budgetServiceClient.UpdateBudgetAsync(request);
```

### UpdateBudgetAsync(UpdateBudgetRequest, CancellationToken)

    public virtual Task<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskBudget` | A Task containing the RPC response. |

**Example**

```cs
// Create client
BudgetServiceClient budgetServiceClient = await BudgetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateBudgetRequest request = new UpdateBudgetRequest
{
    Budget = new Budget(),
    UpdateMask = new FieldMask(),
};
// Make the request
Budget response = await budgetServiceClient.UpdateBudgetAsync(request);
```