Class GameServerDeploymentName (1.1.0)

public sealed class GameServerDeploymentName : IResourceName, IEquatable<GameServerDeploymentName>

Resource name for the GameServerDeployment resource.

Inheritance

Object > GameServerDeploymentName

Namespace

Google.Cloud.Gaming.V1

Assembly

Google.Cloud.Gaming.V1.dll

Constructors

GameServerDeploymentName(String, String, String)

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

Constructs a new instance of a GameServerDeploymentName class from the component parts of pattern projects/{project}/locations/{location}/gameServerDeployments/{deployment}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

deploymentIdString

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
TypeDescription
String

IsKnownPattern

public bool IsKnownPattern { get; }

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

Property Value
TypeDescription
Boolean

LocationId

public string LocationId { get; }

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

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

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

Property Value
TypeDescription
String

Type

public GameServerDeploymentName.ResourceNameType Type { get; }

The GameServerDeploymentName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
GameServerDeploymentName.ResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

The contained UnparsedResourceName. Only non-null if this instance contains an unparsed resource name.

Property Value
TypeDescription
UnparsedResourceName

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 with pattern projects/{project}/locations/{location}/gameServerDeployments/{deployment}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

deploymentIdString

The Deployment ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this 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 with pattern projects/{project}/locations/{location}/gameServerDeployments/{deployment}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

deploymentIdString

The Deployment ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this 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 with the pattern projects/{project}/locations/{location}/gameServerDeployments/{deployment}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

deploymentIdString

The Deployment ID. Must not be null or empty.

Returns
TypeDescription
GameServerDeploymentName

A new instance of GameServerDeploymentName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static GameServerDeploymentName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a GameServerDeploymentName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
GameServerDeploymentName

A new instance of GameServerDeploymentName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
TypeDescription
Int32
Overrides

Parse(String)

public static GameServerDeploymentName Parse(string gameServerDeploymentName)

Parses the given resource name string into a new GameServerDeploymentName instance.

Parameter
NameDescription
gameServerDeploymentNameString

The resource name in string form. Must not be null.

Returns
TypeDescription
GameServerDeploymentName

The parsed GameServerDeploymentName if successful.

Remarks

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

  • projects/{project}/locations/{location}/gameServerDeployments/{deployment}

Parse(String, Boolean)

public static GameServerDeploymentName Parse(string gameServerDeploymentName, bool allowUnparsed)

Parses the given resource name string into a new GameServerDeploymentName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
gameServerDeploymentNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

Returns
TypeDescription
GameServerDeploymentName

The parsed 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.

ToString()

public override string ToString()

The string representation of the resource name.

Returns
TypeDescription
String

The string representation of the resource name.

Overrides

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 instance.

Parameters
NameDescription
gameServerDeploymentNameString

The resource name in string form. Must not be null.

resultGameServerDeploymentName

When this method returns, the parsed GameServerDeploymentName, or null if parsing failed.

Returns
TypeDescription
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}

TryParse(String, Boolean, 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 instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
gameServerDeploymentNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

resultGameServerDeploymentName

When this method returns, the parsed GameServerDeploymentName, or null if parsing failed.

Returns
TypeDescription
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.

Operators

Equality(GameServerDeploymentName, GameServerDeploymentName)

public static bool operator ==(GameServerDeploymentName a, GameServerDeploymentName b)
Parameters
NameDescription
aGameServerDeploymentName
bGameServerDeploymentName
Returns
TypeDescription
Boolean

Inequality(GameServerDeploymentName, GameServerDeploymentName)

public static bool operator !=(GameServerDeploymentName a, GameServerDeploymentName b)
Parameters
NameDescription
aGameServerDeploymentName
bGameServerDeploymentName
Returns
TypeDescription
Boolean