/*
 * 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 DomainTypeDto {
    /// Name of signing domain
    #[serde(rename = "name")]
    pub name: String,
    /// Current major version of the signing domain
    #[serde(rename = "version")]
    pub version: String,
    /// The EIP-155 chain id
    #[serde(rename = "chainId")]
    pub chain_id: i64,
    /// Address of the contract that will verify the signature
    #[serde(rename = "verifyingContract")]
    pub verifying_contract: String,
}

impl DomainTypeDto {
    pub fn new(
        name: String,
        version: String,
        chain_id: i64,
        verifying_contract: String,
    ) -> DomainTypeDto {
        DomainTypeDto {
            name,
            version,
            chain_id,
            verifying_contract,
        }
    }
}
