1.6.0 (latest) 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public abstract class LicenseManagementServiceClient

Reference documentation and code samples for the Cloud Commerce Consumer Procurement v1 API class LicenseManagementServiceClient.

LicenseManagementService client wrapper, for convenient use.

## Inheritance

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

## 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

[LicenseManagementServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClientImpl.md.txt)

## Namespace

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

## Assembly

Google.Cloud.Commerce.Consumer.Procurement.V1.dll

## Remarks

Service for managing licenses.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default LicenseManagementService scopes.

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

**Remarks** The default LicenseManagementService scopes are:

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

<br />

### GrpcClient

    public virtual LicenseManagementService.LicenseManagementServiceClient GrpcClient { get; }

The underlying gRPC LicenseManagementService client

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

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

## Methods

### Assign(AssignRequest, CallSettings)

    public virtual AssignResponse Assign(AssignRequest request, CallSettings callSettings = null)

Assigns a license to a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
AssignRequest request = new AssignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
AssignResponse response = licenseManagementServiceClient.Assign(request);
```

### Assign(string, IEnumerable\<string\>, CallSettings)

    public virtual AssignResponse Assign(string parent, IEnumerable<string> usernames, CallSettings callSettings = null)

Assigns a license to a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
AssignResponse response = licenseManagementServiceClient.Assign(parent, usernames);
```

### AssignAsync(AssignRequest, CallSettings)

    public virtual Task<AssignResponse> AssignAsync(AssignRequest request, CallSettings callSettings = null)

Assigns a license to a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
AssignRequest request = new AssignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
AssignResponse response = await licenseManagementServiceClient.AssignAsync(request);
```

### AssignAsync(AssignRequest, CancellationToken)

    public virtual Task<AssignResponse> AssignAsync(AssignRequest request, CancellationToken cancellationToken)

Assigns a license to a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
AssignRequest request = new AssignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
AssignResponse response = await licenseManagementServiceClient.AssignAsync(request);
```

### AssignAsync(string, IEnumerable\<string\>, CallSettings)

    public virtual Task<AssignResponse> AssignAsync(string parent, IEnumerable<string> usernames, CallSettings callSettings = null)

Assigns a license to a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
AssignResponse response = await licenseManagementServiceClient.AssignAsync(parent, usernames);
```

### AssignAsync(string, IEnumerable\<string\>, CancellationToken)

    public virtual Task<AssignResponse> AssignAsync(string parent, IEnumerable<string> usernames, CancellationToken cancellationToken)

Assigns a license to a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
AssignResponse response = await licenseManagementServiceClient.AssignAsync(parent, usernames);
```

### Create()

    public static LicenseManagementServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

