aws_sdk_timestreamquery/operation/prepare_query/
_prepare_query_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct PrepareQueryInput {
6 pub query_string: ::std::option::Option<::std::string::String>,
8 pub validate_only: ::std::option::Option<bool>,
10}
11impl PrepareQueryInput {
12 pub fn query_string(&self) -> ::std::option::Option<&str> {
14 self.query_string.as_deref()
15 }
16 pub fn validate_only(&self) -> ::std::option::Option<bool> {
18 self.validate_only
19 }
20}
21impl ::std::fmt::Debug for PrepareQueryInput {
22 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23 let mut formatter = f.debug_struct("PrepareQueryInput");
24 formatter.field("query_string", &"*** Sensitive Data Redacted ***");
25 formatter.field("validate_only", &self.validate_only);
26 formatter.finish()
27 }
28}
29impl PrepareQueryInput {
30 pub fn builder() -> crate::operation::prepare_query::builders::PrepareQueryInputBuilder {
32 crate::operation::prepare_query::builders::PrepareQueryInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
38#[non_exhaustive]
39pub struct PrepareQueryInputBuilder {
40 pub(crate) query_string: ::std::option::Option<::std::string::String>,
41 pub(crate) validate_only: ::std::option::Option<bool>,
42}
43impl PrepareQueryInputBuilder {
44 pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.query_string = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.query_string = input;
53 self
54 }
55 pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
57 &self.query_string
58 }
59 pub fn validate_only(mut self, input: bool) -> Self {
61 self.validate_only = ::std::option::Option::Some(input);
62 self
63 }
64 pub fn set_validate_only(mut self, input: ::std::option::Option<bool>) -> Self {
66 self.validate_only = input;
67 self
68 }
69 pub fn get_validate_only(&self) -> &::std::option::Option<bool> {
71 &self.validate_only
72 }
73 pub fn build(
75 self,
76 ) -> ::std::result::Result<crate::operation::prepare_query::PrepareQueryInput, ::aws_smithy_types::error::operation::BuildError> {
77 ::std::result::Result::Ok(crate::operation::prepare_query::PrepareQueryInput {
78 query_string: self.query_string,
79 validate_only: self.validate_only,
80 })
81 }
82}
83impl ::std::fmt::Debug for PrepareQueryInputBuilder {
84 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
85 let mut formatter = f.debug_struct("PrepareQueryInputBuilder");
86 formatter.field("query_string", &"*** Sensitive Data Redacted ***");
87 formatter.field("validate_only", &self.validate_only);
88 formatter.finish()
89 }
90}