public sealed class PodName : IResourceName, IEquatable<PodName>Reference documentation and code samples for the Cluster Director v1beta API class PodName.
Resource name for the Pod resource.
Namespace
Google.Cloud.HypercomputeCluster.V1BetaAssembly
Google.Cloud.HypercomputeCluster.V1Beta.dll
Constructors
PodName(string, string, string, string, string)
public PodName(string projectId, string locationId, string clusterId, string namespaceId, string podId)Constructs a new instance of a PodName class from the component parts of pattern
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
clusterId |
stringThe |
namespaceId |
stringThe |
podId |
stringThe |
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 |
|
LocationId
public string LocationId { get; }The Location ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
NamespaceId
public string NamespaceId { get; }The Namespace ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
PodId
public string PodId { get; }The Pod 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 |
|
Type
public PodName.ResourceNameType Type { get; }The PodName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
PodNameResourceNameType |
|
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, string)
public static string Format(string projectId, string locationId, string clusterId, string namespaceId, string podId)Formats the IDs into the string representation of this PodName with pattern
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
clusterId |
stringThe |
namespaceId |
stringThe |
podId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this PodName with pattern
|
FormatProjectLocationClusterNamespacePod(string, string, string, string, string)
public static string FormatProjectLocationClusterNamespacePod(string projectId, string locationId, string clusterId, string namespaceId, string podId)Formats the IDs into the string representation of this PodName with pattern
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
clusterId |
stringThe |
namespaceId |
stringThe |
podId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this PodName with pattern
|
FromProjectLocationClusterNamespacePod(string, string, string, string, string)
public static PodName FromProjectLocationClusterNamespacePod(string projectId, string locationId, string clusterId, string namespaceId, string podId)Creates a PodName with the pattern
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
clusterId |
stringThe |
namespaceId |
stringThe |
podId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
PodName |
A new instance of PodName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static PodName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a PodName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
PodName |
A new instance of PodName containing the provided |
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static PodName Parse(string podName)Parses the given resource name string into a new PodName instance.
| Parameter | |
|---|---|
| Name | Description |
podName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
PodName |
The parsed PodName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}
Parse(string, bool)
public static PodName Parse(string podName, bool allowUnparsed)Parses the given resource name string into a new PodName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
podName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
PodName |
The parsed PodName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}
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. |
TryParse(string, out PodName)
public static bool TryParse(string podName, out PodName result)Tries to parse the given resource name string into a new PodName instance.
| Parameters | |
|---|---|
| Name | Description |
podName |
stringThe resource name in string form. Must not be |
result |
PodNameWhen this method returns, the parsed PodName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}
TryParse(string, bool, out PodName)
public static bool TryParse(string podName, bool allowUnparsed, out PodName result)Tries to parse the given resource name string into a new PodName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
podName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
PodNameWhen this method returns, the parsed PodName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}
Or may be in any format if allowUnparsed is true.
Operators
operator ==(PodName, PodName)
public static bool operator ==(PodName a, PodName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
PodNameThe first resource name to compare, or null. |
b |
PodNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(PodName, PodName)
public static bool operator !=(PodName a, PodName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
PodNameThe first resource name to compare, or null. |
b |
PodNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |