# Google Cloud for Games v1beta API - Class RealmsServiceClient (2.0.0-beta03)

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

- [2.0.0-beta03 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient)
- [2.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/2.0.0-beta02/Google.Cloud.Gaming.V1Beta.RealmsServiceClient)
- [1.0.0-beta09](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/1.0.0-beta09/Google.Cloud.Gaming.V1Beta.RealmsServiceClient)

    public abstract class RealmsServiceClient

Reference documentation and code samples for the Google Cloud for Games v1beta API class RealmsServiceClient.

RealmsService client wrapper, for convenient use.

## Inheritance

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

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

[RealmsServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClientImpl)

## Namespace

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

## Assembly

Google.Cloud.Gaming.V1Beta.dll

## Remarks

A realm is a grouping of game server clusters that are considered
interchangeable.

## Properties

### CreateRealmOperationsClient

    public virtual OperationsClient CreateRealmOperationsClient { get; }

The long-running operations client for `CreateRealm`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/OperationsClient.g.cs` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the RealmsService service, which is a host of "gameservices.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 RealmsService 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 RealmsService scopes are:

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

<br />

### DeleteRealmOperationsClient

    public virtual OperationsClient DeleteRealmOperationsClient { get; }

The long-running operations client for `DeleteRealm`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/OperationsClient.g.cs` |   |

### GrpcClient

    public virtual RealmsService.RealmsServiceClient GrpcClient { get; }

The underlying gRPC RealmsService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsService.RealmsServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/ServiceMetadata.cs` |   |

### UpdateRealmOperationsClient

    public virtual OperationsClient UpdateRealmOperationsClient { get; }

The long-running operations client for `UpdateRealm`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/OperationsClient.g.cs` |   |

## Methods

