satstream_rust_sdk/models/
responses_block_range.rs1#[allow(unused_imports)]
13use serde_json::Value;
14
15#[derive(Debug, Serialize, Deserialize)]
16pub struct ResponsesBlockRange {
17 #[serde(rename = "end")]
18 end: Option<i32>,
19 #[serde(rename = "start")]
20 start: Option<i32>
21}
22
23impl ResponsesBlockRange {
24 pub fn new() -> ResponsesBlockRange {
25 ResponsesBlockRange {
26 end: None,
27 start: None
28 }
29 }
30
31 pub fn set_end(&mut self, end: i32) {
32 self.end = Some(end);
33 }
34
35 pub fn with_end(mut self, end: i32) -> ResponsesBlockRange {
36 self.end = Some(end);
37 self
38 }
39
40 pub fn end(&self) -> Option<&i32> {
41 self.end.as_ref()
42 }
43
44 pub fn reset_end(&mut self) {
45 self.end = None;
46 }
47
48 pub fn set_start(&mut self, start: i32) {
49 self.start = Some(start);
50 }
51
52 pub fn with_start(mut self, start: i32) -> ResponsesBlockRange {
53 self.start = Some(start);
54 self
55 }
56
57 pub fn start(&self) -> Option<&i32> {
58 self.start.as_ref()
59 }
60
61 pub fn reset_start(&mut self) {
62 self.start = None;
63 }
64
65}
66
67
68