Struct CollectionDescriptor
This struct contains the identifiers for a collection.
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public readonly struct CollectionDescriptor
Constructors
CollectionDescriptor(ProjectDescriptor, CollectionPath)
Creates an instance of the CollectionDescriptor struct.
Declaration
public CollectionDescriptor(ProjectDescriptor projectDescriptor, CollectionPath path)
Parameters
Type | Name | Description |
---|---|---|
ProjectDescriptor | projectDescriptor | The descriptor of the project. |
CollectionPath | path | The path to the collection. |
Fields
Path
The path to the collection.
Declaration
public readonly CollectionPath Path
Field Value
Type | Description |
---|---|
CollectionPath |
ProjectDescriptor
The asset's project descriptor.
Declaration
public readonly ProjectDescriptor ProjectDescriptor
Field Value
Type | Description |
---|---|
ProjectDescriptor |
Properties
OrganizationId
The project's organization ID.
Declaration
public OrganizationId OrganizationId { get; }
Property Value
Type | Description |
---|---|
OrganizationId |
ProjectId
The project's ID.
Declaration
public ProjectId ProjectId { get; }
Property Value
Type | Description |
---|---|
ProjectId |
Methods
Equals(object)
Validates whether obj
is a CollectionDescriptor instance and has the same values as this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Compare the values with this instance. |
Returns
Type | Description |
---|---|
bool | true if both instance have the same values; false otherwise. |
Overrides
Equals(CollectionDescriptor)
Checks whether two CollectionDescriptor objects are equals.
Declaration
public bool Equals(CollectionDescriptor other)
Parameters
Type | Name | Description |
---|---|---|
CollectionDescriptor | other | Compare the values with this instance. |
Returns
Type | Description |
---|---|
bool | true if both instance have the same values; false otherwise. |
FromJson(string)
Deserializes the given JSON string into a CollectionDescriptor object.
Declaration
public static CollectionDescriptor FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | A CollectionDescriptor serialized as a JSON string. |
Returns
Type | Description |
---|---|
CollectionDescriptor |
GetHashCode()
Computes a hash code for the object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Remarks
- You should not assume that equal hash codes imply object equality.
- You should never persist or use a hash code outside the application domain in which it was created, because the same object may hash differently across application domains, processes, and platforms.
ToJson()
Serializes the CollectionDescriptor into a JSON string.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
string | A CollectionDescriptor serialized as a JSON string. |
Operators
operator ==(CollectionDescriptor, CollectionDescriptor)
Checks whether two CollectionDescriptor are the same.
Declaration
public static bool operator ==(CollectionDescriptor left, CollectionDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
CollectionDescriptor | left | Compare with this first instance. |
CollectionDescriptor | right | Compare with this other instance. |
Returns
Type | Description |
---|---|
bool |
operator !=(CollectionDescriptor, CollectionDescriptor)
Checks whether two CollectionDescriptor are not the same.
Declaration
public static bool operator !=(CollectionDescriptor left, CollectionDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
CollectionDescriptor | left | Compare with this first instance. |
CollectionDescriptor | right | Compare with this other instance. |
Returns
Type | Description |
---|---|
bool | true if both instances are not the same; false if both instances are the same. |