1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PrepareQueryInput {
    /// <p>The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. </p>
    pub query_string: ::std::option::Option<::std::string::String>,
    /// <p>By setting this value to <code>true</code>, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.</p>
    pub validate_only: ::std::option::Option<bool>,
}
impl PrepareQueryInput {
    /// <p>The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. </p>
    pub fn query_string(&self) -> ::std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <p>By setting this value to <code>true</code>, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.</p>
    pub fn validate_only(&self) -> ::std::option::Option<bool> {
        self.validate_only
    }
}
impl ::std::fmt::Debug for PrepareQueryInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PrepareQueryInput");
        formatter.field("query_string", &"*** Sensitive Data Redacted ***");
        formatter.field("validate_only", &self.validate_only);
        formatter.finish()
    }
}
impl PrepareQueryInput {
    /// Creates a new builder-style object to manufacture [`PrepareQueryInput`](crate::operation::prepare_query::PrepareQueryInput).
    pub fn builder() -> crate::operation::prepare_query::builders::PrepareQueryInputBuilder {
        crate::operation::prepare_query::builders::PrepareQueryInputBuilder::default()
    }
}

/// A builder for [`PrepareQueryInput`](crate::operation::prepare_query::PrepareQueryInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PrepareQueryInputBuilder {
    pub(crate) query_string: ::std::option::Option<::std::string::String>,
    pub(crate) validate_only: ::std::option::Option<bool>,
}
impl PrepareQueryInputBuilder {
    /// <p>The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. </p>
    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_string = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. </p>
    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_string = input;
        self
    }
    /// <p>The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. </p>
    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_string
    }
    /// <p>By setting this value to <code>true</code>, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.</p>
    pub fn validate_only(mut self, input: bool) -> Self {
        self.validate_only = ::std::option::Option::Some(input);
        self
    }
    /// <p>By setting this value to <code>true</code>, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.</p>
    pub fn set_validate_only(mut self, input: ::std::option::Option<bool>) -> Self {
        self.validate_only = input;
        self
    }
    /// <p>By setting this value to <code>true</code>, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.</p>
    pub fn get_validate_only(&self) -> &::std::option::Option<bool> {
        &self.validate_only
    }
    /// Consumes the builder and constructs a [`PrepareQueryInput`](crate::operation::prepare_query::PrepareQueryInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::prepare_query::PrepareQueryInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::prepare_query::PrepareQueryInput {
            query_string: self.query_string,
            validate_only: self.validate_only,
        })
    }
}
impl ::std::fmt::Debug for PrepareQueryInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PrepareQueryInputBuilder");
        formatter.field("query_string", &"*** Sensitive Data Redacted ***");
        formatter.field("validate_only", &self.validate_only);
        formatter.finish()
    }
}