public sealed class AccessPolicyName : IResourceName, IEquatable<AccessPolicyName>
Reference documentation and code samples for the Identity Access Context Manager v1 API class AccessPolicyName.
Resource name for the AccessPolicy
resource.
Namespace
Google.Identity.AccessContextManager.V1Assembly
Google.Identity.AccessContextManager.V1.dll
Constructors
AccessPolicyName(string)
public AccessPolicyName(string accessPolicyId)
Constructs a new instance of a AccessPolicyName class from the component parts of pattern
accessPolicies/{access_policy}
Parameter | |
---|---|
Name | Description |
accessPolicyId |
string The |
Properties
AccessPolicyId
public string AccessPolicyId { get; }
The AccessPolicy
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 |
Type
public AccessPolicyName.ResourceNameType Type { get; }
The AccessPolicyName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
AccessPolicyNameResourceNameType |
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)
public static string Format(string accessPolicyId)
Formats the IDs into the string representation of this AccessPolicyName with pattern
accessPolicies/{access_policy}
.
Parameter | |
---|---|
Name | Description |
accessPolicyId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this AccessPolicyName with pattern
|
FormatAccessPolicy(string)
public static string FormatAccessPolicy(string accessPolicyId)
Formats the IDs into the string representation of this AccessPolicyName with pattern
accessPolicies/{access_policy}
.
Parameter | |
---|---|
Name | Description |
accessPolicyId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this AccessPolicyName with pattern
|
FromAccessPolicy(string)
public static AccessPolicyName FromAccessPolicy(string accessPolicyId)
Creates a AccessPolicyName with the pattern accessPolicies/{access_policy}
.
Parameter | |
---|---|
Name | Description |
accessPolicyId |
string The |
Returns | |
---|---|
Type | Description |
AccessPolicyName |
A new instance of AccessPolicyName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static AccessPolicyName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a AccessPolicyName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName |
UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
AccessPolicyName |
A new instance of AccessPolicyName containing the provided
|
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
int |
Parse(string)
public static AccessPolicyName Parse(string accessPolicyName)
Parses the given resource name string into a new AccessPolicyName instance.
Parameter | |
---|---|
Name | Description |
accessPolicyName |
string The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
AccessPolicyName |
The parsed AccessPolicyName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
accessPolicies/{access_policy}
Parse(string, bool)
public static AccessPolicyName Parse(string accessPolicyName, bool allowUnparsed)
Parses the given resource name string into a new AccessPolicyName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
accessPolicyName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
Returns | |
---|---|
Type | Description |
AccessPolicyName |
The parsed AccessPolicyName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
accessPolicies/{access_policy}
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 AccessPolicyName)
public static bool TryParse(string accessPolicyName, out AccessPolicyName result)
Tries to parse the given resource name string into a new AccessPolicyName instance.
Parameters | |
---|---|
Name | Description |
accessPolicyName |
string The resource name in string form. Must not be |
result |
AccessPolicyName When this method returns, the parsed AccessPolicyName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
accessPolicies/{access_policy}
TryParse(string, bool, out AccessPolicyName)
public static bool TryParse(string accessPolicyName, bool allowUnparsed, out AccessPolicyName result)
Tries to parse the given resource name string into a new AccessPolicyName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
accessPolicyName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
result |
AccessPolicyName When this method returns, the parsed AccessPolicyName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
accessPolicies/{access_policy}
allowUnparsed
is true
.
Operators
operator ==(AccessPolicyName, AccessPolicyName)
public static bool operator ==(AccessPolicyName a, AccessPolicyName b)
Determines whether two specified resource names have the same value.
Parameters | |
---|---|
Name | Description |
a |
AccessPolicyName The first resource name to compare, or null. |
b |
AccessPolicyName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |
operator !=(AccessPolicyName, AccessPolicyName)
public static bool operator !=(AccessPolicyName a, AccessPolicyName b)
Determines whether two specified resource names have different values.
Parameters | |
---|---|
Name | Description |
a |
AccessPolicyName The first resource name to compare, or null. |
b |
AccessPolicyName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |