public sealed class CryptoKeysName : IResourceName, IEquatable<CryptoKeysName>
Reference documentation and code samples for the Discovery Engine v1 API class CryptoKeysName.
Resource name for the CryptoKeys
resource.
Namespace
Google.Cloud.DiscoveryEngine.V1Assembly
Google.Cloud.DiscoveryEngine.V1.dll
Constructors
CryptoKeysName(string, string, string, string)
public CryptoKeysName(string projectId, string locationId, string keyRingId, string cryptoKeyId)
Constructs a new instance of a CryptoKeysName class from the component parts of pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
keyRingId |
string The |
cryptoKeyId |
string The |
Properties
CryptoKeyId
public string CryptoKeyId { get; }
The CryptoKey
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 |
KeyRingId
public string KeyRingId { get; }
The KeyRing
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
string |
LocationId
public string LocationId { get; }
The Location
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
string |
ProjectId
public string ProjectId { get; }
The Project
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
string |
Type
public CryptoKeysName.ResourceNameType Type { get; }
The CryptoKeysName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
CryptoKeysNameResourceNameType |
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, string, string, string)
public static string Format(string projectId, string locationId, string keyRingId, string cryptoKeyId)
Formats the IDs into the string representation of this CryptoKeysName with pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
keyRingId |
string The |
cryptoKeyId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this CryptoKeysName with pattern
|
FormatProjectLocationKeyRingCryptoKey(string, string, string, string)
public static string FormatProjectLocationKeyRingCryptoKey(string projectId, string locationId, string keyRingId, string cryptoKeyId)
Formats the IDs into the string representation of this CryptoKeysName with pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
keyRingId |
string The |
cryptoKeyId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this CryptoKeysName with pattern
|
FromProjectLocationKeyRingCryptoKey(string, string, string, string)
public static CryptoKeysName FromProjectLocationKeyRingCryptoKey(string projectId, string locationId, string keyRingId, string cryptoKeyId)
Creates a CryptoKeysName with the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
keyRingId |
string The |
cryptoKeyId |
string The |
Returns | |
---|---|
Type | Description |
CryptoKeysName |
A new instance of CryptoKeysName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static CryptoKeysName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a CryptoKeysName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName |
UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
CryptoKeysName |
A new instance of CryptoKeysName containing the provided
|
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
int |
Parse(string)
public static CryptoKeysName Parse(string cryptoKeysName)
Parses the given resource name string into a new CryptoKeysName instance.
Parameter | |
---|---|
Name | Description |
cryptoKeysName |
string The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
CryptoKeysName |
The parsed CryptoKeysName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
Parse(string, bool)
public static CryptoKeysName Parse(string cryptoKeysName, bool allowUnparsed)
Parses the given resource name string into a new CryptoKeysName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
cryptoKeysName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
Returns | |
---|---|
Type | Description |
CryptoKeysName |
The parsed CryptoKeysName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
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 CryptoKeysName)
public static bool TryParse(string cryptoKeysName, out CryptoKeysName result)
Tries to parse the given resource name string into a new CryptoKeysName instance.
Parameters | |
---|---|
Name | Description |
cryptoKeysName |
string The resource name in string form. Must not be |
result |
CryptoKeysName When this method returns, the parsed CryptoKeysName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
TryParse(string, bool, out CryptoKeysName)
public static bool TryParse(string cryptoKeysName, bool allowUnparsed, out CryptoKeysName result)
Tries to parse the given resource name string into a new CryptoKeysName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
cryptoKeysName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
result |
CryptoKeysName When this method returns, the parsed CryptoKeysName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
allowUnparsed
is true
.
Operators
operator ==(CryptoKeysName, CryptoKeysName)
public static bool operator ==(CryptoKeysName a, CryptoKeysName b)
Determines whether two specified resource names have the same value.
Parameters | |
---|---|
Name | Description |
a |
CryptoKeysName The first resource name to compare, or null. |
b |
CryptoKeysName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |
operator !=(CryptoKeysName, CryptoKeysName)
public static bool operator !=(CryptoKeysName a, CryptoKeysName b)
Determines whether two specified resource names have different values.
Parameters | |
---|---|
Name | Description |
a |
CryptoKeysName The first resource name to compare, or null. |
b |
CryptoKeysName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |