Class ReusableConfigName

public sealed class ReusableConfigName : IResourceName, IEquatable<ReusableConfigName>

Resource name for the ReusableConfig resource.

Inheritance

Object > ReusableConfigName

Namespace

Google.Cloud.Security.PrivateCA.V1Beta1

Assembly

Google.Cloud.Security.PrivateCA.V1Beta1.dll

Constructors

ReusableConfigName(String, String, String)

public ReusableConfigName(string projectId, string locationId, string reusableConfigId)

Constructs a new instance of a ReusableConfigName class from the component parts of pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

reusableConfigIdString

The ReusableConfig ID. Must not be null or empty.

Properties

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

ReusableConfigId

public string ReusableConfigId { get; }

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

Property Value
TypeDescription
String

Type

public ReusableConfigName.ResourceNameType Type { get; }

The ReusableConfigName.ResourceNameType of the contained resource name.

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

Formats the IDs into the string representation of this ReusableConfigName with pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

reusableConfigIdString

The ReusableConfig ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this ReusableConfigName with pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}.

FormatProjectLocationReusableConfig(String, String, String)

public static string FormatProjectLocationReusableConfig(string projectId, string locationId, string reusableConfigId)

Formats the IDs into the string representation of this ReusableConfigName with pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

reusableConfigIdString

The ReusableConfig ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this ReusableConfigName with pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}.

FromProjectLocationReusableConfig(String, String, String)

public static ReusableConfigName FromProjectLocationReusableConfig(string projectId, string locationId, string reusableConfigId)

Creates a ReusableConfigName with the pattern projects/{project}/locations/{location}/reusableConfigs/{reusable_config}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

reusableConfigIdString

The ReusableConfig ID. Must not be null or empty.

Returns
TypeDescription
ReusableConfigName

A new instance of ReusableConfigName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static ReusableConfigName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a ReusableConfigName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
ReusableConfigName

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

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

Parameter
NameDescription
reusableConfigNameString

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

Returns
TypeDescription
ReusableConfigName

The parsed ReusableConfigName if successful.

Remarks

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

  • projects/{project}/locations/{location}/reusableConfigs/{reusable_config}

Parse(String, Boolean)

public static ReusableConfigName Parse(string reusableConfigName, bool allowUnparsed)

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

Parameters
NameDescription
reusableConfigNameString

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
ReusableConfigName

The parsed ReusableConfigName if successful.

Remarks

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

  • projects/{project}/locations/{location}/reusableConfigs/{reusable_config}
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 ReusableConfigName)

public static bool TryParse(string reusableConfigName, out ReusableConfigName result)

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

Parameters
NameDescription
reusableConfigNameString

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

resultReusableConfigName

When this method returns, the parsed ReusableConfigName, 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}/reusableConfigs/{reusable_config}

TryParse(String, Boolean, out ReusableConfigName)

public static bool TryParse(string reusableConfigName, bool allowUnparsed, out ReusableConfigName result)

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

Parameters
NameDescription
reusableConfigNameString

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.

resultReusableConfigName

When this method returns, the parsed ReusableConfigName, 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}/reusableConfigs/{reusable_config}
Or may be in any format if allowUnparsed is true.

Operators

Equality(ReusableConfigName, ReusableConfigName)

public static bool operator ==(ReusableConfigName a, ReusableConfigName b)
Parameters
NameDescription
aReusableConfigName
bReusableConfigName
Returns
TypeDescription
Boolean

Inequality(ReusableConfigName, ReusableConfigName)

public static bool operator !=(ReusableConfigName a, ReusableConfigName b)
Parameters
NameDescription
aReusableConfigName
bReusableConfigName
Returns
TypeDescription
Boolean