Show / Hide Table of Contents

Class InstanceName

Resource name for the 'instance' resource.

Inheritance
System.Object
InstanceName
Implements
IResourceName
System.IEquatable<InstanceName>
Inherited Members
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Cloud.Bigtable.Admin.V2
Assembly: Google.Cloud.Bigtable.Admin.V2.dll
Syntax
public sealed class InstanceName : IResourceName, IEquatable<InstanceName>

Constructors

InstanceName(String, String)

Constructs a new instance of the InstanceName resource name class from its component parts.

Declaration
public InstanceName(string projectId, string instanceId)
Parameters
Type Name Description
System.String projectId

The project ID. Must not be null.

System.String instanceId

The instance ID. Must not be null.

Properties

InstanceId

The instance ID. Never null.

Declaration
public string InstanceId { get; }
Property Value
Type Description
System.String

Kind

Declaration
public ResourceNameKind Kind { get; }
Property Value
Type Description
ResourceNameKind
Implements
IResourceName.Kind

ProjectId

The project ID. Never null.

Declaration
public string ProjectId { get; }
Property Value
Type Description
System.String

Methods

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

Parse(String)

Parses the given instance resource name in string form into a new InstanceName instance.

Declaration
public static InstanceName Parse(string instanceName)
Parameters
Type Name Description
System.String instanceName

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

Returns
Type Description
InstanceName

The parsed InstanceName if successful.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
Implements
IResourceName.ToString()

TryParse(String, out InstanceName)

Tries to parse the given instance resource name in string form into a new InstanceName instance.

Declaration
public static bool TryParse(string instanceName, out InstanceName result)
Parameters
Type Name Description
System.String instanceName

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

InstanceName result

When this method returns, the parsed InstanceName, or null if parsing fails.

Returns
Type Description
System.Boolean

true if the name was parsed successfully; false otherwise.

Remarks

This method still throws System.ArgumentNullException if instanceName is null, as this would usually indicate a programming error rather than a data error.

Operators

Equality(InstanceName, InstanceName)

Declaration
public static bool operator ==(InstanceName a, InstanceName b)
Parameters
Type Name Description
InstanceName a
InstanceName b
Returns
Type Description
System.Boolean

Inequality(InstanceName, InstanceName)

Declaration
public static bool operator !=(InstanceName a, InstanceName b)
Parameters
Type Name Description
InstanceName a
InstanceName b
Returns
Type Description
System.Boolean
Back to top