fireblocks-sdk 2026.3.27

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LeanContractDto {
    /// The unique identifier of the contract template
    #[serde(rename = "id")]
    pub id: String,
    /// The name of the contract template
    #[serde(rename = "name")]
    pub name: String,
    /// A short description of the contract template
    #[serde(rename = "description")]
    pub description: String,
    /// The attributes related to this contract template. It will be displayed
    /// in the tokenization page
    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
    pub attributes: Option<models::ContractAttributes>,
    /// Is this a contract that is viewable by all fireblocks's users or is it
    /// visible only for this workspace
    #[serde(rename = "isPublic")]
    pub is_public: bool,
    /// True if the workspace allowed to deploy this contract, false otherwise
    #[serde(rename = "canDeploy", skip_serializing_if = "Option::is_none")]
    pub can_deploy: Option<bool>,
    /// The workspace id of the owner of this contract template. If it's a
    /// private contract, only this workspace will be allowed to deploy it
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    /// The details of the vendor of this contract template. Applicable only for
    /// public contract templates
    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
    pub vendor: Option<models::VendorDto>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
}

impl LeanContractDto {
    pub fn new(id: String, name: String, description: String, is_public: bool) -> LeanContractDto {
        LeanContractDto {
            id,
            name,
            description,
            attributes: None,
            is_public,
            can_deploy: None,
            owner: None,
            vendor: None,
            r#type: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "FUNGIBLE_TOKEN")]
    FungibleToken,
    #[serde(rename = "NON_FUNGIBLE_TOKEN")]
    NonFungibleToken,
    #[serde(rename = "TOKEN_UTILITY")]
    TokenUtility,
}

impl Default for Type {
    fn default() -> Type {
        Self::FungibleToken
    }
}