aws_sdk_sfn/operation/create_activity/
_create_activity_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 CreateActivityInput {
6    /// <p>The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>Step Functions Developer Guide</i>.</p>
7    /// <p>A name must <i>not</i> contain:</p>
8    /// <ul>
9    /// <li>
10    /// <p>white space</p></li>
11    /// <li>
12    /// <p>brackets <code>&lt; &gt; { } \[ \]</code></p></li>
13    /// <li>
14    /// <p>wildcard characters <code>? *</code></p></li>
15    /// <li>
16    /// <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code></p></li>
17    /// <li>
18    /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
19    /// <li>
20    /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
21    /// <li>
22    /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
23    /// </ul>
24    /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
25    pub name: ::std::option::Option<::std::string::String>,
26    /// <p>The list of tags to add to a resource.</p>
27    /// <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
28    /// <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
29    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
30    /// <p>Settings to configure server-side encryption.</p>
31    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
32}
33impl CreateActivityInput {
34    /// <p>The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>Step Functions Developer Guide</i>.</p>
35    /// <p>A name must <i>not</i> contain:</p>
36    /// <ul>
37    /// <li>
38    /// <p>white space</p></li>
39    /// <li>
40    /// <p>brackets <code>&lt; &gt; { } \[ \]</code></p></li>
41    /// <li>
42    /// <p>wildcard characters <code>? *</code></p></li>
43    /// <li>
44    /// <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code></p></li>
45    /// <li>
46    /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
47    /// <li>
48    /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
49    /// <li>
50    /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
51    /// </ul>
52    /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
53    pub fn name(&self) -> ::std::option::Option<&str> {
54        self.name.as_deref()
55    }
56    /// <p>The list of tags to add to a resource.</p>
57    /// <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
58    /// <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
59    ///
60    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
61    pub fn tags(&self) -> &[crate::types::Tag] {
62        self.tags.as_deref().unwrap_or_default()
63    }
64    /// <p>Settings to configure server-side encryption.</p>
65    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
66        self.encryption_configuration.as_ref()
67    }
68}
69impl CreateActivityInput {
70    /// Creates a new builder-style object to manufacture [`CreateActivityInput`](crate::operation::create_activity::CreateActivityInput).
71    pub fn builder() -> crate::operation::create_activity::builders::CreateActivityInputBuilder {
72        crate::operation::create_activity::builders::CreateActivityInputBuilder::default()
73    }
74}
75
76/// A builder for [`CreateActivityInput`](crate::operation::create_activity::CreateActivityInput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct CreateActivityInputBuilder {
80    pub(crate) name: ::std::option::Option<::std::string::String>,
81    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
82    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
83}
84impl CreateActivityInputBuilder {
85    /// <p>The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>Step Functions Developer Guide</i>.</p>
86    /// <p>A name must <i>not</i> contain:</p>
87    /// <ul>
88    /// <li>
89    /// <p>white space</p></li>
90    /// <li>
91    /// <p>brackets <code>&lt; &gt; { } \[ \]</code></p></li>
92    /// <li>
93    /// <p>wildcard characters <code>? *</code></p></li>
94    /// <li>
95    /// <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code></p></li>
96    /// <li>
97    /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
98    /// <li>
99    /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
100    /// <li>
101    /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
102    /// </ul>
103    /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
104    /// This field is required.
105    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.name = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <p>The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>Step Functions Developer Guide</i>.</p>
110    /// <p>A name must <i>not</i> contain:</p>
111    /// <ul>
112    /// <li>
113    /// <p>white space</p></li>
114    /// <li>
115    /// <p>brackets <code>&lt; &gt; { } \[ \]</code></p></li>
116    /// <li>
117    /// <p>wildcard characters <code>? *</code></p></li>
118    /// <li>
119    /// <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code></p></li>
120    /// <li>
121    /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
122    /// <li>
123    /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
124    /// <li>
125    /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
126    /// </ul>
127    /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
128    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.name = input;
130        self
131    }
132    /// <p>The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>Step Functions Developer Guide</i>.</p>
133    /// <p>A name must <i>not</i> contain:</p>
134    /// <ul>
135    /// <li>
136    /// <p>white space</p></li>
137    /// <li>
138    /// <p>brackets <code>&lt; &gt; { } \[ \]</code></p></li>
139    /// <li>
140    /// <p>wildcard characters <code>? *</code></p></li>
141    /// <li>
142    /// <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code></p></li>
143    /// <li>
144    /// <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>, <code>U+FFFE-FFFF</code>)</p></li>
145    /// <li>
146    /// <p>surrogates (<code>U+D800-DFFF</code>)</p></li>
147    /// <li>
148    /// <p>invalid characters (<code> U+10FFFF</code>)</p></li>
149    /// </ul>
150    /// <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
151    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
152        &self.name
153    }
154    /// Appends an item to `tags`.
155    ///
156    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
157    ///
158    /// <p>The list of tags to add to a resource.</p>
159    /// <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
160    /// <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
161    pub fn tags(mut self, input: crate::types::Tag) -> Self {
162        let mut v = self.tags.unwrap_or_default();
163        v.push(input);
164        self.tags = ::std::option::Option::Some(v);
165        self
166    }
167    /// <p>The list of tags to add to a resource.</p>
168    /// <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
169    /// <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
170    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
171        self.tags = input;
172        self
173    }
174    /// <p>The list of tags to add to a resource.</p>
175    /// <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
176    /// <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
177    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
178        &self.tags
179    }
180    /// <p>Settings to configure server-side encryption.</p>
181    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
182        self.encryption_configuration = ::std::option::Option::Some(input);
183        self
184    }
185    /// <p>Settings to configure server-side encryption.</p>
186    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
187        self.encryption_configuration = input;
188        self
189    }
190    /// <p>Settings to configure server-side encryption.</p>
191    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
192        &self.encryption_configuration
193    }
194    /// Consumes the builder and constructs a [`CreateActivityInput`](crate::operation::create_activity::CreateActivityInput).
195    pub fn build(
196        self,
197    ) -> ::std::result::Result<crate::operation::create_activity::CreateActivityInput, ::aws_smithy_types::error::operation::BuildError> {
198        ::std::result::Result::Ok(crate::operation::create_activity::CreateActivityInput {
199            name: self.name,
200            tags: self.tags,
201            encryption_configuration: self.encryption_configuration,
202        })
203    }
204}