aws_sdk_deadline/operation/update_session/
_update_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 UpdateSessionInput {
6    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The life cycle status to update in the session.</p>
9    pub target_lifecycle_status: ::std::option::Option<crate::types::SessionLifecycleTargetStatus>,
10    /// <p>The farm ID to update in the session.</p>
11    pub farm_id: ::std::option::Option<::std::string::String>,
12    /// <p>The queue ID to update in the session.</p>
13    pub queue_id: ::std::option::Option<::std::string::String>,
14    /// <p>The job ID to update in the session.</p>
15    pub job_id: ::std::option::Option<::std::string::String>,
16    /// <p>The session ID to update.</p>
17    pub session_id: ::std::option::Option<::std::string::String>,
18}
19impl UpdateSessionInput {
20    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
21    pub fn client_token(&self) -> ::std::option::Option<&str> {
22        self.client_token.as_deref()
23    }
24    /// <p>The life cycle status to update in the session.</p>
25    pub fn target_lifecycle_status(&self) -> ::std::option::Option<&crate::types::SessionLifecycleTargetStatus> {
26        self.target_lifecycle_status.as_ref()
27    }
28    /// <p>The farm ID to update in the session.</p>
29    pub fn farm_id(&self) -> ::std::option::Option<&str> {
30        self.farm_id.as_deref()
31    }
32    /// <p>The queue ID to update in the session.</p>
33    pub fn queue_id(&self) -> ::std::option::Option<&str> {
34        self.queue_id.as_deref()
35    }
36    /// <p>The job ID to update in the session.</p>
37    pub fn job_id(&self) -> ::std::option::Option<&str> {
38        self.job_id.as_deref()
39    }
40    /// <p>The session ID to update.</p>
41    pub fn session_id(&self) -> ::std::option::Option<&str> {
42        self.session_id.as_deref()
43    }
44}
45impl UpdateSessionInput {
46    /// Creates a new builder-style object to manufacture [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
47    pub fn builder() -> crate::operation::update_session::builders::UpdateSessionInputBuilder {
48        crate::operation::update_session::builders::UpdateSessionInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateSessionInputBuilder {
56    pub(crate) client_token: ::std::option::Option<::std::string::String>,
57    pub(crate) target_lifecycle_status: ::std::option::Option<crate::types::SessionLifecycleTargetStatus>,
58    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
59    pub(crate) queue_id: ::std::option::Option<::std::string::String>,
60    pub(crate) job_id: ::std::option::Option<::std::string::String>,
61    pub(crate) session_id: ::std::option::Option<::std::string::String>,
62}
63impl UpdateSessionInputBuilder {
64    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
65    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.client_token = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
70    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.client_token = input;
72        self
73    }
74    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
75    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
76        &self.client_token
77    }
78    /// <p>The life cycle status to update in the session.</p>
79    /// This field is required.
80    pub fn target_lifecycle_status(mut self, input: crate::types::SessionLifecycleTargetStatus) -> Self {
81        self.target_lifecycle_status = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The life cycle status to update in the session.</p>
85    pub fn set_target_lifecycle_status(mut self, input: ::std::option::Option<crate::types::SessionLifecycleTargetStatus>) -> Self {
86        self.target_lifecycle_status = input;
87        self
88    }
89    /// <p>The life cycle status to update in the session.</p>
90    pub fn get_target_lifecycle_status(&self) -> &::std::option::Option<crate::types::SessionLifecycleTargetStatus> {
91        &self.target_lifecycle_status
92    }
93    /// <p>The farm ID to update in the session.</p>
94    /// This field is required.
95    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.farm_id = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The farm ID to update in the session.</p>
100    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.farm_id = input;
102        self
103    }
104    /// <p>The farm ID to update in the session.</p>
105    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
106        &self.farm_id
107    }
108    /// <p>The queue ID to update in the session.</p>
109    /// This field is required.
110    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.queue_id = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The queue ID to update in the session.</p>
115    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.queue_id = input;
117        self
118    }
119    /// <p>The queue ID to update in the session.</p>
120    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
121        &self.queue_id
122    }
123    /// <p>The job ID to update in the session.</p>
124    /// This field is required.
125    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.job_id = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The job ID to update in the session.</p>
130    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.job_id = input;
132        self
133    }
134    /// <p>The job ID to update in the session.</p>
135    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
136        &self.job_id
137    }
138    /// <p>The session ID to update.</p>
139    /// This field is required.
140    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.session_id = ::std::option::Option::Some(input.into());
142        self
143    }
144    /// <p>The session ID to update.</p>
145    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.session_id = input;
147        self
148    }
149    /// <p>The session ID to update.</p>
150    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
151        &self.session_id
152    }
153    /// Consumes the builder and constructs a [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
154    pub fn build(
155        self,
156    ) -> ::std::result::Result<crate::operation::update_session::UpdateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
157        ::std::result::Result::Ok(crate::operation::update_session::UpdateSessionInput {
158            client_token: self.client_token,
159            target_lifecycle_status: self.target_lifecycle_status,
160            farm_id: self.farm_id,
161            queue_id: self.queue_id,
162            job_id: self.job_id,
163            session_id: self.session_id,
164        })
165    }
166}