aws_sdk_backup/operation/create_restore_testing_selection/
_create_restore_testing_selection_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateRestoreTestingSelectionOutput {
6 pub creation_time: ::aws_smithy_types::DateTime,
8 pub restore_testing_plan_arn: ::std::string::String,
10 pub restore_testing_plan_name: ::std::string::String,
13 pub restore_testing_selection_name: ::std::string::String,
16 _request_id: Option<String>,
17}
18impl CreateRestoreTestingSelectionOutput {
19 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
21 &self.creation_time
22 }
23 pub fn restore_testing_plan_arn(&self) -> &str {
25 use std::ops::Deref;
26 self.restore_testing_plan_arn.deref()
27 }
28 pub fn restore_testing_plan_name(&self) -> &str {
31 use std::ops::Deref;
32 self.restore_testing_plan_name.deref()
33 }
34 pub fn restore_testing_selection_name(&self) -> &str {
37 use std::ops::Deref;
38 self.restore_testing_selection_name.deref()
39 }
40}
41impl ::aws_types::request_id::RequestId for CreateRestoreTestingSelectionOutput {
42 fn request_id(&self) -> Option<&str> {
43 self._request_id.as_deref()
44 }
45}
46impl CreateRestoreTestingSelectionOutput {
47 pub fn builder() -> crate::operation::create_restore_testing_selection::builders::CreateRestoreTestingSelectionOutputBuilder {
49 crate::operation::create_restore_testing_selection::builders::CreateRestoreTestingSelectionOutputBuilder::default()
50 }
51}
52
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct CreateRestoreTestingSelectionOutputBuilder {
57 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
58 pub(crate) restore_testing_plan_arn: ::std::option::Option<::std::string::String>,
59 pub(crate) restore_testing_plan_name: ::std::option::Option<::std::string::String>,
60 pub(crate) restore_testing_selection_name: ::std::option::Option<::std::string::String>,
61 _request_id: Option<String>,
62}
63impl CreateRestoreTestingSelectionOutputBuilder {
64 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
67 self.creation_time = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
72 self.creation_time = input;
73 self
74 }
75 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
77 &self.creation_time
78 }
79 pub fn restore_testing_plan_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.restore_testing_plan_arn = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_restore_testing_plan_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.restore_testing_plan_arn = input;
88 self
89 }
90 pub fn get_restore_testing_plan_arn(&self) -> &::std::option::Option<::std::string::String> {
92 &self.restore_testing_plan_arn
93 }
94 pub fn restore_testing_plan_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.restore_testing_plan_name = ::std::option::Option::Some(input.into());
99 self
100 }
101 pub fn set_restore_testing_plan_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.restore_testing_plan_name = input;
105 self
106 }
107 pub fn get_restore_testing_plan_name(&self) -> &::std::option::Option<::std::string::String> {
110 &self.restore_testing_plan_name
111 }
112 pub fn restore_testing_selection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.restore_testing_selection_name = ::std::option::Option::Some(input.into());
117 self
118 }
119 pub fn set_restore_testing_selection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.restore_testing_selection_name = input;
123 self
124 }
125 pub fn get_restore_testing_selection_name(&self) -> &::std::option::Option<::std::string::String> {
128 &self.restore_testing_selection_name
129 }
130 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
131 self._request_id = Some(request_id.into());
132 self
133 }
134
135 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
136 self._request_id = request_id;
137 self
138 }
139 pub fn build(
146 self,
147 ) -> ::std::result::Result<
148 crate::operation::create_restore_testing_selection::CreateRestoreTestingSelectionOutput,
149 ::aws_smithy_types::error::operation::BuildError,
150 > {
151 ::std::result::Result::Ok(crate::operation::create_restore_testing_selection::CreateRestoreTestingSelectionOutput {
152 creation_time: self.creation_time.ok_or_else(|| {
153 ::aws_smithy_types::error::operation::BuildError::missing_field(
154 "creation_time",
155 "creation_time was not specified but it is required when building CreateRestoreTestingSelectionOutput",
156 )
157 })?,
158 restore_testing_plan_arn: self.restore_testing_plan_arn.ok_or_else(|| {
159 ::aws_smithy_types::error::operation::BuildError::missing_field(
160 "restore_testing_plan_arn",
161 "restore_testing_plan_arn was not specified but it is required when building CreateRestoreTestingSelectionOutput",
162 )
163 })?,
164 restore_testing_plan_name: self.restore_testing_plan_name.ok_or_else(|| {
165 ::aws_smithy_types::error::operation::BuildError::missing_field(
166 "restore_testing_plan_name",
167 "restore_testing_plan_name was not specified but it is required when building CreateRestoreTestingSelectionOutput",
168 )
169 })?,
170 restore_testing_selection_name: self.restore_testing_selection_name.ok_or_else(|| {
171 ::aws_smithy_types::error::operation::BuildError::missing_field(
172 "restore_testing_selection_name",
173 "restore_testing_selection_name was not specified but it is required when building CreateRestoreTestingSelectionOutput",
174 )
175 })?,
176 _request_id: self._request_id,
177 })
178 }
179}