aws_sdk_sfn/operation/describe_activity/_describe_activity_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 DescribeActivityOutput {
6 /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
7 pub activity_arn: ::std::string::String,
8 /// <p>The name of the activity.</p>
9 /// <p>A name must <i>not</i> contain:</p>
10 /// <ul>
11 /// <li>
12 /// <p>white space</p></li>
13 /// <li>
14 /// <p>brackets <code>< > { } \[ \]</code></p></li>
15 /// <li>
16 /// <p>wildcard characters <code>? *</code></p></li>
17 /// <li>
18 /// <p>special characters <code>" # % \ ^ | ~ ` $ & , ; : /</code></p></li>
19 /// <li>
20 /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
21 /// <li>
22 /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
23 /// <li>
24 /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
25 /// </ul>
26 /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
27 pub name: ::std::string::String,
28 /// <p>The date the activity is created.</p>
29 pub creation_date: ::aws_smithy_types::DateTime,
30 /// <p>Settings for configured server-side encryption.</p>
31 pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
32 _request_id: Option<String>,
33}
34impl DescribeActivityOutput {
35 /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
36 pub fn activity_arn(&self) -> &str {
37 use std::ops::Deref;
38 self.activity_arn.deref()
39 }
40 /// <p>The name of the activity.</p>
41 /// <p>A name must <i>not</i> contain:</p>
42 /// <ul>
43 /// <li>
44 /// <p>white space</p></li>
45 /// <li>
46 /// <p>brackets <code>< > { } \[ \]</code></p></li>
47 /// <li>
48 /// <p>wildcard characters <code>? *</code></p></li>
49 /// <li>
50 /// <p>special characters <code>" # % \ ^ | ~ ` $ & , ; : /</code></p></li>
51 /// <li>
52 /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
53 /// <li>
54 /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
55 /// <li>
56 /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
57 /// </ul>
58 /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
59 pub fn name(&self) -> &str {
60 use std::ops::Deref;
61 self.name.deref()
62 }
63 /// <p>The date the activity is created.</p>
64 pub fn creation_date(&self) -> &::aws_smithy_types::DateTime {
65 &self.creation_date
66 }
67 /// <p>Settings for configured server-side encryption.</p>
68 pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
69 self.encryption_configuration.as_ref()
70 }
71}
72impl ::aws_types::request_id::RequestId for DescribeActivityOutput {
73 fn request_id(&self) -> Option<&str> {
74 self._request_id.as_deref()
75 }
76}
77impl DescribeActivityOutput {
78 /// Creates a new builder-style object to manufacture [`DescribeActivityOutput`](crate::operation::describe_activity::DescribeActivityOutput).
79 pub fn builder() -> crate::operation::describe_activity::builders::DescribeActivityOutputBuilder {
80 crate::operation::describe_activity::builders::DescribeActivityOutputBuilder::default()
81 }
82}
83
84/// A builder for [`DescribeActivityOutput`](crate::operation::describe_activity::DescribeActivityOutput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct DescribeActivityOutputBuilder {
88 pub(crate) activity_arn: ::std::option::Option<::std::string::String>,
89 pub(crate) name: ::std::option::Option<::std::string::String>,
90 pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
91 pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
92 _request_id: Option<String>,
93}
94impl DescribeActivityOutputBuilder {
95 /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
96 /// This field is required.
97 pub fn activity_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.activity_arn = ::std::option::Option::Some(input.into());
99 self
100 }
101 /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
102 pub fn set_activity_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.activity_arn = input;
104 self
105 }
106 /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
107 pub fn get_activity_arn(&self) -> &::std::option::Option<::std::string::String> {
108 &self.activity_arn
109 }
110 /// <p>The name of the activity.</p>
111 /// <p>A name must <i>not</i> contain:</p>
112 /// <ul>
113 /// <li>
114 /// <p>white space</p></li>
115 /// <li>
116 /// <p>brackets <code>< > { } \[ \]</code></p></li>
117 /// <li>
118 /// <p>wildcard characters <code>? *</code></p></li>
119 /// <li>
120 /// <p>special characters <code>" # % \ ^ | ~ ` $ & , ; : /</code></p></li>
121 /// <li>
122 /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
123 /// <li>
124 /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
125 /// <li>
126 /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
127 /// </ul>
128 /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
129 /// This field is required.
130 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.name = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The name of the activity.</p>
135 /// <p>A name must <i>not</i> contain:</p>
136 /// <ul>
137 /// <li>
138 /// <p>white space</p></li>
139 /// <li>
140 /// <p>brackets <code>< > { } \[ \]</code></p></li>
141 /// <li>
142 /// <p>wildcard characters <code>? *</code></p></li>
143 /// <li>
144 /// <p>special characters <code>" # % \ ^ | ~ ` $ & , ; : /</code></p></li>
145 /// <li>
146 /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
147 /// <li>
148 /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
149 /// <li>
150 /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
151 /// </ul>
152 /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
153 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154 self.name = input;
155 self
156 }
157 /// <p>The name of the activity.</p>
158 /// <p>A name must <i>not</i> contain:</p>
159 /// <ul>
160 /// <li>
161 /// <p>white space</p></li>
162 /// <li>
163 /// <p>brackets <code>< > { } \[ \]</code></p></li>
164 /// <li>
165 /// <p>wildcard characters <code>? *</code></p></li>
166 /// <li>
167 /// <p>special characters <code>" # % \ ^ | ~ ` $ & , ; : /</code></p></li>
168 /// <li>
169 /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
170 /// <li>
171 /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
172 /// <li>
173 /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
174 /// </ul>
175 /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
176 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
177 &self.name
178 }
179 /// <p>The date the activity is created.</p>
180 /// This field is required.
181 pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
182 self.creation_date = ::std::option::Option::Some(input);
183 self
184 }
185 /// <p>The date the activity is created.</p>
186 pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
187 self.creation_date = input;
188 self
189 }
190 /// <p>The date the activity is created.</p>
191 pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
192 &self.creation_date
193 }
194 /// <p>Settings for configured server-side encryption.</p>
195 pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
196 self.encryption_configuration = ::std::option::Option::Some(input);
197 self
198 }
199 /// <p>Settings for configured server-side encryption.</p>
200 pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
201 self.encryption_configuration = input;
202 self
203 }
204 /// <p>Settings for configured server-side encryption.</p>
205 pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
206 &self.encryption_configuration
207 }
208 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
209 self._request_id = Some(request_id.into());
210 self
211 }
212
213 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
214 self._request_id = request_id;
215 self
216 }
217 /// Consumes the builder and constructs a [`DescribeActivityOutput`](crate::operation::describe_activity::DescribeActivityOutput).
218 /// This method will fail if any of the following fields are not set:
219 /// - [`activity_arn`](crate::operation::describe_activity::builders::DescribeActivityOutputBuilder::activity_arn)
220 /// - [`name`](crate::operation::describe_activity::builders::DescribeActivityOutputBuilder::name)
221 /// - [`creation_date`](crate::operation::describe_activity::builders::DescribeActivityOutputBuilder::creation_date)
222 pub fn build(
223 self,
224 ) -> ::std::result::Result<crate::operation::describe_activity::DescribeActivityOutput, ::aws_smithy_types::error::operation::BuildError> {
225 ::std::result::Result::Ok(crate::operation::describe_activity::DescribeActivityOutput {
226 activity_arn: self.activity_arn.ok_or_else(|| {
227 ::aws_smithy_types::error::operation::BuildError::missing_field(
228 "activity_arn",
229 "activity_arn was not specified but it is required when building DescribeActivityOutput",
230 )
231 })?,
232 name: self.name.ok_or_else(|| {
233 ::aws_smithy_types::error::operation::BuildError::missing_field(
234 "name",
235 "name was not specified but it is required when building DescribeActivityOutput",
236 )
237 })?,
238 creation_date: self.creation_date.ok_or_else(|| {
239 ::aws_smithy_types::error::operation::BuildError::missing_field(
240 "creation_date",
241 "creation_date was not specified but it is required when building DescribeActivityOutput",
242 )
243 })?,
244 encryption_configuration: self.encryption_configuration,
245 _request_id: self._request_id,
246 })
247 }
248}