Struct AssetDescriptor
A struct containing the identifiers for an asset.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public readonly struct AssetDescriptor
  Constructors
AssetDescriptor(ProjectDescriptor, AssetId, AssetVersion)
Creates an instance of the AssetDescriptor struct.
Declaration
public AssetDescriptor(ProjectDescriptor projectDescriptor, AssetId assetId, AssetVersion assetVersion)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ProjectDescriptor | projectDescriptor | The asset's project descriptor.  | 
      
| AssetId | assetId | The asset's ID  | 
      
| AssetVersion | assetVersion | The asset's version.  | 
      
Fields
AssetId
The asset's ID.
Declaration
public readonly AssetId AssetId
  Field Value
| Type | Description | 
|---|---|
| AssetId | 
AssetVersion
The asset's version.
Declaration
public readonly AssetVersion AssetVersion
  Field Value
| Type | Description | 
|---|---|
| AssetVersion | 
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)
Validate obj is a AssetDescriptor 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(AssetDescriptor)
Returns whether two AssetDescriptor objects are equals.
Declaration
public bool Equals(AssetDescriptor other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AssetDescriptor | 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 AssetDescriptor object.
Declaration
public static AssetDescriptor FromJson(string json)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | json | A AssetDescriptor serialized as a JSON string.  | 
      
Returns
| Type | Description | 
|---|---|
| AssetDescriptor | 
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 AssetDescriptor into a JSON string.
Declaration
public string ToJson()
  Returns
| Type | Description | 
|---|---|
| string | A AssetDescriptor serialized as a JSON string.  | 
      
Operators
operator ==(AssetDescriptor, AssetDescriptor)
Get if two AssetDescriptor represent the same.
Declaration
public static bool operator ==(AssetDescriptor left, AssetDescriptor right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AssetDescriptor | left | Compare with this first instance.  | 
      
| AssetDescriptor | right | Compare with this other instance.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
operator !=(AssetDescriptor, AssetDescriptor)
Get if two AssetDescriptor does not represent the same.
Declaration
public static bool operator !=(AssetDescriptor left, AssetDescriptor right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AssetDescriptor | left | Compare with this first instance.  | 
      
| AssetDescriptor | 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.  |