public sealed class FolderLocationName : IResourceName, IEquatable<FolderLocationName>
Resource name for the FolderLocation
resource.
Namespace
Google.Cloud.Logging.V2Assembly
Google.Cloud.Logging.V2.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 |
Boolean |
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 |
FolderLocationName.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 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 |
Int32 |
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, Boolean)
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 | Boolean 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 |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
folders/{folder}/locations/{location}
TryParse(String, Boolean, 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 | Boolean If |
result | FolderLocationName When this method returns, the parsed FolderLocationName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
folders/{folder}/locations/{location}
allowUnparsed
is true
.
Operators
Equality(FolderLocationName, FolderLocationName)
public static bool operator ==(FolderLocationName a, FolderLocationName b)
Parameters | |
---|---|
Name | Description |
a | FolderLocationName |
b | FolderLocationName |
Returns | |
---|---|
Type | Description |
Boolean |
Inequality(FolderLocationName, FolderLocationName)
public static bool operator !=(FolderLocationName a, FolderLocationName b)
Parameters | |
---|---|
Name | Description |
a | FolderLocationName |
b | FolderLocationName |
Returns | |
---|---|
Type | Description |
Boolean |