aws_sdk_glue/operation/get_statement/
_get_statement_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetStatementInput {
6    /// <p>The Session ID of the statement.</p>
7    pub session_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Id of the statement.</p>
9    pub id: ::std::option::Option<i32>,
10    /// <p>The origin of the request.</p>
11    pub request_origin: ::std::option::Option<::std::string::String>,
12}
13impl GetStatementInput {
14    /// <p>The Session ID of the statement.</p>
15    pub fn session_id(&self) -> ::std::option::Option<&str> {
16        self.session_id.as_deref()
17    }
18    /// <p>The Id of the statement.</p>
19    pub fn id(&self) -> ::std::option::Option<i32> {
20        self.id
21    }
22    /// <p>The origin of the request.</p>
23    pub fn request_origin(&self) -> ::std::option::Option<&str> {
24        self.request_origin.as_deref()
25    }
26}
27impl GetStatementInput {
28    /// Creates a new builder-style object to manufacture [`GetStatementInput`](crate::operation::get_statement::GetStatementInput).
29    pub fn builder() -> crate::operation::get_statement::builders::GetStatementInputBuilder {
30        crate::operation::get_statement::builders::GetStatementInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetStatementInput`](crate::operation::get_statement::GetStatementInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetStatementInputBuilder {
38    pub(crate) session_id: ::std::option::Option<::std::string::String>,
39    pub(crate) id: ::std::option::Option<i32>,
40    pub(crate) request_origin: ::std::option::Option<::std::string::String>,
41}
42impl GetStatementInputBuilder {
43    /// <p>The Session ID of the statement.</p>
44    /// This field is required.
45    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    /// <p>The Session ID of the statement.</p>
50    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.session_id = input;
52        self
53    }
54    /// <p>The Session ID of the statement.</p>
55    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.session_id
57    }
58    /// <p>The Id of the statement.</p>
59    /// This field is required.
60    pub fn id(mut self, input: i32) -> Self {
61        self.id = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>The Id of the statement.</p>
65    pub fn set_id(mut self, input: ::std::option::Option<i32>) -> Self {
66        self.id = input;
67        self
68    }
69    /// <p>The Id of the statement.</p>
70    pub fn get_id(&self) -> &::std::option::Option<i32> {
71        &self.id
72    }
73    /// <p>The origin of the request.</p>
74    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    /// <p>The origin of the request.</p>
79    pub fn set_request_origin(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.request_origin = input;
81        self
82    }
83    /// <p>The origin of the request.</p>
84    pub fn get_request_origin(&self) -> &::std::option::Option<::std::string::String> {
85        &self.request_origin
86    }
87    /// Consumes the builder and constructs a [`GetStatementInput`](crate::operation::get_statement::GetStatementInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::get_statement::GetStatementInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::get_statement::GetStatementInput {
92            session_id: self.session_id,
93            id: self.id,
94            request_origin: self.request_origin,
95        })
96    }
97}