Skip to main content

pt/models/
inline_response_200_9.rs

1/* 
2 * Polygon API
3 *
4 * The future of fintech.
5 *
6 * OpenAPI spec version: 1.0.1
7 * 
8 * Generated by: https://github.com/swagger-api/swagger-codegen.git
9 */
10#![allow(unused_imports)]
11
12use serde_json::Value;
13use bigdecimal::BigDecimal;
14use chrono::{NaiveDateTime, DateTime, FixedOffset, Utc};
15
16use crate::models::*;
17//use crate::date_serializer;
18//use crate::datetime_serializer;
19
20#[derive(Debug, Serialize, Deserialize, Clone)]
21pub struct InlineResponse2009 {
22  #[serde(rename = "status")]
23  status: String,  // success 
24  #[serde(rename = "symbol")]
25  symbol: String,  // AAPL 
26  #[serde(rename = "last")]
27  last: LastTrade 
28}
29
30impl InlineResponse2009 {
31  pub fn new(status: String, symbol: String, last: LastTrade, ) -> InlineResponse2009 {
32    InlineResponse2009 {
33      status: status,
34      symbol: symbol,
35      last: last
36    }
37  }
38
39  pub fn set_status(&mut self, status: String) {
40    self.status = status;
41  }
42
43  pub fn with_status(mut self, status: String) -> InlineResponse2009 {
44    self.status = status;
45    self
46  }
47
48  pub fn status(&self) -> &String {
49    &self.status
50  }
51
52
53  pub fn set_symbol(&mut self, symbol: String) {
54    self.symbol = symbol;
55  }
56
57  pub fn with_symbol(mut self, symbol: String) -> InlineResponse2009 {
58    self.symbol = symbol;
59    self
60  }
61
62  pub fn symbol(&self) -> &String {
63    &self.symbol
64  }
65
66
67  pub fn set_last(&mut self, last: LastTrade) {
68    self.last = last;
69  }
70
71  pub fn with_last(mut self, last: LastTrade) -> InlineResponse2009 {
72    self.last = last;
73    self
74  }
75
76  pub fn last(&self) -> &LastTrade {
77    &self.last
78  }
79
80
81}
82
83