aws_sdk_imagebuilder/operation/create_component/
_create_component_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 CreateComponentOutput {
6    /// <p>The request ID that uniquely identifies this request.</p>
7    pub request_id: ::std::option::Option<::std::string::String>,
8    /// <p>The client token that uniquely identifies the request.</p>
9    pub client_token: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the component that the request created.</p>
11    pub component_build_version_arn: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl CreateComponentOutput {
15    /// <p>The request ID that uniquely identifies this request.</p>
16    pub fn request_id(&self) -> ::std::option::Option<&str> {
17        self.request_id.as_deref()
18    }
19    /// <p>The client token that uniquely identifies the request.</p>
20    pub fn client_token(&self) -> ::std::option::Option<&str> {
21        self.client_token.as_deref()
22    }
23    /// <p>The Amazon Resource Name (ARN) of the component that the request created.</p>
24    pub fn component_build_version_arn(&self) -> ::std::option::Option<&str> {
25        self.component_build_version_arn.as_deref()
26    }
27}
28impl ::aws_types::request_id::RequestId for CreateComponentOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl CreateComponentOutput {
34    /// Creates a new builder-style object to manufacture [`CreateComponentOutput`](crate::operation::create_component::CreateComponentOutput).
35    pub fn builder() -> crate::operation::create_component::builders::CreateComponentOutputBuilder {
36        crate::operation::create_component::builders::CreateComponentOutputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateComponentOutput`](crate::operation::create_component::CreateComponentOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateComponentOutputBuilder {
44    pub(crate) request_id: ::std::option::Option<::std::string::String>,
45    pub(crate) client_token: ::std::option::Option<::std::string::String>,
46    pub(crate) component_build_version_arn: ::std::option::Option<::std::string::String>,
47    _request_id: Option<String>,
48}
49impl CreateComponentOutputBuilder {
50    /// <p>The request ID that uniquely identifies this request.</p>
51    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.request_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The request ID that uniquely identifies this request.</p>
56    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.request_id = input;
58        self
59    }
60    /// <p>The request ID that uniquely identifies this request.</p>
61    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.request_id
63    }
64    /// <p>The client token that uniquely identifies the request.</p>
65    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.client_token = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The client token that uniquely identifies the request.</p>
70    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.client_token = input;
72        self
73    }
74    /// <p>The client token that uniquely identifies the request.</p>
75    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
76        &self.client_token
77    }
78    /// <p>The Amazon Resource Name (ARN) of the component that the request created.</p>
79    pub fn component_build_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.component_build_version_arn = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The Amazon Resource Name (ARN) of the component that the request created.</p>
84    pub fn set_component_build_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.component_build_version_arn = input;
86        self
87    }
88    /// <p>The Amazon Resource Name (ARN) of the component that the request created.</p>
89    pub fn get_component_build_version_arn(&self) -> &::std::option::Option<::std::string::String> {
90        &self.component_build_version_arn
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`CreateComponentOutput`](crate::operation::create_component::CreateComponentOutput).
102    pub fn build(self) -> crate::operation::create_component::CreateComponentOutput {
103        crate::operation::create_component::CreateComponentOutput {
104            request_id: self.request_id,
105            client_token: self.client_token,
106            component_build_version_arn: self.component_build_version_arn,
107            _request_id: self._request_id,
108        }
109    }
110}