aws_sdk_dataexchange/operation/create_job/
_create_job_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateJobOutput {
6 pub arn: ::std::option::Option<::std::string::String>,
8 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
10 pub details: ::std::option::Option<crate::types::ResponseDetails>,
12 pub errors: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>,
14 pub id: ::std::option::Option<::std::string::String>,
16 pub state: ::std::option::Option<crate::types::State>,
18 pub r#type: ::std::option::Option<crate::types::Type>,
20 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 _request_id: Option<String>,
23}
24impl CreateJobOutput {
25 pub fn arn(&self) -> ::std::option::Option<&str> {
27 self.arn.as_deref()
28 }
29 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31 self.created_at.as_ref()
32 }
33 pub fn details(&self) -> ::std::option::Option<&crate::types::ResponseDetails> {
35 self.details.as_ref()
36 }
37 pub fn errors(&self) -> &[crate::types::JobError] {
41 self.errors.as_deref().unwrap_or_default()
42 }
43 pub fn id(&self) -> ::std::option::Option<&str> {
45 self.id.as_deref()
46 }
47 pub fn state(&self) -> ::std::option::Option<&crate::types::State> {
49 self.state.as_ref()
50 }
51 pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
53 self.r#type.as_ref()
54 }
55 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.updated_at.as_ref()
58 }
59}
60impl ::aws_types::request_id::RequestId for CreateJobOutput {
61 fn request_id(&self) -> Option<&str> {
62 self._request_id.as_deref()
63 }
64}
65impl CreateJobOutput {
66 pub fn builder() -> crate::operation::create_job::builders::CreateJobOutputBuilder {
68 crate::operation::create_job::builders::CreateJobOutputBuilder::default()
69 }
70}
71
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct CreateJobOutputBuilder {
76 pub(crate) arn: ::std::option::Option<::std::string::String>,
77 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
78 pub(crate) details: ::std::option::Option<crate::types::ResponseDetails>,
79 pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>,
80 pub(crate) id: ::std::option::Option<::std::string::String>,
81 pub(crate) state: ::std::option::Option<crate::types::State>,
82 pub(crate) r#type: ::std::option::Option<crate::types::Type>,
83 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
84 _request_id: Option<String>,
85}
86impl CreateJobOutputBuilder {
87 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.arn = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.arn = input;
95 self
96 }
97 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
99 &self.arn
100 }
101 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
103 self.created_at = ::std::option::Option::Some(input);
104 self
105 }
106 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
108 self.created_at = input;
109 self
110 }
111 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
113 &self.created_at
114 }
115 pub fn details(mut self, input: crate::types::ResponseDetails) -> Self {
117 self.details = ::std::option::Option::Some(input);
118 self
119 }
120 pub fn set_details(mut self, input: ::std::option::Option<crate::types::ResponseDetails>) -> Self {
122 self.details = input;
123 self
124 }
125 pub fn get_details(&self) -> &::std::option::Option<crate::types::ResponseDetails> {
127 &self.details
128 }
129 pub fn errors(mut self, input: crate::types::JobError) -> Self {
135 let mut v = self.errors.unwrap_or_default();
136 v.push(input);
137 self.errors = ::std::option::Option::Some(v);
138 self
139 }
140 pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>) -> Self {
142 self.errors = input;
143 self
144 }
145 pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobError>> {
147 &self.errors
148 }
149 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.id = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.id = input;
157 self
158 }
159 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
161 &self.id
162 }
163 pub fn state(mut self, input: crate::types::State) -> Self {
165 self.state = ::std::option::Option::Some(input);
166 self
167 }
168 pub fn set_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
170 self.state = input;
171 self
172 }
173 pub fn get_state(&self) -> &::std::option::Option<crate::types::State> {
175 &self.state
176 }
177 pub fn r#type(mut self, input: crate::types::Type) -> Self {
179 self.r#type = ::std::option::Option::Some(input);
180 self
181 }
182 pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
184 self.r#type = input;
185 self
186 }
187 pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
189 &self.r#type
190 }
191 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
193 self.updated_at = ::std::option::Option::Some(input);
194 self
195 }
196 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
198 self.updated_at = input;
199 self
200 }
201 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
203 &self.updated_at
204 }
205 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
206 self._request_id = Some(request_id.into());
207 self
208 }
209
210 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
211 self._request_id = request_id;
212 self
213 }
214 pub fn build(self) -> crate::operation::create_job::CreateJobOutput {
216 crate::operation::create_job::CreateJobOutput {
217 arn: self.arn,
218 created_at: self.created_at,
219 details: self.details,
220 errors: self.errors,
221 id: self.id,
222 state: self.state,
223 r#type: self.r#type,
224 updated_at: self.updated_at,
225 _request_id: self._request_id,
226 }
227 }
228}