aws_sdk_codepipeline/operation/acknowledge_job/
_acknowledge_job_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of an AcknowledgeJob action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AcknowledgeJobInput {
7    /// <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
8    pub job_id: ::std::option::Option<::std::string::String>,
9    /// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <code>PollForJobs</code> request that returned this job.</p>
10    pub nonce: ::std::option::Option<::std::string::String>,
11}
12impl AcknowledgeJobInput {
13    /// <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
14    pub fn job_id(&self) -> ::std::option::Option<&str> {
15        self.job_id.as_deref()
16    }
17    /// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <code>PollForJobs</code> request that returned this job.</p>
18    pub fn nonce(&self) -> ::std::option::Option<&str> {
19        self.nonce.as_deref()
20    }
21}
22impl AcknowledgeJobInput {
23    /// Creates a new builder-style object to manufacture [`AcknowledgeJobInput`](crate::operation::acknowledge_job::AcknowledgeJobInput).
24    pub fn builder() -> crate::operation::acknowledge_job::builders::AcknowledgeJobInputBuilder {
25        crate::operation::acknowledge_job::builders::AcknowledgeJobInputBuilder::default()
26    }
27}
28
29/// A builder for [`AcknowledgeJobInput`](crate::operation::acknowledge_job::AcknowledgeJobInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct AcknowledgeJobInputBuilder {
33    pub(crate) job_id: ::std::option::Option<::std::string::String>,
34    pub(crate) nonce: ::std::option::Option<::std::string::String>,
35}
36impl AcknowledgeJobInputBuilder {
37    /// <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
38    /// This field is required.
39    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.job_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
44    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.job_id = input;
46        self
47    }
48    /// <p>The unique system-generated ID of the job for which you want to confirm receipt.</p>
49    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.job_id
51    }
52    /// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <code>PollForJobs</code> request that returned this job.</p>
53    /// This field is required.
54    pub fn nonce(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.nonce = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <code>PollForJobs</code> request that returned this job.</p>
59    pub fn set_nonce(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.nonce = input;
61        self
62    }
63    /// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the <code>PollForJobs</code> request that returned this job.</p>
64    pub fn get_nonce(&self) -> &::std::option::Option<::std::string::String> {
65        &self.nonce
66    }
67    /// Consumes the builder and constructs a [`AcknowledgeJobInput`](crate::operation::acknowledge_job::AcknowledgeJobInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<crate::operation::acknowledge_job::AcknowledgeJobInput, ::aws_smithy_types::error::operation::BuildError> {
71        ::std::result::Result::Ok(crate::operation::acknowledge_job::AcknowledgeJobInput {
72            job_id: self.job_id,
73            nonce: self.nonce,
74        })
75    }
76}