Google Cloud Dataproc v1 API - Class NodeGroupName (5.9.0)

public sealed class NodeGroupName : IResourceName, IEquatable<NodeGroupName>

Reference documentation and code samples for the Google Cloud Dataproc v1 API class NodeGroupName.

Resource name for the NodeGroup resource.

Inheritance

object > NodeGroupName

Namespace

Google.Cloud.Dataproc.V1

Assembly

Google.Cloud.Dataproc.V1.dll

Constructors

NodeGroupName(string, string, string, string)

public NodeGroupName(string projectId, string regionId, string clusterId, string nodeGroupId)

Constructs a new instance of a NodeGroupName class from the component parts of pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

regionIdstring

The Region ID. Must not be null or empty.

clusterIdstring

The Cluster ID. Must not be null or empty.

nodeGroupIdstring

The NodeGroup ID. Must not be null or empty.

Properties

ClusterId

public string ClusterId { get; }

The Cluster 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
bool

NodeGroupId

public string NodeGroupId { get; }

The NodeGroup 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

RegionId

public string RegionId { get; }

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

Property Value
TypeDescription
string

Type

public NodeGroupName.ResourceNameType Type { get; }

The NodeGroupName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
NodeGroupNameResourceNameType

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, string)

public static string Format(string projectId, string regionId, string clusterId, string nodeGroupId)

Formats the IDs into the string representation of this NodeGroupName with pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}.

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

regionIdstring

The Region ID. Must not be null or empty.

clusterIdstring

The Cluster ID. Must not be null or empty.

nodeGroupIdstring

The NodeGroup ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this NodeGroupName with pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}.

FormatProjectRegionClusterNodeGroup(string, string, string, string)

public static string FormatProjectRegionClusterNodeGroup(string projectId, string regionId, string clusterId, string nodeGroupId)

Formats the IDs into the string representation of this NodeGroupName with pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}.

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

regionIdstring

The Region ID. Must not be null or empty.

clusterIdstring

The Cluster ID. Must not be null or empty.

nodeGroupIdstring

The NodeGroup ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this NodeGroupName with pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}.

FromProjectRegionClusterNodeGroup(string, string, string, string)

public static NodeGroupName FromProjectRegionClusterNodeGroup(string projectId, string regionId, string clusterId, string nodeGroupId)

Creates a NodeGroupName with the pattern projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}.

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

regionIdstring

The Region ID. Must not be null or empty.

clusterIdstring

The Cluster ID. Must not be null or empty.

nodeGroupIdstring

The NodeGroup ID. Must not be null or empty.

Returns
TypeDescription
NodeGroupName

A new instance of NodeGroupName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static NodeGroupName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a NodeGroupName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
NodeGroupName

A new instance of NodeGroupName 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 NodeGroupName Parse(string nodeGroupName)

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

Parameter
NameDescription
nodeGroupNamestring

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

Returns
TypeDescription
NodeGroupName

The parsed NodeGroupName if successful.

Remarks

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

  • projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}

Parse(string, bool)

public static NodeGroupName Parse(string nodeGroupName, bool allowUnparsed)

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

Parameters
NameDescription
nodeGroupNamestring

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
NodeGroupName

The parsed NodeGroupName if successful.

Remarks

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

  • projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}
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 NodeGroupName)

public static bool TryParse(string nodeGroupName, out NodeGroupName result)

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

Parameters
NameDescription
nodeGroupNamestring

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

resultNodeGroupName

When this method returns, the parsed NodeGroupName, 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}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}

TryParse(string, bool, out NodeGroupName)

public static bool TryParse(string nodeGroupName, bool allowUnparsed, out NodeGroupName result)

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

Parameters
NameDescription
nodeGroupNamestring

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.

resultNodeGroupName

When this method returns, the parsed NodeGroupName, 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}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}
Or may be in any format if allowUnparsed is true.

Operators

operator ==(NodeGroupName, NodeGroupName)

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

Determines whether two specified resource names have the same value.

Parameters
NameDescription
aNodeGroupName

The first resource name to compare, or null.

bNodeGroupName

The second resource name to compare, or null.

Returns
TypeDescription
bool

true if the value of a is the same as the value of b; otherwise, false.

operator !=(NodeGroupName, NodeGroupName)

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

Determines whether two specified resource names have different values.

Parameters
NameDescription
aNodeGroupName

The first resource name to compare, or null.

bNodeGroupName

The second resource name to compare, or null.

Returns
TypeDescription
bool

true if the value of a is different from the value of b; otherwise, false.