aws_sdk_iotsitewise/operation/execute_query/
_execute_query_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ExecuteQueryInput {
6    /// <p>The IoT SiteWise query statement.</p>
7    pub query_statement: ::std::option::Option<::std::string::String>,
8    /// <p>The string that specifies the next page of results.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return at one time.</p>
11    /// <ul>
12    /// <li>
13    /// <p>Minimum is 1</p></li>
14    /// <li>
15    /// <p>Maximum is 20000</p></li>
16    /// <li>
17    /// <p>Default is 20000</p></li>
18    /// </ul>
19    pub max_results: ::std::option::Option<i32>,
20    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
21    pub client_token: ::std::option::Option<::std::string::String>,
22}
23impl ExecuteQueryInput {
24    /// <p>The IoT SiteWise query statement.</p>
25    pub fn query_statement(&self) -> ::std::option::Option<&str> {
26        self.query_statement.as_deref()
27    }
28    /// <p>The string that specifies the next page of results.</p>
29    pub fn next_token(&self) -> ::std::option::Option<&str> {
30        self.next_token.as_deref()
31    }
32    /// <p>The maximum number of results to return at one time.</p>
33    /// <ul>
34    /// <li>
35    /// <p>Minimum is 1</p></li>
36    /// <li>
37    /// <p>Maximum is 20000</p></li>
38    /// <li>
39    /// <p>Default is 20000</p></li>
40    /// </ul>
41    pub fn max_results(&self) -> ::std::option::Option<i32> {
42        self.max_results
43    }
44    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
45    pub fn client_token(&self) -> ::std::option::Option<&str> {
46        self.client_token.as_deref()
47    }
48}
49impl ExecuteQueryInput {
50    /// Creates a new builder-style object to manufacture [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
51    pub fn builder() -> crate::operation::execute_query::builders::ExecuteQueryInputBuilder {
52        crate::operation::execute_query::builders::ExecuteQueryInputBuilder::default()
53    }
54}
55
56/// A builder for [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct ExecuteQueryInputBuilder {
60    pub(crate) query_statement: ::std::option::Option<::std::string::String>,
61    pub(crate) next_token: ::std::option::Option<::std::string::String>,
62    pub(crate) max_results: ::std::option::Option<i32>,
63    pub(crate) client_token: ::std::option::Option<::std::string::String>,
64}
65impl ExecuteQueryInputBuilder {
66    /// <p>The IoT SiteWise query statement.</p>
67    /// This field is required.
68    pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.query_statement = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The IoT SiteWise query statement.</p>
73    pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.query_statement = input;
75        self
76    }
77    /// <p>The IoT SiteWise query statement.</p>
78    pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
79        &self.query_statement
80    }
81    /// <p>The string that specifies the next page of results.</p>
82    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.next_token = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The string that specifies the next page of results.</p>
87    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.next_token = input;
89        self
90    }
91    /// <p>The string that specifies the next page of results.</p>
92    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
93        &self.next_token
94    }
95    /// <p>The maximum number of results to return at one time.</p>
96    /// <ul>
97    /// <li>
98    /// <p>Minimum is 1</p></li>
99    /// <li>
100    /// <p>Maximum is 20000</p></li>
101    /// <li>
102    /// <p>Default is 20000</p></li>
103    /// </ul>
104    pub fn max_results(mut self, input: i32) -> Self {
105        self.max_results = ::std::option::Option::Some(input);
106        self
107    }
108    /// <p>The maximum number of results to return at one time.</p>
109    /// <ul>
110    /// <li>
111    /// <p>Minimum is 1</p></li>
112    /// <li>
113    /// <p>Maximum is 20000</p></li>
114    /// <li>
115    /// <p>Default is 20000</p></li>
116    /// </ul>
117    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
118        self.max_results = input;
119        self
120    }
121    /// <p>The maximum number of results to return at one time.</p>
122    /// <ul>
123    /// <li>
124    /// <p>Minimum is 1</p></li>
125    /// <li>
126    /// <p>Maximum is 20000</p></li>
127    /// <li>
128    /// <p>Default is 20000</p></li>
129    /// </ul>
130    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
131        &self.max_results
132    }
133    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
134    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.client_token = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
139    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.client_token = input;
141        self
142    }
143    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
144    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
145        &self.client_token
146    }
147    /// Consumes the builder and constructs a [`ExecuteQueryInput`](crate::operation::execute_query::ExecuteQueryInput).
148    pub fn build(
149        self,
150    ) -> ::std::result::Result<crate::operation::execute_query::ExecuteQueryInput, ::aws_smithy_types::error::operation::BuildError> {
151        ::std::result::Result::Ok(crate::operation::execute_query::ExecuteQueryInput {
152            query_statement: self.query_statement,
153            next_token: self.next_token,
154            max_results: self.max_results,
155            client_token: self.client_token,
156        })
157    }
158}