// @generated by FORGE - DO NOT EDIT

#![allow(
    dead_code,
    unused_imports,
    clippy::redundant_field_names,
    clippy::too_many_arguments
)]

use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AuthResponse {
    pub access_token: String,
    pub refresh_token: String,
    pub user: UserPublic,
}

impl AuthResponse {
    pub fn new(
        access_token: impl Into<String>,
        refresh_token: impl Into<String>,
        user: UserPublic,
    ) -> Self {
        Self {
            access_token: access_token.into(),
            refresh_token: refresh_token.into(),
            user: user,
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BinanceTrade {
    pub symbol: String,
    pub price: String,
    pub quantity: String,
    pub trade_time: i64,
    pub is_buyer_maker: bool,
}

impl BinanceTrade {
    pub fn new(
        symbol: impl Into<String>,
        price: impl Into<String>,
        quantity: impl Into<String>,
        trade_time: i64,
        is_buyer_maker: bool,
    ) -> Self {
        Self {
            symbol: symbol.into(),
            price: price.into(),
            quantity: quantity.into(),
            trade_time: trade_time,
            is_buyer_maker: is_buyer_maker,
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ConfirmVerificationInput {
    pub workflow_id: String,
}

impl ConfirmVerificationInput {
    pub fn new(workflow_id: impl Into<String>) -> Self {
        Self {
            workflow_id: workflow_id.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DemoStats {
    pub total_users: i64,
    pub total_trades: i64,
    pub total_webhooks: i64,
    pub computed_at: String,
}

impl DemoStats {
    pub fn new(
        total_users: i64,
        total_trades: i64,
        total_webhooks: i64,
        computed_at: impl Into<String>,
    ) -> Self {
        Self {
            total_users: total_users,
            total_trades: total_trades,
            total_webhooks: total_webhooks,
            computed_at: computed_at.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExportInput {
    pub format: String,
}

impl ExportInput {
    pub fn new(format: impl Into<String>) -> Self {
        Self {
            format: format.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExportOutput {
    pub count: i64,
    pub data: String,
    pub format: String,
}

impl ExportOutput {
    pub fn new(count: i64, data: impl Into<String>, format: impl Into<String>) -> Self {
        Self {
            count: count,
            data: data.into(),
            format: format.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IssApiResponse {
    pub iss_position: IssPosition,
    pub timestamp: i64,
    pub message: String,
}

impl IssApiResponse {
    pub fn new(iss_position: IssPosition, timestamp: i64, message: impl Into<String>) -> Self {
        Self {
            iss_position: iss_position,
            timestamp: timestamp,
            message: message.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IssLocation {
    pub id: String,
    pub latitude: f64,
    pub longitude: f64,
    pub api_timestamp: String,
    pub created_at: String,
}

impl IssLocation {
    pub fn new(
        id: impl Into<String>,
        latitude: f64,
        longitude: f64,
        api_timestamp: impl Into<String>,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            latitude: latitude,
            longitude: longitude,
            api_timestamp: api_timestamp.into(),
            created_at: created_at.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IssPosition {
    pub latitude: String,
    pub longitude: String,
}

impl IssPosition {
    pub fn new(latitude: impl Into<String>, longitude: impl Into<String>) -> Self {
        Self {
            latitude: latitude.into(),
            longitude: longitude.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoginInput {
    pub email: String,
    pub password: String,
}

impl LoginInput {
    pub fn new(email: impl Into<String>, password: impl Into<String>) -> Self {
        Self {
            email: email.into(),
            password: password.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct McpGetUserInput {
    pub email: String,
}

impl McpGetUserInput {
    pub fn new(email: impl Into<String>) -> Self {
        Self {
            email: email.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct McpUserInfo {
    pub id: String,
    pub email: String,
    pub name: String,
    pub role: UserRole,
}

impl McpUserInfo {
    pub fn new(
        id: impl Into<String>,
        email: impl Into<String>,
        name: impl Into<String>,
        role: UserRole,
    ) -> Self {
        Self {
            id: id.into(),
            email: email.into(),
            name: name.into(),
            role: role,
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RefreshInput {
    pub refresh_token: String,
}

impl RefreshInput {
    pub fn new(refresh_token: impl Into<String>) -> Self {
        Self {
            refresh_token: refresh_token.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegisterInput {
    pub email: String,
    pub name: String,
    pub password: String,
}

impl RegisterInput {
    pub fn new(
        email: impl Into<String>,
        name: impl Into<String>,
        password: impl Into<String>,
    ) -> Self {
        Self {
            email: email.into(),
            name: name.into(),
            password: password.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Trade {
    pub id: String,
    pub symbol: String,
    pub price: f64,
    pub quantity: f64,
    pub trade_time: String,
    pub is_buyer_maker: bool,
    pub created_at: String,
}

impl Trade {
    pub fn new(
        id: impl Into<String>,
        symbol: impl Into<String>,
        price: f64,
        quantity: f64,
        trade_time: impl Into<String>,
        is_buyer_maker: bool,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            symbol: symbol.into(),
            price: price,
            quantity: quantity,
            trade_time: trade_time.into(),
            is_buyer_maker: is_buyer_maker,
            created_at: created_at.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct User {
    pub id: String,
    pub email: String,
    pub name: String,
    pub role: UserRole,
    pub created_at: String,
    pub updated_at: String,
    pub password_hash: Option<String>,
}

impl User {
    pub fn new(
        id: impl Into<String>,
        email: impl Into<String>,
        name: impl Into<String>,
        role: UserRole,
        created_at: impl Into<String>,
        updated_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            email: email.into(),
            name: name.into(),
            role: role,
            created_at: created_at.into(),
            updated_at: updated_at.into(),
            password_hash: None,
        }
    }

    pub fn password_hash(mut self, password_hash: impl Into<String>) -> Self {
        self.password_hash = Some(password_hash.into());
        self
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserPublic {
    pub id: String,
    pub email: String,
    pub name: String,
    pub role: UserRole,
    pub created_at: String,
    pub updated_at: String,
}

impl UserPublic {
    pub fn new(
        id: impl Into<String>,
        email: impl Into<String>,
        name: impl Into<String>,
        role: UserRole,
        created_at: impl Into<String>,
        updated_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            email: email.into(),
            name: name.into(),
            role: role,
            created_at: created_at.into(),
            updated_at: updated_at.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VerificationInput {
    pub account_id: String,
    pub email: String,
}

impl VerificationInput {
    pub fn new(account_id: impl Into<String>, email: impl Into<String>) -> Self {
        Self {
            account_id: account_id.into(),
            email: email.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VerificationOutput {
    pub verified: bool,
    pub token: String,
}

impl VerificationOutput {
    pub fn new(verified: bool, token: impl Into<String>) -> Self {
        Self {
            verified: verified,
            token: token.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookEvent {
    pub id: String,
    pub idempotency_key: String,
    pub webhook_name: String,
    pub processed_at: String,
}

impl WebhookEvent {
    pub fn new(
        id: impl Into<String>,
        idempotency_key: impl Into<String>,
        webhook_name: impl Into<String>,
        processed_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            idempotency_key: idempotency_key.into(),
            webhook_name: webhook_name.into(),
            processed_at: processed_at.into(),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum UserRole {
    Admin,
    Member,
    Guest,
}
