aws_sdk_timestreamquery/types/
_execution_stats.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Statistics for a single scheduled query run.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExecutionStats {
7    /// <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
8    pub execution_time_in_millis: i64,
9    /// <p>Data writes metered for records ingested in a single scheduled query run.</p>
10    pub data_writes: i64,
11    /// <p>Bytes metered for a single scheduled query run.</p>
12    pub bytes_metered: i64,
13    /// <p>Bytes scanned for a single scheduled query run.</p>
14    pub cumulative_bytes_scanned: i64,
15    /// <p>The number of records ingested for a single scheduled query run.</p>
16    pub records_ingested: i64,
17    /// <p>Number of rows present in the output from running a query before ingestion to destination data source.</p>
18    pub query_result_rows: i64,
19}
20impl ExecutionStats {
21    /// <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
22    pub fn execution_time_in_millis(&self) -> i64 {
23        self.execution_time_in_millis
24    }
25    /// <p>Data writes metered for records ingested in a single scheduled query run.</p>
26    pub fn data_writes(&self) -> i64 {
27        self.data_writes
28    }
29    /// <p>Bytes metered for a single scheduled query run.</p>
30    pub fn bytes_metered(&self) -> i64 {
31        self.bytes_metered
32    }
33    /// <p>Bytes scanned for a single scheduled query run.</p>
34    pub fn cumulative_bytes_scanned(&self) -> i64 {
35        self.cumulative_bytes_scanned
36    }
37    /// <p>The number of records ingested for a single scheduled query run.</p>
38    pub fn records_ingested(&self) -> i64 {
39        self.records_ingested
40    }
41    /// <p>Number of rows present in the output from running a query before ingestion to destination data source.</p>
42    pub fn query_result_rows(&self) -> i64 {
43        self.query_result_rows
44    }
45}
46impl ExecutionStats {
47    /// Creates a new builder-style object to manufacture [`ExecutionStats`](crate::types::ExecutionStats).
48    pub fn builder() -> crate::types::builders::ExecutionStatsBuilder {
49        crate::types::builders::ExecutionStatsBuilder::default()
50    }
51}
52
53/// A builder for [`ExecutionStats`](crate::types::ExecutionStats).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct ExecutionStatsBuilder {
57    pub(crate) execution_time_in_millis: ::std::option::Option<i64>,
58    pub(crate) data_writes: ::std::option::Option<i64>,
59    pub(crate) bytes_metered: ::std::option::Option<i64>,
60    pub(crate) cumulative_bytes_scanned: ::std::option::Option<i64>,
61    pub(crate) records_ingested: ::std::option::Option<i64>,
62    pub(crate) query_result_rows: ::std::option::Option<i64>,
63}
64impl ExecutionStatsBuilder {
65    /// <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
66    pub fn execution_time_in_millis(mut self, input: i64) -> Self {
67        self.execution_time_in_millis = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
71    pub fn set_execution_time_in_millis(mut self, input: ::std::option::Option<i64>) -> Self {
72        self.execution_time_in_millis = input;
73        self
74    }
75    /// <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
76    pub fn get_execution_time_in_millis(&self) -> &::std::option::Option<i64> {
77        &self.execution_time_in_millis
78    }
79    /// <p>Data writes metered for records ingested in a single scheduled query run.</p>
80    pub fn data_writes(mut self, input: i64) -> Self {
81        self.data_writes = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>Data writes metered for records ingested in a single scheduled query run.</p>
85    pub fn set_data_writes(mut self, input: ::std::option::Option<i64>) -> Self {
86        self.data_writes = input;
87        self
88    }
89    /// <p>Data writes metered for records ingested in a single scheduled query run.</p>
90    pub fn get_data_writes(&self) -> &::std::option::Option<i64> {
91        &self.data_writes
92    }
93    /// <p>Bytes metered for a single scheduled query run.</p>
94    pub fn bytes_metered(mut self, input: i64) -> Self {
95        self.bytes_metered = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>Bytes metered for a single scheduled query run.</p>
99    pub fn set_bytes_metered(mut self, input: ::std::option::Option<i64>) -> Self {
100        self.bytes_metered = input;
101        self
102    }
103    /// <p>Bytes metered for a single scheduled query run.</p>
104    pub fn get_bytes_metered(&self) -> &::std::option::Option<i64> {
105        &self.bytes_metered
106    }
107    /// <p>Bytes scanned for a single scheduled query run.</p>
108    pub fn cumulative_bytes_scanned(mut self, input: i64) -> Self {
109        self.cumulative_bytes_scanned = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>Bytes scanned for a single scheduled query run.</p>
113    pub fn set_cumulative_bytes_scanned(mut self, input: ::std::option::Option<i64>) -> Self {
114        self.cumulative_bytes_scanned = input;
115        self
116    }
117    /// <p>Bytes scanned for a single scheduled query run.</p>
118    pub fn get_cumulative_bytes_scanned(&self) -> &::std::option::Option<i64> {
119        &self.cumulative_bytes_scanned
120    }
121    /// <p>The number of records ingested for a single scheduled query run.</p>
122    pub fn records_ingested(mut self, input: i64) -> Self {
123        self.records_ingested = ::std::option::Option::Some(input);
124        self
125    }
126    /// <p>The number of records ingested for a single scheduled query run.</p>
127    pub fn set_records_ingested(mut self, input: ::std::option::Option<i64>) -> Self {
128        self.records_ingested = input;
129        self
130    }
131    /// <p>The number of records ingested for a single scheduled query run.</p>
132    pub fn get_records_ingested(&self) -> &::std::option::Option<i64> {
133        &self.records_ingested
134    }
135    /// <p>Number of rows present in the output from running a query before ingestion to destination data source.</p>
136    pub fn query_result_rows(mut self, input: i64) -> Self {
137        self.query_result_rows = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>Number of rows present in the output from running a query before ingestion to destination data source.</p>
141    pub fn set_query_result_rows(mut self, input: ::std::option::Option<i64>) -> Self {
142        self.query_result_rows = input;
143        self
144    }
145    /// <p>Number of rows present in the output from running a query before ingestion to destination data source.</p>
146    pub fn get_query_result_rows(&self) -> &::std::option::Option<i64> {
147        &self.query_result_rows
148    }
149    /// Consumes the builder and constructs a [`ExecutionStats`](crate::types::ExecutionStats).
150    pub fn build(self) -> crate::types::ExecutionStats {
151        crate::types::ExecutionStats {
152            execution_time_in_millis: self.execution_time_in_millis.unwrap_or_default(),
153            data_writes: self.data_writes.unwrap_or_default(),
154            bytes_metered: self.bytes_metered.unwrap_or_default(),
155            cumulative_bytes_scanned: self.cumulative_bytes_scanned.unwrap_or_default(),
156            records_ingested: self.records_ingested.unwrap_or_default(),
157            query_result_rows: self.query_result_rows.unwrap_or_default(),
158        }
159    }
160}