aws_sdk_imagebuilder/operation/retry_image/
_retry_image_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 RetryImageInput {
6    /// <p>The source image Amazon Resource Name (ARN) to retry.</p>
7    pub image_build_version_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
9    pub client_token: ::std::option::Option<::std::string::String>,
10}
11impl RetryImageInput {
12    /// <p>The source image Amazon Resource Name (ARN) to retry.</p>
13    pub fn image_build_version_arn(&self) -> ::std::option::Option<&str> {
14        self.image_build_version_arn.as_deref()
15    }
16    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
17    pub fn client_token(&self) -> ::std::option::Option<&str> {
18        self.client_token.as_deref()
19    }
20}
21impl RetryImageInput {
22    /// Creates a new builder-style object to manufacture [`RetryImageInput`](crate::operation::retry_image::RetryImageInput).
23    pub fn builder() -> crate::operation::retry_image::builders::RetryImageInputBuilder {
24        crate::operation::retry_image::builders::RetryImageInputBuilder::default()
25    }
26}
27
28/// A builder for [`RetryImageInput`](crate::operation::retry_image::RetryImageInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct RetryImageInputBuilder {
32    pub(crate) image_build_version_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) client_token: ::std::option::Option<::std::string::String>,
34}
35impl RetryImageInputBuilder {
36    /// <p>The source image Amazon Resource Name (ARN) to retry.</p>
37    /// This field is required.
38    pub fn image_build_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.image_build_version_arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The source image Amazon Resource Name (ARN) to retry.</p>
43    pub fn set_image_build_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.image_build_version_arn = input;
45        self
46    }
47    /// <p>The source image Amazon Resource Name (ARN) to retry.</p>
48    pub fn get_image_build_version_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.image_build_version_arn
50    }
51    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
52    /// This field is required.
53    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.client_token = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
58    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.client_token = input;
60        self
61    }
62    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
63    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
64        &self.client_token
65    }
66    /// Consumes the builder and constructs a [`RetryImageInput`](crate::operation::retry_image::RetryImageInput).
67    pub fn build(self) -> ::std::result::Result<crate::operation::retry_image::RetryImageInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::retry_image::RetryImageInput {
69            image_build_version_arn: self.image_build_version_arn,
70            client_token: self.client_token,
71        })
72    }
73}