/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RevokeLinkedSignerDtoData {
    /// Id representing the registered subaccount
    #[serde(rename = "subaccountId")]
    pub subaccount_id: uuid::Uuid,
    /// Address of account that created the signature in this message
    #[serde(rename = "sender")]
    pub sender: String,
    /// Bytes32 encoded subaccount name (0x prefix, zero padded)
    #[serde(rename = "subaccount")]
    pub subaccount: String,
    /// Address of signer to revoke
    #[serde(rename = "signer")]
    pub signer: String,
    /// Message nonce timestamp (nanoseconds since Unix Epoch)
    #[serde(rename = "nonce")]
    pub nonce: String,
    /// Message signedAt current timestamp (seconds since Unix Epoch)
    #[serde(rename = "signedAt")]
    pub signed_at: i64,
}

impl RevokeLinkedSignerDtoData {
    pub fn new(
        subaccount_id: uuid::Uuid,
        sender: String,
        subaccount: String,
        signer: String,
        nonce: String,
        signed_at: i64,
    ) -> RevokeLinkedSignerDtoData {
        RevokeLinkedSignerDtoData {
            subaccount_id,
            sender,
            subaccount,
            signer,
            nonce,
            signed_at,
        }
    }
}
