Skip to main content

aws_sdk_dataexchange/operation/create_job/
_create_job_output.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 CreateJobOutput {
6    /// <p>The ARN for the job.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The configuration for the asset, including tags applied to assets created by the job.</p>
9    pub asset_configuration: ::std::option::Option<crate::types::AssetConfiguration>,
10    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
11    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>Details about the job.</p>
13    pub details: ::std::option::Option<crate::types::ResponseDetails>,
14    /// <p>The errors associated with jobs.</p>
15    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>,
16    /// <p>The unique identifier for the job.</p>
17    pub id: ::std::option::Option<::std::string::String>,
18    /// <p>The state of the job.</p>
19    pub state: ::std::option::Option<crate::types::State>,
20    /// <p>The job type.</p>
21    pub r#type: ::std::option::Option<crate::types::Type>,
22    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
23    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    _request_id: Option<String>,
25}
26impl CreateJobOutput {
27    /// <p>The ARN for the job.</p>
28    pub fn arn(&self) -> ::std::option::Option<&str> {
29        self.arn.as_deref()
30    }
31    /// <p>The configuration for the asset, including tags applied to assets created by the job.</p>
32    pub fn asset_configuration(&self) -> ::std::option::Option<&crate::types::AssetConfiguration> {
33        self.asset_configuration.as_ref()
34    }
35    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
36    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.created_at.as_ref()
38    }
39    /// <p>Details about the job.</p>
40    pub fn details(&self) -> ::std::option::Option<&crate::types::ResponseDetails> {
41        self.details.as_ref()
42    }
43    /// <p>The errors associated with jobs.</p>
44    ///
45    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.errors.is_none()`.
46    pub fn errors(&self) -> &[crate::types::JobError] {
47        self.errors.as_deref().unwrap_or_default()
48    }
49    /// <p>The unique identifier for the job.</p>
50    pub fn id(&self) -> ::std::option::Option<&str> {
51        self.id.as_deref()
52    }
53    /// <p>The state of the job.</p>
54    pub fn state(&self) -> ::std::option::Option<&crate::types::State> {
55        self.state.as_ref()
56    }
57    /// <p>The job type.</p>
58    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
59        self.r#type.as_ref()
60    }
61    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
62    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63        self.updated_at.as_ref()
64    }
65}
66impl ::aws_types::request_id::RequestId for CreateJobOutput {
67    fn request_id(&self) -> Option<&str> {
68        self._request_id.as_deref()
69    }
70}
71impl CreateJobOutput {
72    /// Creates a new builder-style object to manufacture [`CreateJobOutput`](crate::operation::create_job::CreateJobOutput).
73    pub fn builder() -> crate::operation::create_job::builders::CreateJobOutputBuilder {
74        crate::operation::create_job::builders::CreateJobOutputBuilder::default()
75    }
76}
77
78/// A builder for [`CreateJobOutput`](crate::operation::create_job::CreateJobOutput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct CreateJobOutputBuilder {
82    pub(crate) arn: ::std::option::Option<::std::string::String>,
83    pub(crate) asset_configuration: ::std::option::Option<crate::types::AssetConfiguration>,
84    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
85    pub(crate) details: ::std::option::Option<crate::types::ResponseDetails>,
86    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>,
87    pub(crate) id: ::std::option::Option<::std::string::String>,
88    pub(crate) state: ::std::option::Option<crate::types::State>,
89    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
90    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
91    _request_id: Option<String>,
92}
93impl CreateJobOutputBuilder {
94    /// <p>The ARN for the job.</p>
95    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.arn = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The ARN for the job.</p>
100    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.arn = input;
102        self
103    }
104    /// <p>The ARN for the job.</p>
105    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
106        &self.arn
107    }
108    /// <p>The configuration for the asset, including tags applied to assets created by the job.</p>
109    pub fn asset_configuration(mut self, input: crate::types::AssetConfiguration) -> Self {
110        self.asset_configuration = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The configuration for the asset, including tags applied to assets created by the job.</p>
114    pub fn set_asset_configuration(mut self, input: ::std::option::Option<crate::types::AssetConfiguration>) -> Self {
115        self.asset_configuration = input;
116        self
117    }
118    /// <p>The configuration for the asset, including tags applied to assets created by the job.</p>
119    pub fn get_asset_configuration(&self) -> &::std::option::Option<crate::types::AssetConfiguration> {
120        &self.asset_configuration
121    }
122    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
123    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
124        self.created_at = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
128    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
129        self.created_at = input;
130        self
131    }
132    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
133    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
134        &self.created_at
135    }
136    /// <p>Details about the job.</p>
137    pub fn details(mut self, input: crate::types::ResponseDetails) -> Self {
138        self.details = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>Details about the job.</p>
142    pub fn set_details(mut self, input: ::std::option::Option<crate::types::ResponseDetails>) -> Self {
143        self.details = input;
144        self
145    }
146    /// <p>Details about the job.</p>
147    pub fn get_details(&self) -> &::std::option::Option<crate::types::ResponseDetails> {
148        &self.details
149    }
150    /// Appends an item to `errors`.
151    ///
152    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
153    ///
154    /// <p>The errors associated with jobs.</p>
155    pub fn errors(mut self, input: crate::types::JobError) -> Self {
156        let mut v = self.errors.unwrap_or_default();
157        v.push(input);
158        self.errors = ::std::option::Option::Some(v);
159        self
160    }
161    /// <p>The errors associated with jobs.</p>
162    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobError>>) -> Self {
163        self.errors = input;
164        self
165    }
166    /// <p>The errors associated with jobs.</p>
167    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobError>> {
168        &self.errors
169    }
170    /// <p>The unique identifier for the job.</p>
171    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.id = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>The unique identifier for the job.</p>
176    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.id = input;
178        self
179    }
180    /// <p>The unique identifier for the job.</p>
181    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
182        &self.id
183    }
184    /// <p>The state of the job.</p>
185    pub fn state(mut self, input: crate::types::State) -> Self {
186        self.state = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>The state of the job.</p>
190    pub fn set_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
191        self.state = input;
192        self
193    }
194    /// <p>The state of the job.</p>
195    pub fn get_state(&self) -> &::std::option::Option<crate::types::State> {
196        &self.state
197    }
198    /// <p>The job type.</p>
199    pub fn r#type(mut self, input: crate::types::Type) -> Self {
200        self.r#type = ::std::option::Option::Some(input);
201        self
202    }
203    /// <p>The job type.</p>
204    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
205        self.r#type = input;
206        self
207    }
208    /// <p>The job type.</p>
209    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
210        &self.r#type
211    }
212    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
213    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
214        self.updated_at = ::std::option::Option::Some(input);
215        self
216    }
217    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
218    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
219        self.updated_at = input;
220        self
221    }
222    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
223    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
224        &self.updated_at
225    }
226    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
227        self._request_id = Some(request_id.into());
228        self
229    }
230
231    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
232        self._request_id = request_id;
233        self
234    }
235    /// Consumes the builder and constructs a [`CreateJobOutput`](crate::operation::create_job::CreateJobOutput).
236    pub fn build(self) -> crate::operation::create_job::CreateJobOutput {
237        crate::operation::create_job::CreateJobOutput {
238            arn: self.arn,
239            asset_configuration: self.asset_configuration,
240            created_at: self.created_at,
241            details: self.details,
242            errors: self.errors,
243            id: self.id,
244            state: self.state,
245            r#type: self.r#type,
246            updated_at: self.updated_at,
247            _request_id: self._request_id,
248        }
249    }
250}