public sealed class SettingName : IResourceName, IEquatable<SettingName>
Resource name for the Setting
resource.
Namespace
Google.Cloud.ResourceSettings.V1Assembly
Google.Cloud.ResourceSettings.V1.dll
Constructors
SettingName(String, String)
public SettingName(string projectNumberId, string settingNameId)
Constructs a new instance of a SettingName class from the component parts of pattern
projects/{project_number}/settings/{setting_name}
Parameters | |
---|---|
Name | Description |
projectNumberId | String The |
settingNameId | String The |
Properties
FolderId
public string FolderId { get; }
The Folder
ID. May be null
, depending on which resource name is contained by this instance.
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 |
Boolean |
OrganizationId
public string OrganizationId { get; }
The Organization
ID. May be null
, depending on which resource name is contained by this
instance.
Property Value | |
---|---|
Type | Description |
String |
ProjectNumberId
public string ProjectNumberId { get; }
The ProjectNumber
ID. May be null
, depending on which resource name is contained by this
instance.
Property Value | |
---|---|
Type | Description |
String |
SettingNameId
public string SettingNameId { get; }
The SettingName
ID. May be null
, depending on which resource name is contained by this
instance.
Property Value | |
---|---|
Type | Description |
String |
Type
public SettingName.ResourceNameType Type { get; }
The SettingName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
SettingName.ResourceNameType |
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)
public static string Format(string projectNumberId, string settingNameId)
Formats the IDs into the string representation of this SettingName with pattern
projects/{project_number}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
projectNumberId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this SettingName with pattern
|
FormatFolderSettingName(String, String)
public static string FormatFolderSettingName(string folderId, string settingNameId)
Formats the IDs into the string representation of this SettingName with pattern
folders/{folder}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
folderId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this SettingName with pattern
|
FormatOrganizationSettingName(String, String)
public static string FormatOrganizationSettingName(string organizationId, string settingNameId)
Formats the IDs into the string representation of this SettingName with pattern
organizations/{organization}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
organizationId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this SettingName with pattern
|
FormatProjectNumberSettingName(String, String)
public static string FormatProjectNumberSettingName(string projectNumberId, string settingNameId)
Formats the IDs into the string representation of this SettingName with pattern
projects/{project_number}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
projectNumberId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this SettingName with pattern
|
FromFolderSettingName(String, String)
public static SettingName FromFolderSettingName(string folderId, string settingNameId)
Creates a SettingName with the pattern folders/{folder}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
folderId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
SettingName | A new instance of SettingName constructed from the provided ids. |
FromOrganizationSettingName(String, String)
public static SettingName FromOrganizationSettingName(string organizationId, string settingNameId)
Creates a SettingName with the pattern organizations/{organization}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
organizationId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
SettingName | A new instance of SettingName constructed from the provided ids. |
FromProjectNumberSettingName(String, String)
public static SettingName FromProjectNumberSettingName(string projectNumberId, string settingNameId)
Creates a SettingName with the pattern projects/{project_number}/settings/{setting_name}
.
Parameters | |
---|---|
Name | Description |
projectNumberId | String The |
settingNameId | String The |
Returns | |
---|---|
Type | Description |
SettingName | A new instance of SettingName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static SettingName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a SettingName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName | UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
SettingName | A new instance of SettingName containing the provided |
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
Int32 |
Parse(String)
public static SettingName Parse(string settingName)
Parses the given resource name string into a new SettingName instance.
Parameter | |
---|---|
Name | Description |
settingName | String The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
SettingName | The parsed SettingName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project_number}/settings/{setting_name}
folders/{folder}/settings/{setting_name}
organizations/{organization}/settings/{setting_name}
Parse(String, Boolean)
public static SettingName Parse(string settingName, bool allowUnparsed)
Parses the given resource name string into a new SettingName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
settingName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
Returns | |
---|---|
Type | Description |
SettingName | The parsed SettingName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project_number}/settings/{setting_name}
folders/{folder}/settings/{setting_name}
organizations/{organization}/settings/{setting_name}
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 SettingName)
public static bool TryParse(string settingName, out SettingName result)
Tries to parse the given resource name string into a new SettingName instance.
Parameters | |
---|---|
Name | Description |
settingName | String The resource name in string form. Must not be |
result | SettingName When this method returns, the parsed SettingName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project_number}/settings/{setting_name}
folders/{folder}/settings/{setting_name}
organizations/{organization}/settings/{setting_name}
TryParse(String, Boolean, out SettingName)
public static bool TryParse(string settingName, bool allowUnparsed, out SettingName result)
Tries to parse the given resource name string into a new SettingName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
settingName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
result | SettingName When this method returns, the parsed SettingName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project_number}/settings/{setting_name}
folders/{folder}/settings/{setting_name}
organizations/{organization}/settings/{setting_name}
allowUnparsed
is true
.
Operators
Equality(SettingName, SettingName)
public static bool operator ==(SettingName a, SettingName b)
Parameters | |
---|---|
Name | Description |
a | SettingName |
b | SettingName |
Returns | |
---|---|
Type | Description |
Boolean |
Inequality(SettingName, SettingName)
public static bool operator !=(SettingName a, SettingName b)
Parameters | |
---|---|
Name | Description |
a | SettingName |
b | SettingName |
Returns | |
---|---|
Type | Description |
Boolean |