aws_sdk_glue/operation/run_statement/
_run_statement_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RunStatementInput {
6 pub session_id: ::std::option::Option<::std::string::String>,
8 pub code: ::std::option::Option<::std::string::String>,
10 pub request_origin: ::std::option::Option<::std::string::String>,
12}
13impl RunStatementInput {
14 pub fn session_id(&self) -> ::std::option::Option<&str> {
16 self.session_id.as_deref()
17 }
18 pub fn code(&self) -> ::std::option::Option<&str> {
20 self.code.as_deref()
21 }
22 pub fn request_origin(&self) -> ::std::option::Option<&str> {
24 self.request_origin.as_deref()
25 }
26}
27impl RunStatementInput {
28 pub fn builder() -> crate::operation::run_statement::builders::RunStatementInputBuilder {
30 crate::operation::run_statement::builders::RunStatementInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct RunStatementInputBuilder {
38 pub(crate) session_id: ::std::option::Option<::std::string::String>,
39 pub(crate) code: ::std::option::Option<::std::string::String>,
40 pub(crate) request_origin: ::std::option::Option<::std::string::String>,
41}
42impl RunStatementInputBuilder {
43 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.session_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.session_id = input;
52 self
53 }
54 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.session_id
57 }
58 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.code = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.code = input;
67 self
68 }
69 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
71 &self.code
72 }
73 pub fn request_origin(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.request_origin = ::std::option::Option::Some(input.into());
76 self
77 }
78 pub fn set_request_origin(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.request_origin = input;
81 self
82 }
83 pub fn get_request_origin(&self) -> &::std::option::Option<::std::string::String> {
85 &self.request_origin
86 }
87 pub fn build(
89 self,
90 ) -> ::std::result::Result<crate::operation::run_statement::RunStatementInput, ::aws_smithy_types::error::operation::BuildError> {
91 ::std::result::Result::Ok(crate::operation::run_statement::RunStatementInput {
92 session_id: self.session_id,
93 code: self.code,
94 request_origin: self.request_origin,
95 })
96 }
97}