# Google Cloud for Games v1beta API - Class RealmName (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.RealmName)
- [2.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/2.0.0-beta02/Google.Cloud.Gaming.V1Beta.RealmName)
- [1.0.0-beta09](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/1.0.0-beta09/Google.Cloud.Gaming.V1Beta.RealmName)

    public sealed class RealmName : IResourceName, IEquatable<RealmName>

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

Resource name for the `Realm` resource.

## Inheritance

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

## Implements

[IResourceName](https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName)

## Inherited Members

[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)

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

## Constructors

### RealmName(string, string, string)

    public RealmName(string projectId, string locationId, string realmId)

Constructs a new instance of a [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) class from the component parts of pattern
`projects/{project}/locations/{location}/realms/{realm}`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Realm` ID. Must not be `null` or empty. |

## Properties

### IsKnownPattern

    public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

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

### LocationId

    public string LocationId { get; }

The `Location` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### ProjectId

    public string ProjectId { get; }

The `Project` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### RealmId

    public string RealmId { get; }

The `Realm` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### Type

    public RealmName.ResourceNameType Type { get; }

The [RealmName.ResourceNameType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName.ResourceNameType) of the contained resource name.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmNamehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName.ResourceNameType` |   |

### UnparsedResource

    public UnparsedResourceName UnparsedResource { get; }

The contained [UnparsedResourceName](https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/UnparsedResourceName.cs). Only non-`null` if this instance contains an
unparsed resource name.

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

## Methods

### Format(string, string, string)

    public static string Format(string projectId, string locationId, string realmId)

Formats the IDs into the string representation of this [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) with pattern
`projects/{project}/locations/{location}/realms/{realm}`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Realm` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of this [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) with pattern `projects/{project}/locations/{location}/realms/{realm}`. |

### FormatProjectLocationRealm(string, string, string)

    public static string FormatProjectLocationRealm(string projectId, string locationId, string realmId)

Formats the IDs into the string representation of this [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) with pattern
`projects/{project}/locations/{location}/realms/{realm}`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Realm` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of this [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) with pattern `projects/{project}/locations/{location}/realms/{realm}`. |

### FromProjectLocationRealm(string, string, string)

    public static RealmName FromProjectLocationRealm(string projectId, string locationId, string realmId)

Creates a [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) with the pattern `projects/{project}/locations/{location}/realms/{realm}`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `realmId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Realm` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` | A new instance of [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) constructed from the provided ids. |

### FromUnparsed(UnparsedResourceName)

    public static RealmName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) containing an unparsed resource name.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `unparsedResourceName` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/UnparsedResourceName.cs` The unparsed resource name. Must not be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` | A new instance of [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) containing the provided `unparsedResourceName`. |

### GetHashCode()

    public override int GetHashCode()

Returns a hash code for this resource name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### Parse(string)

    public static RealmName Parse(string realmName)

Parses the given resource name string into a new [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `realmName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |

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

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/realms/{realm}`

<br />

### Parse(string, bool)

    public static RealmName Parse(string realmName, bool allowUnparsed)

Parses the given resource name string into a new [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) instance; optionally allowing an
unparseable resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realmName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `allowUnparsed` | `https://learn.microsoft.com/dotnet/api/system.boolean` If `true` will successfully store an unparseable resource name into the [UnparsedResource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName#Google_Cloud_Gaming_V1Beta_RealmName_UnparsedResource) property; otherwise will throw an [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) if an unparseable resource name is specified. |

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

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/realms/{realm}`

Or may be in any format if `allowUnparsed` is `true`.

<br />

### ToString()

    public override string ToString()

The string representation of the resource name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of the resource name. |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### TryParse(string, out RealmName)

    public static bool TryParse(string realmName, out RealmName result)

Tries to parse the given resource name string into a new [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realmName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `result` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` When this method returns, the parsed [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName), or `null` if parsing failed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` | `true` if the name was parsed successfully; `false` otherwise. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/realms/{realm}`

<br />

### TryParse(string, bool, out RealmName)

    public static bool TryParse(string realmName, bool allowUnparsed, out RealmName result)

Tries to parse the given resource name string into a new [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName) instance; optionally
allowing an unparseable resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `realmName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `allowUnparsed` | `https://learn.microsoft.com/dotnet/api/system.boolean` If `true` will successfully store an unparseable resource name into the [UnparsedResource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName#Google_Cloud_Gaming_V1Beta_RealmName_UnparsedResource) property; otherwise will throw an [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) if an unparseable resource name is specified. |
| `result` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` When this method returns, the parsed [RealmName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName), or `null` if parsing failed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` | `true` if the name was parsed successfully; `false` otherwise. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/realms/{realm}`

Or may be in any format if `allowUnparsed` is `true`.

<br />

## Operators

### operator ==(RealmName, RealmName)

    public static bool operator ==(RealmName a, RealmName b)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `a` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` |
| `b` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### operator !=(RealmName, RealmName)

    public static bool operator !=(RealmName a, RealmName b)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `a` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` |
| `b` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |