aws_sdk_deadline/operation/get_session/
_get_session_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 GetSessionInput {
6    /// <p>The farm ID for the session.</p>
7    pub farm_id: ::std::option::Option<::std::string::String>,
8    /// <p>The queue ID for the session.</p>
9    pub queue_id: ::std::option::Option<::std::string::String>,
10    /// <p>The job ID for the session.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12    /// <p>The session ID.</p>
13    pub session_id: ::std::option::Option<::std::string::String>,
14}
15impl GetSessionInput {
16    /// <p>The farm ID for the session.</p>
17    pub fn farm_id(&self) -> ::std::option::Option<&str> {
18        self.farm_id.as_deref()
19    }
20    /// <p>The queue ID for the session.</p>
21    pub fn queue_id(&self) -> ::std::option::Option<&str> {
22        self.queue_id.as_deref()
23    }
24    /// <p>The job ID for the session.</p>
25    pub fn job_id(&self) -> ::std::option::Option<&str> {
26        self.job_id.as_deref()
27    }
28    /// <p>The session ID.</p>
29    pub fn session_id(&self) -> ::std::option::Option<&str> {
30        self.session_id.as_deref()
31    }
32}
33impl GetSessionInput {
34    /// Creates a new builder-style object to manufacture [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
35    pub fn builder() -> crate::operation::get_session::builders::GetSessionInputBuilder {
36        crate::operation::get_session::builders::GetSessionInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetSessionInputBuilder {
44    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
45    pub(crate) queue_id: ::std::option::Option<::std::string::String>,
46    pub(crate) job_id: ::std::option::Option<::std::string::String>,
47    pub(crate) session_id: ::std::option::Option<::std::string::String>,
48}
49impl GetSessionInputBuilder {
50    /// <p>The farm ID for the session.</p>
51    /// This field is required.
52    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.farm_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The farm ID for the session.</p>
57    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.farm_id = input;
59        self
60    }
61    /// <p>The farm ID for the session.</p>
62    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.farm_id
64    }
65    /// <p>The queue ID for the session.</p>
66    /// This field is required.
67    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.queue_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The queue ID for the session.</p>
72    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.queue_id = input;
74        self
75    }
76    /// <p>The queue ID for the session.</p>
77    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.queue_id
79    }
80    /// <p>The job ID for the session.</p>
81    /// This field is required.
82    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.job_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The job ID for the session.</p>
87    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.job_id = input;
89        self
90    }
91    /// <p>The job ID for the session.</p>
92    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.job_id
94    }
95    /// <p>The session ID.</p>
96    /// This field is required.
97    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.session_id = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The session ID.</p>
102    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.session_id = input;
104        self
105    }
106    /// <p>The session ID.</p>
107    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
108        &self.session_id
109    }
110    /// Consumes the builder and constructs a [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
111    pub fn build(self) -> ::std::result::Result<crate::operation::get_session::GetSessionInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::get_session::GetSessionInput {
113            farm_id: self.farm_id,
114            queue_id: self.queue_id,
115            job_id: self.job_id,
116            session_id: self.session_id,
117        })
118    }
119}