Cloud Workstations v1 API - Class WorkstationConfigName (1.0.0-beta01)

public sealed class WorkstationConfigName : IResourceName, IEquatable<WorkstationConfigName>

Reference documentation and code samples for the Cloud Workstations v1 API class WorkstationConfigName.

Resource name for the WorkstationConfig resource.

Inheritance

object > WorkstationConfigName

Namespace

Google.Cloud.Workstations.V1

Assembly

Google.Cloud.Workstations.V1.dll

Constructors

WorkstationConfigName(string, string, string, string)

public WorkstationConfigName(string projectId, string locationId, string workstationClusterId, string workstationConfigId)

Constructs a new instance of a WorkstationConfigName class from the component parts of pattern

projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

workstationClusterIdstring

The WorkstationCluster ID. Must not be null or empty.

workstationConfigIdstring

The WorkstationConfig 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
TypeDescription
bool

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 WorkstationConfigName.ResourceNameType Type { get; }

The WorkstationConfigName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
WorkstationConfigNameResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

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

Property Value
TypeDescription
UnparsedResourceName

WorkstationClusterId

public string WorkstationClusterId { get; }

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

Property Value
TypeDescription
string

WorkstationConfigId

public string WorkstationConfigId { get; }

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

Property Value
TypeDescription
string

Methods

Format(string, string, string, string)

public static string Format(string projectId, string locationId, string workstationClusterId, string workstationConfigId)

Formats the IDs into the string representation of this WorkstationConfigName with pattern projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config} .

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

workstationClusterIdstring

The WorkstationCluster ID. Must not be null or empty.

workstationConfigIdstring

The WorkstationConfig ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this WorkstationConfigName with pattern projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config} .

FormatProjectLocationWorkstationClusterWorkstationConfig(string, string, string, string)

public static string FormatProjectLocationWorkstationClusterWorkstationConfig(string projectId, string locationId, string workstationClusterId, string workstationConfigId)

Formats the IDs into the string representation of this WorkstationConfigName with pattern projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config} .

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

workstationClusterIdstring

The WorkstationCluster ID. Must not be null or empty.

workstationConfigIdstring

The WorkstationConfig ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this WorkstationConfigName with pattern projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config} .

FromProjectLocationWorkstationClusterWorkstationConfig(string, string, string, string)

public static WorkstationConfigName FromProjectLocationWorkstationClusterWorkstationConfig(string projectId, string locationId, string workstationClusterId, string workstationConfigId)

Creates a WorkstationConfigName with the pattern projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config} .

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

workstationClusterIdstring

The WorkstationCluster ID. Must not be null or empty.

workstationConfigIdstring

The WorkstationConfig ID. Must not be null or empty.

Returns
TypeDescription
WorkstationConfigName

A new instance of WorkstationConfigName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static WorkstationConfigName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a WorkstationConfigName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
WorkstationConfigName

A new instance of WorkstationConfigName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
TypeDescription
int
Overrides

Parse(string)

public static WorkstationConfigName Parse(string workstationConfigName)

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

Parameter
NameDescription
workstationConfigNamestring

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

Returns
TypeDescription
WorkstationConfigName

The parsed WorkstationConfigName if successful.

Remarks

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

  • projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}

Parse(string, bool)

public static WorkstationConfigName Parse(string workstationConfigName, bool allowUnparsed)

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

Parameters
NameDescription
workstationConfigNamestring

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

allowUnparsedbool

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
WorkstationConfigName

The parsed WorkstationConfigName if successful.

Remarks

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

  • projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}
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 WorkstationConfigName)

public static bool TryParse(string workstationConfigName, out WorkstationConfigName result)

Tries to parse the given resource name string into a new WorkstationConfigName instance.

Parameters
NameDescription
workstationConfigNamestring

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

resultWorkstationConfigName

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

Returns
TypeDescription
bool

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}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}

TryParse(string, bool, out WorkstationConfigName)

public static bool TryParse(string workstationConfigName, bool allowUnparsed, out WorkstationConfigName result)

Tries to parse the given resource name string into a new WorkstationConfigName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
workstationConfigNamestring

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

allowUnparsedbool

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.

resultWorkstationConfigName

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

Returns
TypeDescription
bool

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}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}
Or may be in any format if allowUnparsed is true.

Operators

operator ==(WorkstationConfigName, WorkstationConfigName)

public static bool operator ==(WorkstationConfigName a, WorkstationConfigName b)
Parameters
NameDescription
aWorkstationConfigName
bWorkstationConfigName
Returns
TypeDescription
bool

operator !=(WorkstationConfigName, WorkstationConfigName)

public static bool operator !=(WorkstationConfigName a, WorkstationConfigName b)
Parameters
NameDescription
aWorkstationConfigName
bWorkstationConfigName
Returns
TypeDescription
bool