public sealed class ScopeName : IResourceName, IEquatable<ScopeName>Reference documentation and code samples for the GKE Hub v1 API class ScopeName.
Resource name for the Scope resource.
Namespace
Google.Cloud.GkeHub.V1Assembly
Google.Cloud.GkeHub.V1.dll
Constructors
ScopeName(string, string, string)
public ScopeName(string projectId, string locationId, string scopeId)Constructs a new instance of a ScopeName class from the component parts of pattern
projects/{project}/locations/{location}/scopes/{scope}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
scopeId |
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 |
|
ScopeId
public string ScopeId { get; }The Scope ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Type
public ScopeName.ResourceNameType Type { get; }The ScopeName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
ScopeNameResourceNameType |
|
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)
public static string Format(string projectId, string locationId, string scopeId)Formats the IDs into the string representation of this ScopeName with pattern
projects/{project}/locations/{location}/scopes/{scope}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
scopeId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this ScopeName with pattern
|
FormatProjectLocationScope(string, string, string)
public static string FormatProjectLocationScope(string projectId, string locationId, string scopeId)Formats the IDs into the string representation of this ScopeName with pattern
projects/{project}/locations/{location}/scopes/{scope}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
scopeId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this ScopeName with pattern
|
FromProjectLocationScope(string, string, string)
public static ScopeName FromProjectLocationScope(string projectId, string locationId, string scopeId)Creates a ScopeName with the pattern projects/{project}/locations/{location}/scopes/{scope}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
scopeId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
ScopeName |
A new instance of ScopeName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static ScopeName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a ScopeName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
ScopeName |
A new instance of ScopeName containing the provided |
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static ScopeName Parse(string scopeName)Parses the given resource name string into a new ScopeName instance.
| Parameter | |
|---|---|
| Name | Description |
scopeName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
ScopeName |
The parsed ScopeName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/scopes/{scope}
Parse(string, bool)
public static ScopeName Parse(string scopeName, bool allowUnparsed)Parses the given resource name string into a new ScopeName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
scopeName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
ScopeName |
The parsed ScopeName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/scopes/{scope}
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 ScopeName)
public static bool TryParse(string scopeName, out ScopeName result)Tries to parse the given resource name string into a new ScopeName instance.
| Parameters | |
|---|---|
| Name | Description |
scopeName |
stringThe resource name in string form. Must not be |
result |
ScopeNameWhen this method returns, the parsed ScopeName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/scopes/{scope}
TryParse(string, bool, out ScopeName)
public static bool TryParse(string scopeName, bool allowUnparsed, out ScopeName result)Tries to parse the given resource name string into a new ScopeName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
scopeName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
ScopeNameWhen this method returns, the parsed ScopeName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/scopes/{scope}
allowUnparsed is true.
Operators
operator ==(ScopeName, ScopeName)
public static bool operator ==(ScopeName a, ScopeName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
ScopeNameThe first resource name to compare, or null. |
b |
ScopeNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(ScopeName, ScopeName)
public static bool operator !=(ScopeName a, ScopeName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
ScopeNameThe first resource name to compare, or null. |
b |
ScopeNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |