algonaut_indexer 0.7.0

Algorand ledger analytics API.
Documentation
/*
 * Indexer
 *
 * Algorand ledger analytics API.
 *
 * The version of the OpenAPI document: 2.0
 *
 * Generated by: https://openapi-generator.tech
 */

use algonaut_encoding::Bytes;

/// BoxReference : BoxReference names a box by its name and the application ID it belongs to.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BoxReference {
    /// Application ID to which the box belongs, or zero if referring to the called application.
    #[serde(rename = "app")]
    pub app: u64,
    /// Base64 encoded box name
    #[serde(rename = "name")]
    pub name: Bytes,
}

impl BoxReference {
    /// BoxReference names a box by its name and the application ID it belongs to.
    pub fn new(app: u64, name: Bytes) -> BoxReference {
        BoxReference { app, name }
    }
}