Google Cloud Dataproc v1 API - Class NodeGroupName (5.14.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
Name Description
projectId string

The Project ID. Must not be null or empty.

regionId string

The Region ID. Must not be null or empty.

clusterId string

The Cluster ID. Must not be null or empty.

nodeGroupId string

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
Type Description
string

IsKnownPattern

public bool IsKnownPattern { get; }

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

Property Value
Type Description
bool

NodeGroupId

public string NodeGroupId { get; }

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

Property Value
Type Description
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
string

RegionId

public string RegionId { get; }

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

Property Value
Type Description
string

Type

public NodeGroupName.ResourceNameType Type { get; }

The NodeGroupName.ResourceNameType of the contained resource name.

Property Value
Type Description
NodeGroupNameResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

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

Property Value
Type Description
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
Name Description
projectId string

The Project ID. Must not be null or empty.

regionId string

The Region ID. Must not be null or empty.

clusterId string

The Cluster ID. Must not be null or empty.

nodeGroupId string

The NodeGroup ID. Must not be null or empty.

Returns
Type Description
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
Name Description
projectId string

The Project ID. Must not be null or empty.

regionId string

The Region ID. Must not be null or empty.

clusterId string

The Cluster ID. Must not be null or empty.

nodeGroupId string

The NodeGroup ID. Must not be null or empty.

Returns
Type Description
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
Name Description
projectId string

The Project ID. Must not be null or empty.

regionId string

The Region ID. Must not be null or empty.

clusterId string

The Cluster ID. Must not be null or empty.

nodeGroupId string

The NodeGroup ID. Must not be null or empty.

Returns
Type Description
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
Name Description
unparsedResourceName UnparsedResourceName

The unparsed resource name. Must not be null.

Returns
Type Description
NodeGroupName

A new instance of NodeGroupName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
Type Description
int
Overrides

Parse(string)

public static NodeGroupName Parse(string nodeGroupName)

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

Parameter
Name Description
nodeGroupName string

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

Returns
Type Description
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
Name Description
nodeGroupName string

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

allowUnparsed bool

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
Type Description
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
Type Description
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
Name Description
nodeGroupName string

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

result NodeGroupName

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

Returns
Type Description
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
Name Description
nodeGroupName string

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

allowUnparsed bool

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.

result NodeGroupName

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

Returns
Type Description
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
Name Description
a NodeGroupName

The first resource name to compare, or null.

b NodeGroupName

The second resource name to compare, or null.

Returns
Type Description
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
Name Description
a NodeGroupName

The first resource name to compare, or null.

b NodeGroupName

The second resource name to compare, or null.

Returns
Type Description
bool

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