1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Indexer
*
* Algorand ledger analytics API.
*
* The version of the OpenAPI document: 2.0
*
* Generated by: https://openapi-generator.tech
*/
/// AssetHolding : Describes an asset held by an account. Definition: data/basics/userBalance.go : AssetHolding
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AssetHolding {
/// \\[a\\] number of units held.
#[serde(rename = "amount")]
pub amount: u64,
/// Asset ID of the holding.
#[serde(rename = "asset-id")]
pub asset_id: u64,
/// Whether or not the asset holding is currently deleted from its account.
#[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
pub deleted: Option<bool>,
/// \\[f\\] whether or not the holding is frozen.
#[serde(rename = "is-frozen")]
pub is_frozen: bool,
/// Round during which the account opted into this asset holding.
#[serde(rename = "opted-in-at-round", skip_serializing_if = "Option::is_none")]
pub opted_in_at_round: Option<u64>,
/// Round during which the account opted out of this asset holding.
#[serde(rename = "opted-out-at-round", skip_serializing_if = "Option::is_none")]
pub opted_out_at_round: Option<u64>,
}
impl AssetHolding {
/// Describes an asset held by an account. Definition: data/basics/userBalance.go : AssetHolding
pub fn new(amount: u64, asset_id: u64, is_frozen: bool) -> AssetHolding {
AssetHolding {
amount,
asset_id,
deleted: None,
is_frozen,
opted_in_at_round: None,
opted_out_at_round: None,
}
}
}