Struct FileDescriptor
A struct containing the identifiers for a dataset.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public readonly struct FileDescriptor
Constructors
FileDescriptor(DatasetDescriptor, string)
Creates an instance of the FileDescriptor struct.
Declaration
public FileDescriptor(DatasetDescriptor datasetDescriptor, string filePath)
Parameters
Type | Name | Description |
---|---|---|
DatasetDescriptor | datasetDescriptor | The file's dataset descriptor. |
string | filePath | The file's path. |
Fields
DatasetDescriptor
The file's dataset descriptor.
Declaration
public readonly DatasetDescriptor DatasetDescriptor
Field Value
Type | Description |
---|---|
DatasetDescriptor |
Path
The path to the file.
Declaration
public readonly string Path
Field Value
Type | Description |
---|---|
string |
Properties
AssetId
The asset's ID.
Declaration
public AssetId AssetId { get; }
Property Value
Type | Description |
---|---|
AssetId |
AssetVersion
The asset's version.
Declaration
public AssetVersion AssetVersion { get; }
Property Value
Type | Description |
---|---|
AssetVersion |
DatasetId
The dataset's ID.
Declaration
public DatasetId DatasetId { get; }
Property Value
Type | Description |
---|---|
DatasetId |
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)
Validate obj
is a FileDescriptor instance and have 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(FileDescriptor)
Returns whether two FileDescriptor objects are equals.
Declaration
public bool Equals(FileDescriptor other)
Parameters
Type | Name | Description |
---|---|---|
FileDescriptor | 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 FileDescriptor object.
Declaration
public static FileDescriptor FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | A FileDescriptor serialized as a JSON string. |
Returns
Type | Description |
---|---|
FileDescriptor |
GetHashCode()
Compute 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 FileDescriptor into a JSON string.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
string | A FileDescriptor serialized as a JSON string. |
Operators
operator ==(FileDescriptor, FileDescriptor)
Checks whether two FileDescriptor are equal.
Declaration
public static bool operator ==(FileDescriptor left, FileDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
FileDescriptor | left | Compare with this first instance. |
FileDescriptor | right | Compare with this other instance. |
Returns
Type | Description |
---|---|
bool |
operator !=(FileDescriptor, FileDescriptor)
Checks whether two FileDescriptor aren't equal.
Declaration
public static bool operator !=(FileDescriptor left, FileDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
FileDescriptor | left | Compare with this first instance. |
FileDescriptor | 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. |