Class CaPoolName (2.0.0)

public sealed class CaPoolName : IResourceName, IEquatable<CaPoolName>

Resource name for the CaPool resource.

Inheritance

Object > CaPoolName

Namespace

Google.Cloud.Security.PrivateCA.V1

Assembly

Google.Cloud.Security.PrivateCA.V1.dll

Constructors

CaPoolName(String, String, String)

public CaPoolName(string projectId, string locationId, string caPoolId)

Constructs a new instance of a CaPoolName class from the component parts of pattern projects/{project}/locations/{location}/caPools/{ca_pool}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

caPoolIdString

The CaPool ID. Must not be null or empty.

Properties

CaPoolId

public string CaPoolId { get; }

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

LocationId

public string LocationId { get; }

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

Type

public CaPoolName.ResourceNameType Type { get; }

The CaPoolName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
CaPoolName.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)

public static string Format(string projectId, string locationId, string caPoolId)

Formats the IDs into the string representation of this CaPoolName with pattern projects/{project}/locations/{location}/caPools/{ca_pool}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

caPoolIdString

The CaPool ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this CaPoolName with pattern projects/{project}/locations/{location}/caPools/{ca_pool}.

FormatProjectLocationCaPool(String, String, String)

public static string FormatProjectLocationCaPool(string projectId, string locationId, string caPoolId)

Formats the IDs into the string representation of this CaPoolName with pattern projects/{project}/locations/{location}/caPools/{ca_pool}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

caPoolIdString

The CaPool ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this CaPoolName with pattern projects/{project}/locations/{location}/caPools/{ca_pool}.

FromProjectLocationCaPool(String, String, String)

public static CaPoolName FromProjectLocationCaPool(string projectId, string locationId, string caPoolId)

Creates a CaPoolName with the pattern projects/{project}/locations/{location}/caPools/{ca_pool}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

caPoolIdString

The CaPool ID. Must not be null or empty.

Returns
TypeDescription
CaPoolName

A new instance of CaPoolName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static CaPoolName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a CaPoolName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
CaPoolName

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

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

Parameter
NameDescription
caPoolNameString

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

Returns
TypeDescription
CaPoolName

The parsed CaPoolName if successful.

Remarks

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

  • projects/{project}/locations/{location}/caPools/{ca_pool}

Parse(String, Boolean)

public static CaPoolName Parse(string caPoolName, bool allowUnparsed)

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

Parameters
NameDescription
caPoolNameString

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 System.ArgumentException if an unparseable resource name is specified.

Returns
TypeDescription
CaPoolName

The parsed CaPoolName if successful.

Remarks

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

  • projects/{project}/locations/{location}/caPools/{ca_pool}
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
System.Object.ToString()

TryParse(String, out CaPoolName)

public static bool TryParse(string caPoolName, out CaPoolName result)

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

Parameters
NameDescription
caPoolNameString

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

resultCaPoolName

When this method returns, the parsed CaPoolName, 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}/locations/{location}/caPools/{ca_pool}

TryParse(String, Boolean, out CaPoolName)

public static bool TryParse(string caPoolName, bool allowUnparsed, out CaPoolName result)

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

Parameters
NameDescription
caPoolNameString

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 System.ArgumentException if an unparseable resource name is specified.

resultCaPoolName

When this method returns, the parsed CaPoolName, 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}/locations/{location}/caPools/{ca_pool}
Or may be in any format if allowUnparsed is true.

Operators

Equality(CaPoolName, CaPoolName)

public static bool operator ==(CaPoolName a, CaPoolName b)
Parameters
NameDescription
aCaPoolName
bCaPoolName
Returns
TypeDescription
Boolean

Inequality(CaPoolName, CaPoolName)

public static bool operator !=(CaPoolName a, CaPoolName b)
Parameters
NameDescription
aCaPoolName
bCaPoolName
Returns
TypeDescription
Boolean