/*
 * Prediction Trading REST API
 *
 * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#![allow(unused_imports)]
use crate::w3w_prediction::rest_api::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetPortfolioResponsePositionsInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i64>,
    #[serde(rename = "walletAddress", skip_serializing_if = "Option::is_none")]
    pub wallet_address: Option<String>,
    #[serde(rename = "marketTopicId", skip_serializing_if = "Option::is_none")]
    pub market_topic_id: Option<i64>,
    #[serde(rename = "marketId", skip_serializing_if = "Option::is_none")]
    pub market_id: Option<i64>,
    #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")]
    pub token_id: Option<String>,
    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
    pub vendor: Option<String>,
    #[serde(rename = "currentShares", skip_serializing_if = "Option::is_none")]
    pub current_shares: Option<String>,
    #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")]
    pub avg_price: Option<String>,
    #[serde(rename = "currentPrice", skip_serializing_if = "Option::is_none")]
    pub current_price: Option<String>,
    #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")]
    pub realized_pnl: Option<String>,
    #[serde(rename = "unrealizedPnl", skip_serializing_if = "Option::is_none")]
    pub unrealized_pnl: Option<String>,
    #[serde(rename = "totalPnl", skip_serializing_if = "Option::is_none")]
    pub total_pnl: Option<String>,
    #[serde(rename = "pnlPercentage", skip_serializing_if = "Option::is_none")]
    pub pnl_percentage: Option<String>,
    #[serde(rename = "isResolved", skip_serializing_if = "Option::is_none")]
    pub is_resolved: Option<bool>,
}

impl GetPortfolioResponsePositionsInner {
    #[must_use]
    pub fn new() -> GetPortfolioResponsePositionsInner {
        GetPortfolioResponsePositionsInner {
            id: None,
            wallet_address: None,
            market_topic_id: None,
            market_id: None,
            token_id: None,
            vendor: None,
            current_shares: None,
            avg_price: None,
            current_price: None,
            realized_pnl: None,
            unrealized_pnl: None,
            total_pnl: None,
            pnl_percentage: None,
            is_resolved: None,
        }
    }
}
