aws_sdk_comprehend/operation/start_events_detection_job/
_start_events_detection_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 StartEventsDetectionJobOutput {
6    /// <p>An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>
7    pub job_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:</p>
9    /// <p><code>arn:<partition>
10    /// :comprehend:
11    /// <region>
12    /// :
13    /// <account-id>
14    /// :events-detection-job/
15    /// <job-id></job-id>
16    /// </account-id>
17    /// </region>
18    /// </partition></code></p>
19    /// <p>The following is an example job ARN:</p>
20    /// <p><code>arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab</code></p>
21    pub job_arn: ::std::option::Option<::std::string::String>,
22    /// <p>The status of the events detection job.</p>
23    pub job_status: ::std::option::Option<crate::types::JobStatus>,
24    _request_id: Option<String>,
25}
26impl StartEventsDetectionJobOutput {
27    /// <p>An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>
28    pub fn job_id(&self) -> ::std::option::Option<&str> {
29        self.job_id.as_deref()
30    }
31    /// <p>The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:</p>
32    /// <p><code>arn:<partition>
33    /// :comprehend:
34    /// <region>
35    /// :
36    /// <account-id>
37    /// :events-detection-job/
38    /// <job-id></job-id>
39    /// </account-id>
40    /// </region>
41    /// </partition></code></p>
42    /// <p>The following is an example job ARN:</p>
43    /// <p><code>arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab</code></p>
44    pub fn job_arn(&self) -> ::std::option::Option<&str> {
45        self.job_arn.as_deref()
46    }
47    /// <p>The status of the events detection job.</p>
48    pub fn job_status(&self) -> ::std::option::Option<&crate::types::JobStatus> {
49        self.job_status.as_ref()
50    }
51}
52impl ::aws_types::request_id::RequestId for StartEventsDetectionJobOutput {
53    fn request_id(&self) -> Option<&str> {
54        self._request_id.as_deref()
55    }
56}
57impl StartEventsDetectionJobOutput {
58    /// Creates a new builder-style object to manufacture [`StartEventsDetectionJobOutput`](crate::operation::start_events_detection_job::StartEventsDetectionJobOutput).
59    pub fn builder() -> crate::operation::start_events_detection_job::builders::StartEventsDetectionJobOutputBuilder {
60        crate::operation::start_events_detection_job::builders::StartEventsDetectionJobOutputBuilder::default()
61    }
62}
63
64/// A builder for [`StartEventsDetectionJobOutput`](crate::operation::start_events_detection_job::StartEventsDetectionJobOutput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct StartEventsDetectionJobOutputBuilder {
68    pub(crate) job_id: ::std::option::Option<::std::string::String>,
69    pub(crate) job_arn: ::std::option::Option<::std::string::String>,
70    pub(crate) job_status: ::std::option::Option<crate::types::JobStatus>,
71    _request_id: Option<String>,
72}
73impl StartEventsDetectionJobOutputBuilder {
74    /// <p>An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>
75    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.job_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>
80    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.job_id = input;
82        self
83    }
84    /// <p>An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.</p>
85    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.job_id
87    }
88    /// <p>The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:</p>
89    /// <p><code>arn:<partition>
90    /// :comprehend:
91    /// <region>
92    /// :
93    /// <account-id>
94    /// :events-detection-job/
95    /// <job-id></job-id>
96    /// </account-id>
97    /// </region>
98    /// </partition></code></p>
99    /// <p>The following is an example job ARN:</p>
100    /// <p><code>arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab</code></p>
101    pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.job_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:</p>
106    /// <p><code>arn:<partition>
107    /// :comprehend:
108    /// <region>
109    /// :
110    /// <account-id>
111    /// :events-detection-job/
112    /// <job-id></job-id>
113    /// </account-id>
114    /// </region>
115    /// </partition></code></p>
116    /// <p>The following is an example job ARN:</p>
117    /// <p><code>arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab</code></p>
118    pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.job_arn = input;
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:</p>
123    /// <p><code>arn:<partition>
124    /// :comprehend:
125    /// <region>
126    /// :
127    /// <account-id>
128    /// :events-detection-job/
129    /// <job-id></job-id>
130    /// </account-id>
131    /// </region>
132    /// </partition></code></p>
133    /// <p>The following is an example job ARN:</p>
134    /// <p><code>arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890ab</code></p>
135    pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
136        &self.job_arn
137    }
138    /// <p>The status of the events detection job.</p>
139    pub fn job_status(mut self, input: crate::types::JobStatus) -> Self {
140        self.job_status = ::std::option::Option::Some(input);
141        self
142    }
143    /// <p>The status of the events detection job.</p>
144    pub fn set_job_status(mut self, input: ::std::option::Option<crate::types::JobStatus>) -> Self {
145        self.job_status = input;
146        self
147    }
148    /// <p>The status of the events detection job.</p>
149    pub fn get_job_status(&self) -> &::std::option::Option<crate::types::JobStatus> {
150        &self.job_status
151    }
152    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
153        self._request_id = Some(request_id.into());
154        self
155    }
156
157    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
158        self._request_id = request_id;
159        self
160    }
161    /// Consumes the builder and constructs a [`StartEventsDetectionJobOutput`](crate::operation::start_events_detection_job::StartEventsDetectionJobOutput).
162    pub fn build(self) -> crate::operation::start_events_detection_job::StartEventsDetectionJobOutput {
163        crate::operation::start_events_detection_job::StartEventsDetectionJobOutput {
164            job_id: self.job_id,
165            job_arn: self.job_arn,
166            job_status: self.job_status,
167            _request_id: self._request_id,
168        }
169    }
170}