aws_sdk_athena/operation/create_prepared_statement/
_create_prepared_statement_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreatePreparedStatementInput {
6 pub statement_name: ::std::option::Option<::std::string::String>,
8 pub work_group: ::std::option::Option<::std::string::String>,
10 pub query_statement: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14}
15impl CreatePreparedStatementInput {
16 pub fn statement_name(&self) -> ::std::option::Option<&str> {
18 self.statement_name.as_deref()
19 }
20 pub fn work_group(&self) -> ::std::option::Option<&str> {
22 self.work_group.as_deref()
23 }
24 pub fn query_statement(&self) -> ::std::option::Option<&str> {
26 self.query_statement.as_deref()
27 }
28 pub fn description(&self) -> ::std::option::Option<&str> {
30 self.description.as_deref()
31 }
32}
33impl CreatePreparedStatementInput {
34 pub fn builder() -> crate::operation::create_prepared_statement::builders::CreatePreparedStatementInputBuilder {
36 crate::operation::create_prepared_statement::builders::CreatePreparedStatementInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreatePreparedStatementInputBuilder {
44 pub(crate) statement_name: ::std::option::Option<::std::string::String>,
45 pub(crate) work_group: ::std::option::Option<::std::string::String>,
46 pub(crate) query_statement: ::std::option::Option<::std::string::String>,
47 pub(crate) description: ::std::option::Option<::std::string::String>,
48}
49impl CreatePreparedStatementInputBuilder {
50 pub fn statement_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.statement_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_statement_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.statement_name = input;
59 self
60 }
61 pub fn get_statement_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.statement_name
64 }
65 pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.work_group = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.work_group = input;
74 self
75 }
76 pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
78 &self.work_group
79 }
80 pub fn query_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.query_statement = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_query_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.query_statement = input;
89 self
90 }
91 pub fn get_query_statement(&self) -> &::std::option::Option<::std::string::String> {
93 &self.query_statement
94 }
95 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.description = ::std::option::Option::Some(input.into());
98 self
99 }
100 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.description = input;
103 self
104 }
105 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
107 &self.description
108 }
109 pub fn build(
111 self,
112 ) -> ::std::result::Result<
113 crate::operation::create_prepared_statement::CreatePreparedStatementInput,
114 ::aws_smithy_types::error::operation::BuildError,
115 > {
116 ::std::result::Result::Ok(crate::operation::create_prepared_statement::CreatePreparedStatementInput {
117 statement_name: self.statement_name,
118 work_group: self.work_group,
119 query_statement: self.query_statement,
120 description: self.description,
121 })
122 }
123}