Class AssetHolding
Describes an asset held by an account. Definition: data/basics/userBalance.go : AssetHolding
Inheritance
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class AssetHolding : IEquatable<AssetHolding>, IValidatableObject
Constructors
| Improve this Doc View SourceAssetHolding()
Initializes a new instance of the AssetHolding class.
Declaration
[JsonConstructor]
protected AssetHolding()
AssetHolding(Nullable<UInt64>, Nullable<Int64>, String, Nullable<Boolean>)
Initializes a new instance of the AssetHolding class.
Declaration
public AssetHolding(ulong? amount = default(ulong? ), long? assetId = default(long? ), string creator = null, bool? isFrozen = default(bool? ))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.UInt64> | amount | \[a\] number of units held. (required). |
| System.Nullable<System.Int64> | assetId | Asset ID of the holding. (required). |
| System.String | creator | Address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case. (required). |
| System.Nullable<System.Boolean> | isFrozen | \[f\] whether or not the holding is frozen. (required). |
Properties
| Improve this Doc View SourceAmount
\[a\] number of units held.
Declaration
[DataMember(Name = "amount", EmitDefaultValue = false)]
public ulong? Amount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt64> | \[a\] number of units held. |
AssetId
Asset ID of the holding.
Declaration
[DataMember(Name = "asset-id", EmitDefaultValue = false)]
public long? AssetId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> | Asset ID of the holding. |
Creator
Address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.
Declaration
[DataMember(Name = "creator", EmitDefaultValue = false)]
public string Creator { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | Address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case. |
IsFrozen
\[f\] whether or not the holding is frozen.
Declaration
[DataMember(Name = "is-frozen", EmitDefaultValue = false)]
public bool? IsFrozen { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> | \[f\] whether or not the holding is frozen. |
Methods
| Improve this Doc View SourceEquals(AssetHolding)
Returns true if AssetHolding instances are equal
Declaration
public bool Equals(AssetHolding input)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetHolding | input | Instance of AssetHolding to be compared |
Returns
| Type | Description |
|---|---|
| System.Boolean | Boolean |
Equals(Object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | input | Object to be compared |
Returns
| Type | Description |
|---|---|
| System.Boolean | Boolean |
Overrides
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code |
Overrides
ToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
| Type | Description |
|---|---|
| System.String | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | String presentation of the object |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIValidatableObject.Validate(ValidationContext)
To validate all properties of the instance
Declaration
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ComponentModel.DataAnnotations.ValidationContext | validationContext | Validation context |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> | Validation Result |