aws_sdk_eventbridge/operation/update_archive/
_update_archive_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 UpdateArchiveOutput {
6    /// <p>The ARN of the archive.</p>
7    pub archive_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The state of the archive.</p>
9    pub state: ::std::option::Option<crate::types::ArchiveState>,
10    /// <p>The reason that the archive is in the current state.</p>
11    pub state_reason: ::std::option::Option<::std::string::String>,
12    /// <p>The time at which the archive was updated.</p>
13    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    _request_id: Option<String>,
15}
16impl UpdateArchiveOutput {
17    /// <p>The ARN of the archive.</p>
18    pub fn archive_arn(&self) -> ::std::option::Option<&str> {
19        self.archive_arn.as_deref()
20    }
21    /// <p>The state of the archive.</p>
22    pub fn state(&self) -> ::std::option::Option<&crate::types::ArchiveState> {
23        self.state.as_ref()
24    }
25    /// <p>The reason that the archive is in the current state.</p>
26    pub fn state_reason(&self) -> ::std::option::Option<&str> {
27        self.state_reason.as_deref()
28    }
29    /// <p>The time at which the archive was updated.</p>
30    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.creation_time.as_ref()
32    }
33}
34impl ::aws_types::request_id::RequestId for UpdateArchiveOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl UpdateArchiveOutput {
40    /// Creates a new builder-style object to manufacture [`UpdateArchiveOutput`](crate::operation::update_archive::UpdateArchiveOutput).
41    pub fn builder() -> crate::operation::update_archive::builders::UpdateArchiveOutputBuilder {
42        crate::operation::update_archive::builders::UpdateArchiveOutputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateArchiveOutput`](crate::operation::update_archive::UpdateArchiveOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateArchiveOutputBuilder {
50    pub(crate) archive_arn: ::std::option::Option<::std::string::String>,
51    pub(crate) state: ::std::option::Option<crate::types::ArchiveState>,
52    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
53    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
54    _request_id: Option<String>,
55}
56impl UpdateArchiveOutputBuilder {
57    /// <p>The ARN of the archive.</p>
58    pub fn archive_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.archive_arn = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The ARN of the archive.</p>
63    pub fn set_archive_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.archive_arn = input;
65        self
66    }
67    /// <p>The ARN of the archive.</p>
68    pub fn get_archive_arn(&self) -> &::std::option::Option<::std::string::String> {
69        &self.archive_arn
70    }
71    /// <p>The state of the archive.</p>
72    pub fn state(mut self, input: crate::types::ArchiveState) -> Self {
73        self.state = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>The state of the archive.</p>
77    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ArchiveState>) -> Self {
78        self.state = input;
79        self
80    }
81    /// <p>The state of the archive.</p>
82    pub fn get_state(&self) -> &::std::option::Option<crate::types::ArchiveState> {
83        &self.state
84    }
85    /// <p>The reason that the archive is in the current state.</p>
86    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.state_reason = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The reason that the archive is in the current state.</p>
91    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.state_reason = input;
93        self
94    }
95    /// <p>The reason that the archive is in the current state.</p>
96    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
97        &self.state_reason
98    }
99    /// <p>The time at which the archive was updated.</p>
100    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
101        self.creation_time = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The time at which the archive was updated.</p>
105    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
106        self.creation_time = input;
107        self
108    }
109    /// <p>The time at which the archive was updated.</p>
110    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
111        &self.creation_time
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`UpdateArchiveOutput`](crate::operation::update_archive::UpdateArchiveOutput).
123    pub fn build(self) -> crate::operation::update_archive::UpdateArchiveOutput {
124        crate::operation::update_archive::UpdateArchiveOutput {
125            archive_arn: self.archive_arn,
126            state: self.state,
127            state_reason: self.state_reason,
128            creation_time: self.creation_time,
129            _request_id: self._request_id,
130        }
131    }
132}