public sealed class VariantName : IResourceName, IEquatable<VariantName>Reference documentation and code samples for the Config Delivery v1beta API class VariantName.
Resource name for the Variant resource.
Namespace
Google.Cloud.ConfigDelivery.V1BetaAssembly
Google.Cloud.ConfigDelivery.V1Beta.dll
Constructors
VariantName(string, string, string, string, string)
public VariantName(string projectId, string locationId, string resourceBundleId, string releaseId, string variantId)Constructs a new instance of a VariantName class from the component parts of pattern
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
resourceBundleId |
stringThe |
releaseId |
stringThe |
variantId |
stringThe |
Properties
IsKnownPattern
public bool IsKnownPattern { get; }Whether this instance contains a resource name with a known pattern.
| Property Value | |
|---|---|
| Type | Description |
bool |
|
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 |
|
ReleaseId
public string ReleaseId { get; }The Release ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
ResourceBundleId
public string ResourceBundleId { get; }The ResourceBundle ID. Will not be null, unless this instance contains an unparsed resource
name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Type
public VariantName.ResourceNameType Type { get; }The VariantName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
VariantNameResourceNameType |
|
UnparsedResource
public UnparsedResourceName UnparsedResource { get; }The contained UnparsedResourceName. Only non-null if this instance contains an
unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
UnparsedResourceName |
|
VariantId
public string VariantId { get; }The Variant ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Methods
Format(string, string, string, string, string)
public static string Format(string projectId, string locationId, string resourceBundleId, string releaseId, string variantId)Formats the IDs into the string representation of this VariantName with pattern
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
resourceBundleId |
stringThe |
releaseId |
stringThe |
variantId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this VariantName with pattern
|
FormatProjectLocationResourceBundleReleaseVariant(string, string, string, string, string)
public static string FormatProjectLocationResourceBundleReleaseVariant(string projectId, string locationId, string resourceBundleId, string releaseId, string variantId)Formats the IDs into the string representation of this VariantName with pattern
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
resourceBundleId |
stringThe |
releaseId |
stringThe |
variantId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this VariantName with pattern
|
FromProjectLocationResourceBundleReleaseVariant(string, string, string, string, string)
public static VariantName FromProjectLocationResourceBundleReleaseVariant(string projectId, string locationId, string resourceBundleId, string releaseId, string variantId)Creates a VariantName with the pattern
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
resourceBundleId |
stringThe |
releaseId |
stringThe |
variantId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
VariantName |
A new instance of VariantName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static VariantName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a VariantName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
VariantName |
A new instance of VariantName containing the provided |
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static VariantName Parse(string variantName)Parses the given resource name string into a new VariantName instance.
| Parameter | |
|---|---|
| Name | Description |
variantName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
VariantName |
The parsed VariantName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
Parse(string, bool)
public static VariantName Parse(string variantName, bool allowUnparsed)Parses the given resource name string into a new VariantName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
variantName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
VariantName |
The parsed VariantName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
Or may be in any format if 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 VariantName)
public static bool TryParse(string variantName, out VariantName result)Tries to parse the given resource name string into a new VariantName instance.
| Parameters | |
|---|---|
| Name | Description |
variantName |
stringThe resource name in string form. Must not be |
result |
VariantNameWhen this method returns, the parsed VariantName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
TryParse(string, bool, out VariantName)
public static bool TryParse(string variantName, bool allowUnparsed, out VariantName result)Tries to parse the given resource name string into a new VariantName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
variantName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
VariantNameWhen this method returns, the parsed VariantName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}
Or may be in any format if allowUnparsed is true.
Operators
operator ==(VariantName, VariantName)
public static bool operator ==(VariantName a, VariantName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
VariantNameThe first resource name to compare, or null. |
b |
VariantNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(VariantName, VariantName)
public static bool operator !=(VariantName a, VariantName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
VariantNameThe first resource name to compare, or null. |
b |
VariantNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |