/*
 * 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 QueryPositionsResponsePositionsInner {
    #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")]
    pub position_id: Option<i64>,
    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
    pub vendor: Option<String>,
    #[serde(rename = "chainId", skip_serializing_if = "Option::is_none")]
    pub chain_id: Option<String>,
    #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")]
    pub token_id: Option<String>,
    #[serde(rename = "collateralSymbol", skip_serializing_if = "Option::is_none")]
    pub collateral_symbol: Option<String>,
    #[serde(rename = "topicType", skip_serializing_if = "Option::is_none")]
    pub topic_type: 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 = "marketTopicTitle", skip_serializing_if = "Option::is_none")]
    pub market_topic_title: Option<String>,
    #[serde(rename = "marketTitle", skip_serializing_if = "Option::is_none")]
    pub market_title: Option<String>,
    #[serde(rename = "outcomeName", skip_serializing_if = "Option::is_none")]
    pub outcome_name: Option<String>,
    #[serde(rename = "outcomeIndex", skip_serializing_if = "Option::is_none")]
    pub outcome_index: Option<i32>,
    #[serde(rename = "shares", skip_serializing_if = "Option::is_none")]
    pub shares: Option<String>,
    #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")]
    pub avg_price: Option<String>,
    #[serde(rename = "totalCost", skip_serializing_if = "Option::is_none")]
    pub total_cost: Option<String>,
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
    #[serde(rename = "currentPrice", skip_serializing_if = "Option::is_none")]
    pub current_price: Option<String>,
    #[serde(rename = "toWin", skip_serializing_if = "Option::is_none")]
    pub to_win: Option<String>,
    #[serde(rename = "positionStatus", skip_serializing_if = "Option::is_none")]
    pub position_status: Option<String>,
    #[serde(rename = "canClaim", skip_serializing_if = "Option::is_none")]
    pub can_claim: Option<bool>,
    #[serde(rename = "endDate", skip_serializing_if = "Option::is_none")]
    pub end_date: Option<i64>,
    #[serde(rename = "unrealizedPnl", skip_serializing_if = "Option::is_none")]
    pub unrealized_pnl: Option<String>,
    #[serde(
        rename = "unrealizedPnlPercent",
        skip_serializing_if = "Option::is_none"
    )]
    pub unrealized_pnl_percent: Option<String>,
    #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")]
    pub realized_pnl: Option<String>,
    #[serde(rename = "pnl", skip_serializing_if = "Option::is_none")]
    pub pnl: Option<String>,
    #[serde(rename = "createdTime", skip_serializing_if = "Option::is_none")]
    pub created_time: Option<i64>,
    #[serde(rename = "updatedTime", skip_serializing_if = "Option::is_none")]
    pub updated_time: Option<i64>,
}

impl QueryPositionsResponsePositionsInner {
    #[must_use]
    pub fn new() -> QueryPositionsResponsePositionsInner {
        QueryPositionsResponsePositionsInner {
            position_id: None,
            vendor: None,
            chain_id: None,
            token_id: None,
            collateral_symbol: None,
            topic_type: None,
            market_topic_id: None,
            market_id: None,
            market_topic_title: None,
            market_title: None,
            outcome_name: None,
            outcome_index: None,
            shares: None,
            avg_price: None,
            total_cost: None,
            value: None,
            current_price: None,
            to_win: None,
            position_status: None,
            can_claim: None,
            end_date: None,
            unrealized_pnl: None,
            unrealized_pnl_percent: None,
            realized_pnl: None,
            pnl: None,
            created_time: None,
            updated_time: None,
        }
    }
}