Asynchronously creates a [LicenseManagementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt) using the default credentials,
endpoint and settings. To specify custom credentials or other settings, use
[LicenseManagementServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClientBuilder.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** |
| `TaskLicenseManagementServiceClient` | The task representing the created [LicenseManagementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt). |

### EnumerateLicensedUsers(EnumerateLicensedUsersRequest, CallSettings)

    public virtual PagedEnumerable<EnumerateLicensedUsersResponse, LicensedUser> EnumerateLicensedUsers(EnumerateLicensedUsersRequest request, CallSettings callSettings = null)

Enumerates all users assigned a license.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `EnumerateLicensedUsersRequest` 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** |
| `PagedEnumerableEnumerateLicensedUsersResponseLicensedUser` | A pageable sequence of [LicensedUser](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.md.txt) resources. |

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", };
// Make the request
PagedEnumerable<EnumerateLicensedUsersResponse, LicensedUser> response = licenseManagementServiceClient.EnumerateLicensedUsers(request);

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

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

    public virtual PagedEnumerable<EnumerateLicensedUsersResponse, LicensedUser> EnumerateLicensedUsers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Enumerates all users assigned a license.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `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** |
| `PagedEnumerableEnumerateLicensedUsersResponseLicensedUser` | A pageable sequence of [LicensedUser](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.md.txt) resources. |

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<EnumerateLicensedUsersResponse, LicensedUser> response = licenseManagementServiceClient.EnumerateLicensedUsers(parent);

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

### EnumerateLicensedUsersAsync(EnumerateLicensedUsersRequest, CallSettings)

    public virtual PagedAsyncEnumerable<EnumerateLicensedUsersResponse, LicensedUser> EnumerateLicensedUsersAsync(EnumerateLicensedUsersRequest request, CallSettings callSettings = null)

Enumerates all users assigned a license.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `EnumerateLicensedUsersRequest` 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** |
| `PagedAsyncEnumerableEnumerateLicensedUsersResponseLicensedUser` | A pageable asynchronous sequence of [LicensedUser](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.md.txt) resources. |

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<EnumerateLicensedUsersResponse, LicensedUser> response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(request);

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

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

    public virtual PagedAsyncEnumerable<EnumerateLicensedUsersResponse, LicensedUser> EnumerateLicensedUsersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Enumerates all users assigned a license.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `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** |
| `PagedAsyncEnumerableEnumerateLicensedUsersResponseLicensedUser` | A pageable asynchronous sequence of [LicensedUser](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.md.txt) resources. |

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<EnumerateLicensedUsersResponse, LicensedUser> response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(parent);

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

### GetLicensePool(GetLicensePoolRequest, CallSettings)

    public virtual LicensePool GetLicensePool(GetLicensePoolRequest request, CallSettings callSettings = null)

Gets the license pool.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", };
// Make the request
LicensePool response = licenseManagementServiceClient.GetLicensePool(request);
```

### GetLicensePool(string, CallSettings)

    public virtual LicensePool GetLicensePool(string name, CallSettings callSettings = null)

Gets the license pool.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the license pool to get. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
LicensePool response = licenseManagementServiceClient.GetLicensePool(name);
```

### GetLicensePoolAsync(GetLicensePoolRequest, CallSettings)

    public virtual Task<LicensePool> GetLicensePoolAsync(GetLicensePoolRequest request, CallSettings callSettings = null)

Gets the license pool.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", };
// Make the request
LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(request);
```

### GetLicensePoolAsync(GetLicensePoolRequest, CancellationToken)

    public virtual Task<LicensePool> GetLicensePoolAsync(GetLicensePoolRequest request, CancellationToken cancellationToken)

Gets the license pool.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", };
// Make the request
LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(request);
```

### GetLicensePoolAsync(string, CallSettings)

    public virtual Task<LicensePool> GetLicensePoolAsync(string name, CallSettings callSettings = null)

Gets the license pool.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the license pool to get. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(name);
```

### GetLicensePoolAsync(string, CancellationToken)

    public virtual Task<LicensePool> GetLicensePoolAsync(string name, CancellationToken cancellationToken)

Gets the license pool.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the license pool to get. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(name);
```

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt#Google_Cloud_Commerce_Consumer_Procurement_V1_LicenseManagementServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt#Google_Cloud_Commerce_Consumer_Procurement_V1_LicenseManagementServiceClient_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.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt#Google_Cloud_Commerce_Consumer_Procurement_V1_LicenseManagementServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.md.txt#Google_Cloud_Commerce_Consumer_Procurement_V1_LicenseManagementServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### Unassign(UnassignRequest, CallSettings)

    public virtual UnassignResponse Unassign(UnassignRequest request, CallSettings callSettings = null)

Unassigns a license from a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
UnassignRequest request = new UnassignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
UnassignResponse response = licenseManagementServiceClient.Unassign(request);
```

### Unassign(string, IEnumerable\<string\>, CallSettings)

    public virtual UnassignResponse Unassign(string parent, IEnumerable<string> usernames, CallSettings callSettings = null)

Unassigns a license from a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
UnassignResponse response = licenseManagementServiceClient.Unassign(parent, usernames);
```

### UnassignAsync(UnassignRequest, CallSettings)

    public virtual Task<UnassignResponse> UnassignAsync(UnassignRequest request, CallSettings callSettings = null)

Unassigns a license from a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
UnassignRequest request = new UnassignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(request);
```

### UnassignAsync(UnassignRequest, CancellationToken)

    public virtual Task<UnassignResponse> UnassignAsync(UnassignRequest request, CancellationToken cancellationToken)

Unassigns a license from a user.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
UnassignRequest request = new UnassignRequest
{
    Parent = "",
    Usernames = { "", },
};
// Make the request
UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(request);
```

### UnassignAsync(string, IEnumerable\<string\>, CallSettings)

    public virtual Task<UnassignResponse> UnassignAsync(string parent, IEnumerable<string> usernames, CallSettings callSettings = null)

Unassigns a license from a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(parent, usernames);
```

### UnassignAsync(string, IEnumerable\<string\>, CancellationToken)

    public virtual Task<UnassignResponse> UnassignAsync(string parent, IEnumerable<string> usernames, CancellationToken cancellationToken)

Unassigns a license from a user.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. License pool name. |
| `usernames` | `IEnumerablestring` Required. Username. Format: `name@domain.com`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
IEnumerable<string> usernames = new string[] { "", };
// Make the request
UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(parent, usernames);
```

### UpdateLicensePool(LicensePool, FieldMask, CallSettings)

    public virtual LicensePool UpdateLicensePool(LicensePool licensePool, FieldMask updateMask, CallSettings callSettings = null)

Updates the license pool if one exists for this Order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `licensePool` | `LicensePool` Required. The license pool to update. The license pool's name field is used to identify the license pool to update. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool`. |
| `updateMask` | `FieldMask` Required. The list of fields to update. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
LicensePool licensePool = new LicensePool();
FieldMask updateMask = new FieldMask();
// Make the request
LicensePool response = licenseManagementServiceClient.UpdateLicensePool(licensePool, updateMask);
```

### UpdateLicensePool(UpdateLicensePoolRequest, CallSettings)

    public virtual LicensePool UpdateLicensePool(UpdateLicensePoolRequest request, CallSettings callSettings = null)

Updates the license pool if one exists for this Order.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create();
// Initialize request argument(s)
UpdateLicensePoolRequest request = new UpdateLicensePoolRequest
{
    LicensePool = new LicensePool(),
    UpdateMask = new FieldMask(),
};
// Make the request
LicensePool response = licenseManagementServiceClient.UpdateLicensePool(request);
```

### UpdateLicensePoolAsync(LicensePool, FieldMask, CallSettings)

    public virtual Task<LicensePool> UpdateLicensePoolAsync(LicensePool licensePool, FieldMask updateMask, CallSettings callSettings = null)

Updates the license pool if one exists for this Order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `licensePool` | `LicensePool` Required. The license pool to update. The license pool's name field is used to identify the license pool to update. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool`. |
| `updateMask` | `FieldMask` Required. The list of fields to update. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
LicensePool licensePool = new LicensePool();
FieldMask updateMask = new FieldMask();
// Make the request
LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(licensePool, updateMask);
```

### UpdateLicensePoolAsync(LicensePool, FieldMask, CancellationToken)

    public virtual Task<LicensePool> UpdateLicensePoolAsync(LicensePool licensePool, FieldMask updateMask, CancellationToken cancellationToken)

Updates the license pool if one exists for this Order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `licensePool` | `LicensePool` Required. The license pool to update. The license pool's name field is used to identify the license pool to update. Format: `billingAccounts/{billing_account}/orders/{order}/licensePool`. |
| `updateMask` | `FieldMask` Required. The list of fields to update. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
LicensePool licensePool = new LicensePool();
FieldMask updateMask = new FieldMask();
// Make the request
LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(licensePool, updateMask);
```

### UpdateLicensePoolAsync(UpdateLicensePoolRequest, CallSettings)

    public virtual Task<LicensePool> UpdateLicensePoolAsync(UpdateLicensePoolRequest request, CallSettings callSettings = null)

Updates the license pool if one exists for this Order.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateLicensePoolRequest request = new UpdateLicensePoolRequest
{
    LicensePool = new LicensePool(),
    UpdateMask = new FieldMask(),
};
// Make the request
LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(request);
```

### UpdateLicensePoolAsync(UpdateLicensePoolRequest, CancellationToken)

    public virtual Task<LicensePool> UpdateLicensePoolAsync(UpdateLicensePoolRequest request, CancellationToken cancellationToken)

Updates the license pool if one exists for this Order.

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

**Example**

```cs
// Create client
LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateLicensePoolRequest request = new UpdateLicensePoolRequest
{
    LicensePool = new LicensePool(),
    UpdateMask = new FieldMask(),
};
// Make the request
LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(request);
```