# GKE Hub v1beta1 API - Class GkeHubMembershipServiceClient (2.0.0-beta09)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta09 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient)
- [2.0.0-beta08](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/2.0.0-beta08/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient)
- [1.0.0-beta04](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/1.0.0-beta04/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient)

    public abstract class GkeHubMembershipServiceClient

Reference documentation and code samples for the GKE Hub v1beta1 API class GkeHubMembershipServiceClient.

GkeHubMembershipService client wrapper, for convenient use.

## Inheritance

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

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

[GkeHubMembershipServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClientImpl)

## Namespace

[Google.Cloud.GkeHub.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1)

## Assembly

Google.Cloud.GkeHub.V1Beta1.dll

## Remarks

The GKE Hub MembershipService handles the registration of many Kubernetes
clusters to Google Cloud, represented with the
\[Membership\]\[google.cloud.gkehub.v1beta1.Membership\] resource.

GKE Hub is currently available in the global region and all regions in
<https://cloud.google.com/compute/docs/regions-zones>.

**Membership management may be non-trivial:** it is recommended to use one
of the Google-provided client libraries or tools where possible when working
with Membership resources.

## Properties

### CreateMembershipOperationsClient

    public virtual OperationsClient CreateMembershipOperationsClient { get; }

The long-running operations client for `CreateMembership`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default GkeHubMembershipService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default GkeHubMembershipService scopes are:

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

<br />

### DeleteMembershipOperationsClient

    public virtual OperationsClient DeleteMembershipOperationsClient { get; }

The long-running operations client for `DeleteMembership`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### GrpcClient

    public virtual GkeHubMembershipService.GkeHubMembershipServiceClient GrpcClient { get; }

