aptos-client-icp 0.0.1

The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
Documentation
/*
 * Aptos Node API
 *
 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
 *
 * The version of the OpenAPI document: 1.2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// MoveStruct : A move struct
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MoveStruct {
    #[serde(rename = "name")]
    pub name: String,
    /// Whether the struct is a native struct of Move
    #[serde(rename = "is_native")]
    pub is_native: bool,
    /// Whether the struct is marked with the #[event] annotation
    #[serde(rename = "is_event")]
    pub is_event: bool,
    /// Abilities associated with the struct
    #[serde(rename = "abilities")]
    pub abilities: Vec<String>,
    /// Generic types associated with the struct
    #[serde(rename = "generic_type_params")]
    pub generic_type_params: Vec<models::MoveStructGenericTypeParam>,
    /// Fields associated with the struct
    #[serde(rename = "fields")]
    pub fields: Vec<models::MoveStructField>,
}

impl MoveStruct {
    /// A move struct
    pub fn new(name: String, is_native: bool, is_event: bool, abilities: Vec<String>, generic_type_params: Vec<models::MoveStructGenericTypeParam>, fields: Vec<models::MoveStructField>) -> MoveStruct {
        MoveStruct {
            name,
            is_native,
            is_event,
            abilities,
            generic_type_params,
            fields,
        }
    }
}