fireblocks-sdk 2025.10.17

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

/// PolicyRuleErrorV2 : Rule validation result error
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PolicyRuleErrorV2 {
    /// Error message
    #[serde(rename = "errorMessage")]
    pub error_message: String,
    /// error code
    #[serde(rename = "errorCode")]
    pub error_code: f64,
    /// error code name
    #[serde(rename = "errorCodeName")]
    pub error_code_name: String,
    /// The field which the error relates to: * operator - transaction initiator
    /// * operators - transaction initiators * authorizationGroups - transaction
    /// authorizer groups * designatedSigner - transaction signer *
    /// designatedSigners - transaction signers * contractMethods - contract
    /// methods * amountAggregation - transaction amount aggregation
    /// configuration * src - transaction source asset configuration * dst -
    /// transaction destination asset configuration
    #[serde(rename = "errorField")]
    pub error_field: ErrorField,
}

impl PolicyRuleErrorV2 {
    /// Rule validation result error
    pub fn new(
        error_message: String,
        error_code: f64,
        error_code_name: String,
        error_field: ErrorField,
    ) -> PolicyRuleErrorV2 {
        PolicyRuleErrorV2 {
            error_message,
            error_code,
            error_code_name,
            error_field,
        }
    }
}
/// The field which the error relates to: * operator - transaction initiator *
/// operators - transaction initiators * authorizationGroups - transaction
/// authorizer groups * designatedSigner - transaction signer *
/// designatedSigners - transaction signers * contractMethods - contract methods
/// * amountAggregation - transaction amount aggregation configuration * src -
/// transaction source asset configuration * dst - transaction destination asset
/// configuration
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ErrorField {
    #[serde(rename = "operator")]
    Operator,
    #[serde(rename = "operators")]
    Operators,
    #[serde(rename = "authorizationGroups")]
    AuthorizationGroups,
    #[serde(rename = "designatedSigner")]
    DesignatedSigner,
    #[serde(rename = "designatedSigners")]
    DesignatedSigners,
    #[serde(rename = "contractMethods")]
    ContractMethods,
    #[serde(rename = "amountAggregation")]
    AmountAggregation,
    #[serde(rename = "src")]
    Src,
    #[serde(rename = "dst")]
    Dst,
}

impl Default for ErrorField {
    fn default() -> ErrorField {
        Self::Operator
    }
}