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

    public sealed class GameServerDeploymentName : IResourceName, IEquatable<GameServerDeploymentName>

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

Resource name for the `GameServerDeployment` resource.

## Inheritance

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

## 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)[GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName)

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

### GameServerDeploymentName(string, string, string)

    public GameServerDeploymentName(string projectId, string locationId, string deploymentId)

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

| **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. |
| `deploymentId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Deployment` ID. Must not be `null` or empty. |

## Properties

### DeploymentId

    public string DeploymentId { get; }

The `Deployment` 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` |   |

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

### Type

    public GameServerDeploymentName.ResourceNameType Type { get; }

The [GameServerDeploymentName.ResourceNameType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName.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.GameServerDeploymentNamehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName.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 deploymentId)

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

| **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. |
| `deploymentId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Deployment` ID. Must not be `null` or empty. |

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

### FormatProjectLocationDeployment(string, string, string)

    public static string FormatProjectLocationDeployment(string projectId, string locationId, string deploymentId)

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

| **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. |
| `deploymentId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Deployment` ID. Must not be `null` or empty. |

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

### FromProjectLocationDeployment(string, string, string)

    public static GameServerDeploymentName FromProjectLocationDeployment(string projectId, string locationId, string deploymentId)

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

| **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. |
| `deploymentId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Deployment` 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.GameServerDeploymentName` | A new instance of [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName) constructed from the provided ids. |

### FromUnparsed(UnparsedResourceName)

    public static GameServerDeploymentName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName) 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.GameServerDeploymentName` | A new instance of [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName) 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 GameServerDeploymentName Parse(string gameServerDeploymentName)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `gameServerDeploymentName` | `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.GameServerDeploymentName` | The parsed [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName) if successful. |

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

- `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`

<br />

### Parse(string, bool)

    public static GameServerDeploymentName Parse(string gameServerDeploymentName, bool allowUnparsed)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `gameServerDeploymentName` | `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.GameServerDeploymentName#Google_Cloud_Gaming_V1Beta_GameServerDeploymentName_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.GameServerDeploymentName` | The parsed [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName) if successful. |

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

- `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`

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 GameServerDeploymentName)

    public static bool TryParse(string gameServerDeploymentName, out GameServerDeploymentName result)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `gameServerDeploymentName` | `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.GameServerDeploymentName` When this method returns, the parsed [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName), 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}/gameServerDeployments/{deployment}`

<br />

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

    public static bool TryParse(string gameServerDeploymentName, bool allowUnparsed, out GameServerDeploymentName result)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `gameServerDeploymentName` | `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.GameServerDeploymentName#Google_Cloud_Gaming_V1Beta_GameServerDeploymentName_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.GameServerDeploymentName` When this method returns, the parsed [GameServerDeploymentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentName), 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}/gameServerDeployments/{deployment}`

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

<br />

## Operators

### operator ==(GameServerDeploymentName, GameServerDeploymentName)

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

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

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

### operator !=(GameServerDeploymentName, GameServerDeploymentName)

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

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

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