The underlying gRPC GkeHubMembershipService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipService.GkeHubMembershipServiceClient` |   |

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

The [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### UpdateMembershipOperationsClient

    public virtual OperationsClient UpdateMembershipOperationsClient { get; }

The long-running operations client for `UpdateMembership`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

## Methods

### Create()

    public static GkeHubMembershipServiceClient Create()

Synchronously creates a [GkeHubMembershipServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[GkeHubMembershipServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient` | The created [GkeHubMembershipServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [GkeHubMembershipServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[GkeHubMembershipServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClientBuilder).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient` | The task representing the created [GkeHubMembershipServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient). |

### CreateMembership(LocationName, Membership, string, CallSettings)

    public virtual Operation<Membership, OperationMetadata> CreateMembership(LocationName parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.CreateMembership(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceCreateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembership(CreateMembershipRequest, CallSettings)

    public virtual Operation<Membership, OperationMetadata> CreateMembership(CreateMembershipRequest request, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    CreateMembershipRequest request = new CreateMembershipRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MembershipId = "",
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.CreateMembership(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceCreateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembership(string, Membership, string, CallSettings)

    public virtual Operation<Membership, OperationMetadata> CreateMembership(string parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.CreateMembership(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceCreateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(LocationName, Membership, string, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(LocationName parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(LocationName, Membership, string, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(LocationName parent, Membership resource, string membershipId, CancellationToken cancellationToken)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(CreateMembershipRequest, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(CreateMembershipRequest request, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateMembershipRequest request = new CreateMembershipRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MembershipId = "",
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(CreateMembershipRequest, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(CreateMembershipRequest request, CancellationToken cancellationToken)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateMembershipRequest request = new CreateMembershipRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MembershipId = "",
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(string, Membership, string, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(string parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### CreateMembershipAsync(string, Membership, string, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(string parent, Membership resource, string membershipId, CancellationToken cancellationToken)

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To register other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`. |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. The membership to create. |
| `membershipId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Membership resource = new Membership();
    string membershipId = "";
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.CreateMembershipAsync(parent, resource, membershipId);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceCreateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### DeleteMembership(DeleteMembershipRequest, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteMembership(DeleteMembershipRequest request, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.DeleteMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    DeleteMembershipRequest request = new DeleteMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        RequestId = "",
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = gkeHubMembershipServiceClient.DeleteMembership(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceDeleteMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembership(MembershipName, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteMembership(MembershipName name, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Operation<Empty, OperationMetadata> response = gkeHubMembershipServiceClient.DeleteMembership(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceDeleteMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembership(string, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteMembership(string name, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Operation<Empty, OperationMetadata> response = gkeHubMembershipServiceClient.DeleteMembership(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceDeleteMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(DeleteMembershipRequest, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(DeleteMembershipRequest request, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.DeleteMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteMembershipRequest request = new DeleteMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        RequestId = "",
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(DeleteMembershipRequest, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(DeleteMembershipRequest request, CancellationToken cancellationToken)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.DeleteMembershipRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteMembershipRequest request = new DeleteMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        RequestId = "",
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(MembershipName, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(MembershipName name, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(MembershipName, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(MembershipName name, CancellationToken cancellationToken)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(string, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(string name, CallSettings callSettings = null)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteMembershipAsync(string, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(string name, CancellationToken cancellationToken)

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud** .
To unregister other clusters, follow the instructions at
<https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster>.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await gkeHubMembershipServiceClient.DeleteMembershipAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceDeleteMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### GenerateConnectManifest(GenerateConnectManifestRequest, CallSettings)

    public virtual GenerateConnectManifestResponse GenerateConnectManifest(GenerateConnectManifestRequest request, CallSettings callSettings = null)

Generates the manifest for deployment of the GKE connect agent.

**This method is used internally by Google-provided libraries.**
Most clients should not need to call this method directly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestResponse` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    GenerateConnectManifestRequest request = new GenerateConnectManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        ConnectAgent = new ConnectAgent(),
        Version = "",
        IsUpgrade = false,
        Registry = "",
        ImagePullSecretContent = ByteString.Empty,
    };
    // Make the request
    GenerateConnectManifestResponse response = gkeHubMembershipServiceClient.GenerateConnectManifest(request);

### GenerateConnectManifestAsync(GenerateConnectManifestRequest, CallSettings)

    public virtual Task<GenerateConnectManifestResponse> GenerateConnectManifestAsync(GenerateConnectManifestRequest request, CallSettings callSettings = null)

Generates the manifest for deployment of the GKE connect agent.

**This method is used internally by Google-provided libraries.**
Most clients should not need to call this method directly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GenerateConnectManifestRequest request = new GenerateConnectManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        ConnectAgent = new ConnectAgent(),
        Version = "",
        IsUpgrade = false,
        Registry = "",
        ImagePullSecretContent = ByteString.Empty,
    };
    // Make the request
    GenerateConnectManifestResponse response = await gkeHubMembershipServiceClient.GenerateConnectManifestAsync(request);

### GenerateConnectManifestAsync(GenerateConnectManifestRequest, CancellationToken)

    public virtual Task<GenerateConnectManifestResponse> GenerateConnectManifestAsync(GenerateConnectManifestRequest request, CancellationToken cancellationToken)

Generates the manifest for deployment of the GKE connect agent.

**This method is used internally by Google-provided libraries.**
Most clients should not need to call this method directly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateConnectManifestResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GenerateConnectManifestRequest request = new GenerateConnectManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        ConnectAgent = new ConnectAgent(),
        Version = "",
        IsUpgrade = false,
        Registry = "",
        ImagePullSecretContent = ByteString.Empty,
    };
    // Make the request
    GenerateConnectManifestResponse response = await gkeHubMembershipServiceClient.GenerateConnectManifestAsync(request);

### GenerateExclusivityManifest(GenerateExclusivityManifestRequest, CallSettings)

    public virtual GenerateExclusivityManifestResponse GenerateExclusivityManifest(GenerateExclusivityManifestRequest request, CallSettings callSettings = null)

GenerateExclusivityManifest generates the manifests to update the
exclusivity artifacts in the cluster if needed.

Exclusivity artifacts include the Membership custom resource definition
(CRD) and the singleton Membership custom resource (CR). Combined with
ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes
cluster is only registered to a single GKE Hub.

The Membership CRD is versioned, and may require conversion when the GKE
Hub API server begins serving a newer version of the CRD and
corresponding CR. The response will be the converted CRD and CR if there
are any differences between the versions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestResponse` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    GenerateExclusivityManifestRequest request = new GenerateExclusivityManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        CrdManifest = "",
        CrManifest = "",
    };
    // Make the request
    GenerateExclusivityManifestResponse response = gkeHubMembershipServiceClient.GenerateExclusivityManifest(request);

### GenerateExclusivityManifestAsync(GenerateExclusivityManifestRequest, CallSettings)

    public virtual Task<GenerateExclusivityManifestResponse> GenerateExclusivityManifestAsync(GenerateExclusivityManifestRequest request, CallSettings callSettings = null)

GenerateExclusivityManifest generates the manifests to update the
exclusivity artifacts in the cluster if needed.

Exclusivity artifacts include the Membership custom resource definition
(CRD) and the singleton Membership custom resource (CR). Combined with
ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes
cluster is only registered to a single GKE Hub.

The Membership CRD is versioned, and may require conversion when the GKE
Hub API server begins serving a newer version of the CRD and
corresponding CR. The response will be the converted CRD and CR if there
are any differences between the versions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GenerateExclusivityManifestRequest request = new GenerateExclusivityManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        CrdManifest = "",
        CrManifest = "",
    };
    // Make the request
    GenerateExclusivityManifestResponse response = await gkeHubMembershipServiceClient.GenerateExclusivityManifestAsync(request);

### GenerateExclusivityManifestAsync(GenerateExclusivityManifestRequest, CancellationToken)

    public virtual Task<GenerateExclusivityManifestResponse> GenerateExclusivityManifestAsync(GenerateExclusivityManifestRequest request, CancellationToken cancellationToken)

GenerateExclusivityManifest generates the manifests to update the
exclusivity artifacts in the cluster if needed.

Exclusivity artifacts include the Membership custom resource definition
(CRD) and the singleton Membership custom resource (CR). Combined with
ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes
cluster is only registered to a single GKE Hub.

The Membership CRD is versioned, and may require conversion when the GKE
Hub API server begins serving a newer version of the CRD and
corresponding CR. The response will be the converted CRD and CR if there
are any differences between the versions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GenerateExclusivityManifestResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GenerateExclusivityManifestRequest request = new GenerateExclusivityManifestRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        CrdManifest = "",
        CrManifest = "",
    };
    // Make the request
    GenerateExclusivityManifestResponse response = await gkeHubMembershipServiceClient.GenerateExclusivityManifestAsync(request);

### GetMembership(GetMembershipRequest, CallSettings)

    public virtual Membership GetMembership(GetMembershipRequest request, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GetMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    GetMembershipRequest request = new GetMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    };
    // Make the request
    Membership response = gkeHubMembershipServiceClient.GetMembership(request);

### GetMembership(MembershipName, CallSettings)

    public virtual Membership GetMembership(MembershipName name, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Membership response = gkeHubMembershipServiceClient.GetMembership(name);

### GetMembership(string, CallSettings)

    public virtual Membership GetMembership(string name, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Membership response = gkeHubMembershipServiceClient.GetMembership(name);

### GetMembershipAsync(GetMembershipRequest, CallSettings)

    public virtual Task<Membership> GetMembershipAsync(GetMembershipRequest request, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GetMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetMembershipRequest request = new GetMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    };
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(request);

### GetMembershipAsync(GetMembershipRequest, CancellationToken)

    public virtual Task<Membership> GetMembershipAsync(GetMembershipRequest request, CancellationToken cancellationToken)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GetMembershipRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetMembershipRequest request = new GetMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    };
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(request);

### GetMembershipAsync(MembershipName, CallSettings)

    public virtual Task<Membership> GetMembershipAsync(MembershipName name, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(name);

### GetMembershipAsync(MembershipName, CancellationToken)

    public virtual Task<Membership> GetMembershipAsync(MembershipName name, CancellationToken cancellationToken)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(name);

### GetMembershipAsync(string, CallSettings)

    public virtual Task<Membership> GetMembershipAsync(string name, CallSettings callSettings = null)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(name);

### GetMembershipAsync(string, CancellationToken)

    public virtual Task<Membership> GetMembershipAsync(string name, CancellationToken cancellationToken)

Gets the details of a Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    // Make the request
    Membership response = await gkeHubMembershipServiceClient.GetMembershipAsync(name);

### ListMemberships(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListMembershipsResponse, Membership> ListMemberships(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMemberships(parent);

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

### ListMemberships(ListMembershipsRequest, CallSettings)

    public virtual PagedEnumerable<ListMembershipsResponse, Membership> ListMemberships(ListMembershipsRequest request, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    ListMembershipsRequest request = new ListMembershipsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMemberships(request);

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

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

    public virtual PagedEnumerable<ListMembershipsResponse, Membership> ListMemberships(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMemberships(parent);

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

### ListMembershipsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListMembershipsResponse, Membership> ListMembershipsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable asynchronous sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMembershipsAsync(parent);

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

### ListMembershipsAsync(ListMembershipsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListMembershipsResponse, Membership> ListMembershipsAsync(ListMembershipsRequest request, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable asynchronous sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListMembershipsRequest request = new ListMembershipsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMembershipsAsync(request);

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

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

    public virtual PagedAsyncEnumerable<ListMembershipsResponse, Membership> ListMembershipsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Memberships in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` 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` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ListMembershipsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` | A pageable asynchronous sequence of [Membership](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership) resources. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListMembershipsResponse, Membership> response = gkeHubMembershipServiceClient.ListMembershipsAsync(parent);

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

