fireblocks_sdk/models/
parameter_with_value.rs

1// Fireblocks API
2//
3// 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)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ParameterWithValue {
16    /// The name of the parameter as it appears in the ABI
17    #[serde(rename = "name")]
18    pub name: String,
19    /// A description of the parameter, fetched from the devdoc of this contract
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// The  internal type of the parameter as it appears in the ABI
23    #[serde(rename = "internalType", skip_serializing_if = "Option::is_none")]
24    pub internal_type: Option<String>,
25    /// The type of the parameter as it appears in the ABI
26    #[serde(rename = "type")]
27    pub r#type: String,
28    #[serde(rename = "components", skip_serializing_if = "Option::is_none")]
29    pub components: Option<Vec<models::Parameter>>,
30    /// The value of the parameter. can also be ParameterWithValue
31    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
32    pub value: Option<String>,
33    /// The function value of this param (if has one). If this is set, the
34    /// `value` shouldn`t be. Used for proxies
35    #[serde(rename = "functionValue", skip_serializing_if = "Option::is_none")]
36    pub function_value: Option<models::LeanAbiFunction>,
37}
38
39impl ParameterWithValue {
40    pub fn new(name: String, r#type: String) -> ParameterWithValue {
41        ParameterWithValue {
42            name,
43            description: None,
44            internal_type: None,
45            r#type,
46            components: None,
47            value: None,
48            function_value: None,
49        }
50    }
51}