Google Cloud Dataproc v1 API - Class NodeGroupName (5.2.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
Boolean

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
NodeGroupName.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, 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
Int32
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, Boolean)

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.

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
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
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}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}

TryParse(String, Boolean, 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.

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.

resultNodeGroupName

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

Operators

Equality(NodeGroupName, NodeGroupName)

public static bool operator ==(NodeGroupName a, NodeGroupName b)
Parameters
NameDescription
aNodeGroupName
bNodeGroupName
Returns
TypeDescription
Boolean

Inequality(NodeGroupName, NodeGroupName)

public static bool operator !=(NodeGroupName a, NodeGroupName b)
Parameters
NameDescription
aNodeGroupName
bNodeGroupName
Returns
TypeDescription
Boolean