Class AccessApprovalSettingsName (1.4.0)

public sealed class AccessApprovalSettingsName : IResourceName, IEquatable<AccessApprovalSettingsName>

Resource name for the AccessApprovalSettings resource.

Inheritance

Object > AccessApprovalSettingsName

Namespace

Google.Cloud.AccessApproval.V1

Assembly

Google.Cloud.AccessApproval.V1.dll

Constructors

AccessApprovalSettingsName(String)

public AccessApprovalSettingsName(string projectId)

Constructs a new instance of a AccessApprovalSettingsName class from the component parts of pattern projects/{project}/accessApprovalSettings

Parameter
NameDescription
projectIdString

The Project ID. Must not be null or empty.

Properties

FolderId

public string FolderId { get; }

The Folder ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

IsKnownPattern

public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

Property Value
TypeDescription
Boolean

OrganizationId

public string OrganizationId { get; }

The Organization ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

The Project ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

Type

public AccessApprovalSettingsName.ResourceNameType Type { get; }

The AccessApprovalSettingsName.ResourceNameType of the contained resource name.

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

public static string Format(string projectId)

Formats the IDs into the string representation of this AccessApprovalSettingsName with pattern projects/{project}/accessApprovalSettings.

Parameter
NameDescription
projectIdString

The Project ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AccessApprovalSettingsName with pattern projects/{project}/accessApprovalSettings.

FormatFolder(String)

public static string FormatFolder(string folderId)

Formats the IDs into the string representation of this AccessApprovalSettingsName with pattern folders/{folder}/accessApprovalSettings.

Parameter
NameDescription
folderIdString

The Folder ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AccessApprovalSettingsName with pattern folders/{folder}/accessApprovalSettings.

FormatOrganization(String)

public static string FormatOrganization(string organizationId)

Formats the IDs into the string representation of this AccessApprovalSettingsName with pattern organizations/{organization}/accessApprovalSettings.

Parameter
NameDescription
organizationIdString

The Organization ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AccessApprovalSettingsName with pattern organizations/{organization}/accessApprovalSettings.

FormatProject(String)

public static string FormatProject(string projectId)

Formats the IDs into the string representation of this AccessApprovalSettingsName with pattern projects/{project}/accessApprovalSettings.

Parameter
NameDescription
projectIdString

The Project ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AccessApprovalSettingsName with pattern projects/{project}/accessApprovalSettings.

FromFolder(String)

public static AccessApprovalSettingsName FromFolder(string folderId)

Creates a AccessApprovalSettingsName with the pattern folders/{folder}/accessApprovalSettings.

Parameter
NameDescription
folderIdString

The Folder ID. Must not be null or empty.

Returns
TypeDescription
AccessApprovalSettingsName

A new instance of AccessApprovalSettingsName constructed from the provided ids.

FromOrganization(String)

public static AccessApprovalSettingsName FromOrganization(string organizationId)

Creates a AccessApprovalSettingsName with the pattern organizations/{organization}/accessApprovalSettings.

Parameter
NameDescription
organizationIdString

The Organization ID. Must not be null or empty.

Returns
TypeDescription
AccessApprovalSettingsName

A new instance of AccessApprovalSettingsName constructed from the provided ids.

FromProject(String)

public static AccessApprovalSettingsName FromProject(string projectId)

Creates a AccessApprovalSettingsName with the pattern projects/{project}/accessApprovalSettings.

Parameter
NameDescription
projectIdString

The Project ID. Must not be null or empty.

Returns
TypeDescription
AccessApprovalSettingsName

A new instance of AccessApprovalSettingsName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static AccessApprovalSettingsName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a AccessApprovalSettingsName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
AccessApprovalSettingsName

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

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

Parameter
NameDescription
accessApprovalSettingsNameString

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

Returns
TypeDescription
AccessApprovalSettingsName

The parsed AccessApprovalSettingsName if successful.

Remarks

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

  • projects/{project}/accessApprovalSettings
  • folders/{folder}/accessApprovalSettings
  • organizations/{organization}/accessApprovalSettings

Parse(String, Boolean)

public static AccessApprovalSettingsName Parse(string accessApprovalSettingsName, bool allowUnparsed)

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

Parameters
NameDescription
accessApprovalSettingsNameString

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
AccessApprovalSettingsName

The parsed AccessApprovalSettingsName if successful.

Remarks

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

  • projects/{project}/accessApprovalSettings
  • folders/{folder}/accessApprovalSettings
  • organizations/{organization}/accessApprovalSettings
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 AccessApprovalSettingsName)

public static bool TryParse(string accessApprovalSettingsName, out AccessApprovalSettingsName result)

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

Parameters
NameDescription
accessApprovalSettingsNameString

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

resultAccessApprovalSettingsName

When this method returns, the parsed AccessApprovalSettingsName, 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}/accessApprovalSettings
  • folders/{folder}/accessApprovalSettings
  • organizations/{organization}/accessApprovalSettings

TryParse(String, Boolean, out AccessApprovalSettingsName)

public static bool TryParse(string accessApprovalSettingsName, bool allowUnparsed, out AccessApprovalSettingsName result)

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

Parameters
NameDescription
accessApprovalSettingsNameString

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.

resultAccessApprovalSettingsName

When this method returns, the parsed AccessApprovalSettingsName, 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}/accessApprovalSettings
  • folders/{folder}/accessApprovalSettings
  • organizations/{organization}/accessApprovalSettings
Or may be in any format if allowUnparsed is true.

Operators

Equality(AccessApprovalSettingsName, AccessApprovalSettingsName)

public static bool operator ==(AccessApprovalSettingsName a, AccessApprovalSettingsName b)
Parameters
NameDescription
aAccessApprovalSettingsName
bAccessApprovalSettingsName
Returns
TypeDescription
Boolean

Inequality(AccessApprovalSettingsName, AccessApprovalSettingsName)

public static bool operator !=(AccessApprovalSettingsName a, AccessApprovalSettingsName b)
Parameters
NameDescription
aAccessApprovalSettingsName
bAccessApprovalSettingsName
Returns
TypeDescription
Boolean