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};

/// MoveFunction : Move function
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MoveFunction {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "visibility")]
    pub visibility: models::MoveFunctionVisibility,
    /// Whether the function can be called as an entry function directly in a transaction
    #[serde(rename = "is_entry")]
    pub is_entry: bool,
    /// Whether the function is a view function or not
    #[serde(rename = "is_view")]
    pub is_view: bool,
    /// Generic type params associated with the Move function
    #[serde(rename = "generic_type_params")]
    pub generic_type_params: Vec<models::MoveFunctionGenericTypeParam>,
    /// Parameters associated with the move function
    #[serde(rename = "params")]
    pub params: Vec<String>,
    /// Return type of the function
    #[serde(rename = "return")]
    pub r#return: Vec<String>,
}

impl MoveFunction {
    /// Move function
    pub fn new(name: String, visibility: models::MoveFunctionVisibility, is_entry: bool, is_view: bool, generic_type_params: Vec<models::MoveFunctionGenericTypeParam>, params: Vec<String>, r#return: Vec<String>) -> MoveFunction {
        MoveFunction {
            name,
            visibility,
            is_entry,
            is_view,
            generic_type_params,
            params,
            r#return,
        }
    }
}