aws_sdk_iottwinmaker/operation/execute_query/
_execute_query_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ExecuteQueryInput {
6 pub workspace_id: ::std::option::Option<::std::string::String>,
8 pub query_statement: ::std::option::Option<::std::string::String>,
10 pub max_results: ::std::option::Option<i32>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl ExecuteQueryInput {
16 pub fn workspace_id(&self) -> ::std::option::Option<&str> {
18 self.workspace_id.as_deref()
19 }
20 pub fn query_statement(&self) -> ::std::option::Option<&str> {
22 self.query_statement.as_deref()
23 }
24 pub fn max_results(&self) -> ::std::option::Option<i32> {
26 self.max_results
27 }
28 pub fn next_token(&self) -> ::std::option::Option<&str> {
30 self.next_token.as_deref()
31 }
32}
33impl ExecuteQueryInput {
34 pub fn builder() -> crate::operation::execute_query::builders::ExecuteQueryInputBuilder {
36 crate::operation::execute_query::builders::ExecuteQueryInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct ExecuteQueryInputBuilder {
44 pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
45 pub(crate) query_statement: ::std::option::Option<::std::string::String>,
46 pub(crate) max_results: ::std::option::Option<i32>,
47 pub(crate) next_token: ::std::option::Option<::std::string::String>,
48}
49impl ExecuteQueryInputBuilder {
50 pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.workspace_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.workspace_id = input;
59 self
60 }
61 pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.workspace_id
64 }
65 pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.query_statement = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.query_statement = input;
74 self
75 }
76 pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
78 &self.query_statement
79 }
80 pub fn max_results(mut self, input: i32) -> Self {
82 self.max_results = ::std::option::Option::Some(input);
83 self
84 }
85 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
87 self.max_results = input;
88 self
89 }
90 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
92 &self.max_results
93 }
94 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.next_token = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.next_token = input;
102 self
103 }
104 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106 &self.next_token
107 }
108 pub fn build(
110 self,
111 ) -> ::std::result::Result<crate::operation::execute_query::ExecuteQueryInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::execute_query::ExecuteQueryInput {
113 workspace_id: self.workspace_id,
114 query_statement: self.query_statement,
115 max_results: self.max_results,
116 next_token: self.next_token,
117 })
118 }
119}