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 File
Declaration
public FileDescriptor(DatasetDescriptor datasetDescriptor, string filePath)
Parameters
Type | Name | Description |
---|---|---|
Dataset |
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 |
---|---|
Dataset |
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 |
---|---|
Asset |
AssetVersion
The asset's version.
Declaration
public AssetVersion AssetVersion { get; }
Property Value
Type | Description |
---|---|
Asset |
DatasetId
The dataset's ID.
Declaration
public DatasetId DatasetId { get; }
Property Value
Type | Description |
---|---|
Dataset |
OrganizationId
The project's organization ID.
Declaration
public OrganizationId OrganizationId { get; }
Property Value
Type | Description |
---|---|
Organization |
ProjectId
The project's ID.
Declaration
public ProjectId ProjectId { get; }
Property Value
Type | Description |
---|---|
Project |
Methods
Equals(object)
Validate obj
is a File
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Compare the values with this instance. |
Returns
Overrides
Equals(FileDescriptor)
Returns whether two File
Declaration
public bool Equals(FileDescriptor other)
Parameters
Type | Name | Description |
---|---|---|
File |
other | Compare the values with this instance. |
Returns
FromJson(string)
Deserializes the given JSON string into a File
Declaration
public static FileDescriptor FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | A File |
Returns
Type | Description |
---|---|
File |
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 File
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
string | A File |
Operators
operator ==(FileDescriptor, FileDescriptor)
Checks whether two File
Declaration
public static bool operator ==(FileDescriptor left, FileDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
File |
left | Compare with this first instance. |
File |
right | Compare with this other instance. |
Returns
operator !=(FileDescriptor, FileDescriptor)
Checks whether two File
Declaration
public static bool operator !=(FileDescriptor left, FileDescriptor right)
Parameters
Type | Name | Description |
---|---|---|
File |
left | Compare with this first instance. |
File |
right | Compare with this other instance. |