aws_sdk_codebuild/operation/retry_build/
_retry_build_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 RetryBuildInput {
6    /// <p>Specifies the identifier of the build to restart.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
9    pub idempotency_token: ::std::option::Option<::std::string::String>,
10}
11impl RetryBuildInput {
12    /// <p>Specifies the identifier of the build to restart.</p>
13    pub fn id(&self) -> ::std::option::Option<&str> {
14        self.id.as_deref()
15    }
16    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
17    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
18        self.idempotency_token.as_deref()
19    }
20}
21impl RetryBuildInput {
22    /// Creates a new builder-style object to manufacture [`RetryBuildInput`](crate::operation::retry_build::RetryBuildInput).
23    pub fn builder() -> crate::operation::retry_build::builders::RetryBuildInputBuilder {
24        crate::operation::retry_build::builders::RetryBuildInputBuilder::default()
25    }
26}
27
28/// A builder for [`RetryBuildInput`](crate::operation::retry_build::RetryBuildInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct RetryBuildInputBuilder {
32    pub(crate) id: ::std::option::Option<::std::string::String>,
33    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
34}
35impl RetryBuildInputBuilder {
36    /// <p>Specifies the identifier of the build to restart.</p>
37    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.id = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>Specifies the identifier of the build to restart.</p>
42    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.id = input;
44        self
45    }
46    /// <p>Specifies the identifier of the build to restart.</p>
47    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
48        &self.id
49    }
50    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
51    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.idempotency_token = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
56    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.idempotency_token = input;
58        self
59    }
60    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuild</code> request. The token is included in the <code>RetryBuild</code> request and is valid for five minutes. If you repeat the <code>RetryBuild</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
61    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
62        &self.idempotency_token
63    }
64    /// Consumes the builder and constructs a [`RetryBuildInput`](crate::operation::retry_build::RetryBuildInput).
65    pub fn build(self) -> ::std::result::Result<crate::operation::retry_build::RetryBuildInput, ::aws_smithy_types::error::operation::BuildError> {
66        ::std::result::Result::Ok(crate::operation::retry_build::RetryBuildInput {
67            id: self.id,
68            idempotency_token: self.idempotency_token,
69        })
70    }
71}