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