### Create()

    public static RealmsServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient` | The task representing the created [RealmsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient). |

### CreateRealm(LocationName, Realm, string, CallSettings)

    public virtual Operation<Realm, OperationMetadata> CreateRealm(LocationName parent, Realm realm, string realmId, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = realmsServiceClient.CreateRealm(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = realmsServiceClient.PollOnceCreateRealm(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealm(CreateRealmRequest, CallSettings)

    public virtual Operation<Realm, OperationMetadata> CreateRealm(CreateRealmRequest request, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.CreateRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    CreateRealmRequest request = new CreateRealmRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        RealmId = "",
        Realm = new Realm(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = realmsServiceClient.CreateRealm(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = realmsServiceClient.PollOnceCreateRealm(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealm(string, Realm, string, CallSettings)

    public virtual Operation<Realm, OperationMetadata> CreateRealm(string parent, Realm realm, string realmId, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = realmsServiceClient.CreateRealm(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = realmsServiceClient.PollOnceCreateRealm(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(LocationName, Realm, string, CallSettings)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(LocationName parent, Realm realm, string realmId, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(LocationName, Realm, string, CancellationToken)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(LocationName parent, Realm realm, string realmId, CancellationToken cancellationToken)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(CreateRealmRequest, CallSettings)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(CreateRealmRequest request, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.CreateRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateRealmRequest request = new CreateRealmRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        RealmId = "",
        Realm = new Realm(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(CreateRealmRequest, CancellationToken)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(CreateRealmRequest request, CancellationToken cancellationToken)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.CreateRealmRequest` 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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateRealmRequest request = new CreateRealmRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        RealmId = "",
        Realm = new Realm(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(string, Realm, string, CallSettings)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(string parent, Realm realm, string realmId, CallSettings callSettings = null)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### CreateRealmAsync(string, Realm, string, CancellationToken)

    public virtual Task<Operation<Realm, OperationMetadata>> CreateRealmAsync(string parent, Realm realm, string realmId, CancellationToken cancellationToken)

Creates a new realm in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm resource to be created. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID of the realm resource to be created. |
| `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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Realm realm = new Realm();
    string realmId = "";
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.CreateRealmAsync(parent, realm, realmId);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceCreateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### DeleteRealm(DeleteRealmRequest, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteRealm(DeleteRealmRequest request, CallSettings callSettings = null)

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.DeleteRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    DeleteRealmRequest request = new DeleteRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = realmsServiceClient.DeleteRealm(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 = realmsServiceClient.PollOnceDeleteRealm(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;
    }

### DeleteRealm(RealmName, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteRealm(RealmName name, CallSettings callSettings = null)

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Operation<Empty, OperationMetadata> response = realmsServiceClient.DeleteRealm(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 = realmsServiceClient.PollOnceDeleteRealm(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;
    }

### DeleteRealm(string, CallSettings)

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

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Operation<Empty, OperationMetadata> response = realmsServiceClient.DeleteRealm(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 = realmsServiceClient.PollOnceDeleteRealm(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;
    }

### DeleteRealmAsync(DeleteRealmRequest, CallSettings)

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

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.DeleteRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteRealmRequest request = new DeleteRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### DeleteRealmAsync(DeleteRealmRequest, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteRealmAsync(DeleteRealmRequest request, CancellationToken cancellationToken)

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.DeleteRealmRequest` 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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteRealmRequest request = new DeleteRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### DeleteRealmAsync(RealmName, CallSettings)

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

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### DeleteRealmAsync(RealmName, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteRealmAsync(RealmName name, CancellationToken cancellationToken)

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### DeleteRealmAsync(string, CallSettings)

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

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### DeleteRealmAsync(string, CancellationToken)

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

Deletes a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to delete. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await realmsServiceClient.DeleteRealmAsync(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 realmsServiceClient.PollOnceDeleteRealmAsync(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;
    }

### GetRealm(GetRealmRequest, CallSettings)

    public virtual Realm GetRealm(GetRealmRequest request, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GetRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    GetRealmRequest request = new GetRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Realm response = realmsServiceClient.GetRealm(request);

### GetRealm(RealmName, CallSettings)

    public virtual Realm GetRealm(RealmName name, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Realm response = realmsServiceClient.GetRealm(name);

### GetRealm(string, CallSettings)

    public virtual Realm GetRealm(string name, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Realm response = realmsServiceClient.GetRealm(name);

### GetRealmAsync(GetRealmRequest, CallSettings)

    public virtual Task<Realm> GetRealmAsync(GetRealmRequest request, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GetRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetRealmRequest request = new GetRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(request);

### GetRealmAsync(GetRealmRequest, CancellationToken)

    public virtual Task<Realm> GetRealmAsync(GetRealmRequest request, CancellationToken cancellationToken)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GetRealmRequest` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetRealmRequest request = new GetRealmRequest
    {
        RealmName = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]"),
    };
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(request);

### GetRealmAsync(RealmName, CallSettings)

    public virtual Task<Realm> GetRealmAsync(RealmName name, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(name);

### GetRealmAsync(RealmName, CancellationToken)

    public virtual Task<Realm> GetRealmAsync(RealmName name, CancellationToken cancellationToken)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    RealmName name = RealmName.FromProjectLocationRealm("[PROJECT]", "[LOCATION]", "[REALM]");
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(name);

### GetRealmAsync(string, CallSettings)

    public virtual Task<Realm> GetRealmAsync(string name, CallSettings callSettings = null)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(name);

### GetRealmAsync(string, CancellationToken)

    public virtual Task<Realm> GetRealmAsync(string name, CancellationToken cancellationToken)

Gets details of a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the realm to retrieve. Uses the form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/realms/[REALM]";
    // Make the request
    Realm response = await realmsServiceClient.GetRealmAsync(name);

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

    public virtual PagedEnumerable<ListRealmsResponse, Realm> ListRealms(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealms(parent);

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

### ListRealms(ListRealmsRequest, CallSettings)

    public virtual PagedEnumerable<ListRealmsResponse, Realm> ListRealms(ListRealmsRequest request, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    ListRealmsRequest request = new ListRealmsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealms(request);

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

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

    public virtual PagedEnumerable<ListRealmsResponse, Realm> ListRealms(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealms(parent);

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

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

    public virtual PagedAsyncEnumerable<ListRealmsResponse, Realm> ListRealmsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable asynchronous sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealmsAsync(parent);

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

### ListRealmsAsync(ListRealmsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListRealmsResponse, Realm> ListRealmsAsync(ListRealmsRequest request, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable asynchronous sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListRealmsRequest request = new ListRealmsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealmsAsync(request);

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

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

    public virtual PagedAsyncEnumerable<ListRealmsResponse, Realm> ListRealmsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists realms in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name. Uses the form: `projects/{project}/locations/{location}`. |
| `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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.ListRealmsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` | A pageable asynchronous sequence of [Realm](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm) resources. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListRealmsResponse, Realm> response = realmsServiceClient.ListRealmsAsync(parent);

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

### PollOnceCreateRealm(string, CallSettings)

    public virtual Operation<Realm, OperationMetadata> PollOnceCreateRealm(string operationName, CallSettings callSettings = null)

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceCreateRealmAsync(string, CallSettings)

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

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceDeleteRealm(string, CallSettings)

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

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceDeleteRealmAsync(string, CallSettings)

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

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceUpdateRealm(string, CallSettings)

    public virtual Operation<Realm, OperationMetadata> PollOnceUpdateRealm(string operationName, CallSettings callSettings = null)

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceUpdateRealmAsync(string, CallSettings)

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

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

| **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://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### PreviewRealmUpdate(PreviewRealmUpdateRequest, CallSettings)

    public virtual PreviewRealmUpdateResponse PreviewRealmUpdate(PreviewRealmUpdateRequest request, CallSettings callSettings = null)

Previews patches to a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateResponse` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    PreviewRealmUpdateRequest request = new PreviewRealmUpdateRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
        PreviewTime = new Timestamp(),
    };
    // Make the request
    PreviewRealmUpdateResponse response = realmsServiceClient.PreviewRealmUpdate(request);

### PreviewRealmUpdateAsync(PreviewRealmUpdateRequest, CallSettings)

    public virtual Task<PreviewRealmUpdateResponse> PreviewRealmUpdateAsync(PreviewRealmUpdateRequest request, CallSettings callSettings = null)

Previews patches to a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    PreviewRealmUpdateRequest request = new PreviewRealmUpdateRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
        PreviewTime = new Timestamp(),
    };
    // Make the request
    PreviewRealmUpdateResponse response = await realmsServiceClient.PreviewRealmUpdateAsync(request);

### PreviewRealmUpdateAsync(PreviewRealmUpdateRequest, CancellationToken)

    public virtual Task<PreviewRealmUpdateResponse> PreviewRealmUpdateAsync(PreviewRealmUpdateRequest request, CancellationToken cancellationToken)

Previews patches to a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateRequest` 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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.PreviewRealmUpdateResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    PreviewRealmUpdateRequest request = new PreviewRealmUpdateRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
        PreviewTime = new Timestamp(),
    };
    // Make the request
    PreviewRealmUpdateResponse response = await realmsServiceClient.PreviewRealmUpdateAsync(request);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient#Google_Cloud_Gaming_V1Beta_RealmsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient#Google_Cloud_Gaming_V1Beta_RealmsServiceClient_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.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient#Google_Cloud_Gaming_V1Beta_RealmsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient#Google_Cloud_Gaming_V1Beta_RealmsServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateRealm(Realm, FieldMask, CallSettings)

    public virtual Operation<Realm, OperationMetadata> UpdateRealm(Realm realm, FieldMask updateMask, CallSettings callSettings = null)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm to be updated. Only fields specified in update_mask are updated. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The update mask applies to the resource. For the `FieldMask` definition, see https: //developers.google.com/protocol-buffers // /docs/reference/google.protobuf#fieldmask |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    Realm realm = new Realm();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Realm, OperationMetadata> response = realmsServiceClient.UpdateRealm(realm, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = realmsServiceClient.PollOnceUpdateRealm(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### UpdateRealm(UpdateRealmRequest, CallSettings)

    public virtual Operation<Realm, OperationMetadata> UpdateRealm(UpdateRealmRequest request, CallSettings callSettings = null)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.UpdateRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = RealmsServiceClient.Create();
    // Initialize request argument(s)
    UpdateRealmRequest request = new UpdateRealmRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = realmsServiceClient.UpdateRealm(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = realmsServiceClient.PollOnceUpdateRealm(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### UpdateRealmAsync(Realm, FieldMask, CallSettings)

    public virtual Task<Operation<Realm, OperationMetadata>> UpdateRealmAsync(Realm realm, FieldMask updateMask, CallSettings callSettings = null)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm to be updated. Only fields specified in update_mask are updated. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The update mask applies to the resource. For the `FieldMask` definition, see https: //developers.google.com/protocol-buffers // /docs/reference/google.protobuf#fieldmask |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    Realm realm = new Realm();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.UpdateRealmAsync(realm, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceUpdateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### UpdateRealmAsync(Realm, FieldMask, CancellationToken)

    public virtual Task<Operation<Realm, OperationMetadata>> UpdateRealmAsync(Realm realm, FieldMask updateMask, CancellationToken cancellationToken)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realm` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realm` Required. The realm to be updated. Only fields specified in update_mask are updated. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The update mask applies to the resource. For the `FieldMask` definition, see https: //developers.google.com/protocol-buffers // /docs/reference/google.protobuf#fieldmask |
| `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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    Realm realm = new Realm();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.UpdateRealmAsync(realm, updateMask);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceUpdateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### UpdateRealmAsync(UpdateRealmRequest, CallSettings)

    public virtual Task<Operation<Realm, OperationMetadata>> UpdateRealmAsync(UpdateRealmRequest request, CallSettings callSettings = null)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.UpdateRealmRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateRealmRequest request = new UpdateRealmRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.UpdateRealmAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceUpdateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }

### UpdateRealmAsync(UpdateRealmRequest, CancellationToken)

    public virtual Task<Operation<Realm, OperationMetadata>> UpdateRealmAsync(UpdateRealmRequest request, CancellationToken cancellationToken)

Patches a single realm.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.UpdateRealmRequest` 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://github.com/googleapis/google-cloud-dotnet/blob/abf311d7d0649ce9e47aac5c9bae36cb75a5a218/apis/Google.LongRunning/Google.LongRunning/Operation.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.Realmhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    RealmsServiceClient realmsServiceClient = await RealmsServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateRealmRequest request = new UpdateRealmRequest
    {
        Realm = new Realm(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Operation<Realm, OperationMetadata> response = await realmsServiceClient.UpdateRealmAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Realm, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Realm 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<Realm, OperationMetadata> retrievedResponse = await realmsServiceClient.PollOnceUpdateRealmAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Realm retrievedResult = retrievedResponse.Result;
    }