algonaut_algod 0.5.0

API endpoint for algod operations.
Documentation
/*
 * Algod REST API.
 *
 * API endpoint for algod operations.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: contact@algorand.com
 * 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,
    /// \\[f\\] whether or not the holding is frozen.
    #[serde(rename = "is-frozen")]
    pub is_frozen: bool,
}

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,
            is_frozen,
        }
    }
}