### PollOnceCreateMembership(string, CallSettings)

    public virtual Operation<Membership, OperationMetadata> PollOnceCreateMembership(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `CreateMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The result of polling the operation. |

### PollOnceCreateMembershipAsync(string, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> PollOnceCreateMembershipAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`CreateMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceDeleteMembership(string, CallSettings)

    public virtual Operation<Empty, OperationMetadata> PollOnceDeleteMembership(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DeleteMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The result of polling the operation. |

### PollOnceDeleteMembershipAsync(string, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteMembershipAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`DeleteMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceUpdateMembership(string, CallSettings)

    public virtual Operation<Membership, OperationMetadata> PollOnceUpdateMembership(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `UpdateMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The result of polling the operation. |

### PollOnceUpdateMembershipAsync(string, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> PollOnceUpdateMembershipAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`UpdateMembership`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient#Google_Cloud_GkeHub_V1Beta1_GkeHubMembershipServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient#Google_Cloud_GkeHub_V1Beta1_GkeHubMembershipServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.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.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient#Google_Cloud_GkeHub_V1Beta1_GkeHubMembershipServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.GkeHubMembershipServiceClient#Google_Cloud_GkeHub_V1Beta1_GkeHubMembershipServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateMembership(MembershipName, Membership, FieldMask, CallSettings)

    public virtual Operation<Membership, OperationMetadata> UpdateMembership(MembershipName name, Membership resource, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.UpdateMembership(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceUpdateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembership(UpdateMembershipRequest, CallSettings)

    public virtual Operation<Membership, OperationMetadata> UpdateMembership(UpdateMembershipRequest request, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.UpdateMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    UpdateMembershipRequest request = new UpdateMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        UpdateMask = new FieldMask(),
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.UpdateMembership(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceUpdateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembership(string, Membership, FieldMask, CallSettings)

    public virtual Operation<Membership, OperationMetadata> UpdateMembership(string name, Membership resource, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = gkeHubMembershipServiceClient.UpdateMembership(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = gkeHubMembershipServiceClient.PollOnceUpdateMembership(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(MembershipName, Membership, FieldMask, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(MembershipName, Membership, FieldMask, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.MembershipName` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(UpdateMembershipRequest, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(UpdateMembershipRequest request, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.UpdateMembershipRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateMembershipRequest request = new UpdateMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        UpdateMask = new FieldMask(),
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(UpdateMembershipRequest, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(UpdateMembershipRequest request, CancellationToken cancellationToken)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.UpdateMembershipRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateMembershipRequest request = new UpdateMembershipRequest
    {
        MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
        UpdateMask = new FieldMask(),
        Resource = new Membership(),
        RequestId = "",
    };
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(string, Membership, FieldMask, CallSettings)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(string name, Membership resource, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### UpdateMembershipAsync(string, Membership, FieldMask, CancellationToken)

    public virtual Task<Operation<Membership, OperationMetadata>> UpdateMembershipAsync(string name, Membership resource, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing Membership.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` |
| `resource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membership` Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "\*", fully replaces all user-modifiable fields to match `resource`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Mask of fields to update. At least one field path must be specified in this mask. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.Membershiphttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
    Membership resource = new Membership();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Membership, OperationMetadata> response = await gkeHubMembershipServiceClient.UpdateMembershipAsync(name, resource, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Membership, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Membership result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Membership, OperationMetadata> retrievedResponse = await gkeHubMembershipServiceClient.PollOnceUpdateMembershipAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Membership retrievedResult = retrievedResponse.Result;
    }

### ValidateExclusivity(ValidateExclusivityRequest, CallSettings)

    public virtual ValidateExclusivityResponse ValidateExclusivity(ValidateExclusivityRequest request, CallSettings callSettings = null)

ValidateExclusivity validates the state of exclusivity in the cluster.
The validation does not depend on an existing Hub membership resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityResponse` | The RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = GkeHubMembershipServiceClient.Create();
    // Initialize request argument(s)
    ValidateExclusivityRequest request = new ValidateExclusivityRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CrManifest = "",
        IntendedMembership = "",
    };
    // Make the request
    ValidateExclusivityResponse response = gkeHubMembershipServiceClient.ValidateExclusivity(request);

### ValidateExclusivityAsync(ValidateExclusivityRequest, CallSettings)

    public virtual Task<ValidateExclusivityResponse> ValidateExclusivityAsync(ValidateExclusivityRequest request, CallSettings callSettings = null)

ValidateExclusivity validates the state of exclusivity in the cluster.
The validation does not depend on an existing Hub membership resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    ValidateExclusivityRequest request = new ValidateExclusivityRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CrManifest = "",
        IntendedMembership = "",
    };
    // Make the request
    ValidateExclusivityResponse response = await gkeHubMembershipServiceClient.ValidateExclusivityAsync(request);

### ValidateExclusivityAsync(ValidateExclusivityRequest, CancellationToken)

    public virtual Task<ValidateExclusivityResponse> ValidateExclusivityAsync(ValidateExclusivityRequest request, CancellationToken cancellationToken)

ValidateExclusivity validates the state of exclusivity in the cluster.
The validation does not depend on an existing Hub membership resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.ValidateExclusivityResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    GkeHubMembershipServiceClient gkeHubMembershipServiceClient = await GkeHubMembershipServiceClient.CreateAsync();
    // Initialize request argument(s)
    ValidateExclusivityRequest request = new ValidateExclusivityRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CrManifest = "",
        IntendedMembership = "",
    };
    // Make the request
    ValidateExclusivityResponse response = await gkeHubMembershipServiceClient.ValidateExclusivityAsync(request);