public sealed class CollectionGroupName : IResourceName, IEquatable<CollectionGroupName>
Resource name for the CollectionGroup
resource.
Namespace
Google.Cloud.Firestore.Admin.V1Assembly
Google.Cloud.Firestore.Admin.V1.dll
Constructors
CollectionGroupName(String, String, String)
public CollectionGroupName(string projectId, string databaseId, string collectionId)
Constructs a new instance of a CollectionGroupName class from the component parts of pattern
projects/{project}/databases/{database}/collectionGroups/{collection}
Parameters | |
---|---|
Name | Description |
projectId | String The |
databaseId | String The |
collectionId | String The |
Properties
CollectionId
public string CollectionId { get; }
The Collection
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
String |
DatabaseId
public string DatabaseId { get; }
The Database
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 |
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 |
Type
public CollectionGroupName.ResourceNameType Type { get; }
The CollectionGroupName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
CollectionGroupName.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, String)
public static string Format(string projectId, string databaseId, string collectionId)
Formats the IDs into the string representation of this CollectionGroupName with pattern
projects/{project}/databases/{database}/collectionGroups/{collection}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
databaseId | String The |
collectionId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this CollectionGroupName with pattern
|
FormatProjectDatabaseCollection(String, String, String)
public static string FormatProjectDatabaseCollection(string projectId, string databaseId, string collectionId)
Formats the IDs into the string representation of this CollectionGroupName with pattern
projects/{project}/databases/{database}/collectionGroups/{collection}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
databaseId | String The |
collectionId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this CollectionGroupName with pattern
|
FromProjectDatabaseCollection(String, String, String)
public static CollectionGroupName FromProjectDatabaseCollection(string projectId, string databaseId, string collectionId)
Creates a CollectionGroupName with the pattern
projects/{project}/databases/{database}/collectionGroups/{collection}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
databaseId | String The |
collectionId | String The |
Returns | |
---|---|
Type | Description |
CollectionGroupName | A new instance of CollectionGroupName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static CollectionGroupName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a CollectionGroupName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName | UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
CollectionGroupName | A new instance of CollectionGroupName containing the provided
|
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
Int32 |
Parse(String)
public static CollectionGroupName Parse(string collectionGroupName)
Parses the given resource name string into a new CollectionGroupName instance.
Parameter | |
---|---|
Name | Description |
collectionGroupName | String The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
CollectionGroupName | The parsed CollectionGroupName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/databases/{database}/collectionGroups/{collection}
Parse(String, Boolean)
public static CollectionGroupName Parse(string collectionGroupName, bool allowUnparsed)
Parses the given resource name string into a new CollectionGroupName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
collectionGroupName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
Returns | |
---|---|
Type | Description |
CollectionGroupName | The parsed CollectionGroupName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/databases/{database}/collectionGroups/{collection}
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 CollectionGroupName)
public static bool TryParse(string collectionGroupName, out CollectionGroupName result)
Tries to parse the given resource name string into a new CollectionGroupName instance.
Parameters | |
---|---|
Name | Description |
collectionGroupName | String The resource name in string form. Must not be |
result | CollectionGroupName When this method returns, the parsed CollectionGroupName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/databases/{database}/collectionGroups/{collection}
TryParse(String, Boolean, out CollectionGroupName)
public static bool TryParse(string collectionGroupName, bool allowUnparsed, out CollectionGroupName result)
Tries to parse the given resource name string into a new CollectionGroupName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
collectionGroupName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
result | CollectionGroupName When this method returns, the parsed CollectionGroupName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/databases/{database}/collectionGroups/{collection}
allowUnparsed
is true
.
Operators
Equality(CollectionGroupName, CollectionGroupName)
public static bool operator ==(CollectionGroupName a, CollectionGroupName b)
Parameters | |
---|---|
Name | Description |
a | CollectionGroupName |
b | CollectionGroupName |
Returns | |
---|---|
Type | Description |
Boolean |
Inequality(CollectionGroupName, CollectionGroupName)
public static bool operator !=(CollectionGroupName a, CollectionGroupName b)
Parameters | |
---|---|
Name | Description |
a | CollectionGroupName |
b | CollectionGroupName |
Returns | |
---|---|
Type | Description |
Boolean |