aws_sdk_swf/operation/register_domain/_register_domain_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 RegisterDomainInput {
6 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
7 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
8 pub name: ::std::option::Option<::std::string::String>,
9 /// <p>A text description of the domain.</p>
10 pub description: ::std::option::Option<::std::string::String>,
11 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
12 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
13 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
14 pub workflow_execution_retention_period_in_days: ::std::option::Option<::std::string::String>,
15 /// <p>Tags to be added when registering a domain.</p>
16 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
17 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>,
18}
19impl RegisterDomainInput {
20 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
21 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
22 pub fn name(&self) -> ::std::option::Option<&str> {
23 self.name.as_deref()
24 }
25 /// <p>A text description of the domain.</p>
26 pub fn description(&self) -> ::std::option::Option<&str> {
27 self.description.as_deref()
28 }
29 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
30 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
31 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
32 pub fn workflow_execution_retention_period_in_days(&self) -> ::std::option::Option<&str> {
33 self.workflow_execution_retention_period_in_days.as_deref()
34 }
35 /// <p>Tags to be added when registering a domain.</p>
36 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
37 ///
38 /// 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()`.
39 pub fn tags(&self) -> &[crate::types::ResourceTag] {
40 self.tags.as_deref().unwrap_or_default()
41 }
42}
43impl RegisterDomainInput {
44 /// Creates a new builder-style object to manufacture [`RegisterDomainInput`](crate::operation::register_domain::RegisterDomainInput).
45 pub fn builder() -> crate::operation::register_domain::builders::RegisterDomainInputBuilder {
46 crate::operation::register_domain::builders::RegisterDomainInputBuilder::default()
47 }
48}
49
50/// A builder for [`RegisterDomainInput`](crate::operation::register_domain::RegisterDomainInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct RegisterDomainInputBuilder {
54 pub(crate) name: ::std::option::Option<::std::string::String>,
55 pub(crate) description: ::std::option::Option<::std::string::String>,
56 pub(crate) workflow_execution_retention_period_in_days: ::std::option::Option<::std::string::String>,
57 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>,
58}
59impl RegisterDomainInputBuilder {
60 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
61 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
62 /// This field is required.
63 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.name = ::std::option::Option::Some(input.into());
65 self
66 }
67 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
68 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
69 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.name = input;
71 self
72 }
73 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
74 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
75 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
76 &self.name
77 }
78 /// <p>A text description of the domain.</p>
79 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.description = ::std::option::Option::Some(input.into());
81 self
82 }
83 /// <p>A text description of the domain.</p>
84 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.description = input;
86 self
87 }
88 /// <p>A text description of the domain.</p>
89 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
90 &self.description
91 }
92 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
93 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
94 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
95 /// This field is required.
96 pub fn workflow_execution_retention_period_in_days(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.workflow_execution_retention_period_in_days = ::std::option::Option::Some(input.into());
98 self
99 }
100 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
101 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
102 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
103 pub fn set_workflow_execution_retention_period_in_days(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.workflow_execution_retention_period_in_days = input;
105 self
106 }
107 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
108 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
109 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
110 pub fn get_workflow_execution_retention_period_in_days(&self) -> &::std::option::Option<::std::string::String> {
111 &self.workflow_execution_retention_period_in_days
112 }
113 /// Appends an item to `tags`.
114 ///
115 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
116 ///
117 /// <p>Tags to be added when registering a domain.</p>
118 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
119 pub fn tags(mut self, input: crate::types::ResourceTag) -> Self {
120 let mut v = self.tags.unwrap_or_default();
121 v.push(input);
122 self.tags = ::std::option::Option::Some(v);
123 self
124 }
125 /// <p>Tags to be added when registering a domain.</p>
126 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
127 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>) -> Self {
128 self.tags = input;
129 self
130 }
131 /// <p>Tags to be added when registering a domain.</p>
132 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
133 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>> {
134 &self.tags
135 }
136 /// Consumes the builder and constructs a [`RegisterDomainInput`](crate::operation::register_domain::RegisterDomainInput).
137 pub fn build(
138 self,
139 ) -> ::std::result::Result<crate::operation::register_domain::RegisterDomainInput, ::aws_smithy_types::error::operation::BuildError> {
140 ::std::result::Result::Ok(crate::operation::register_domain::RegisterDomainInput {
141 name: self.name,
142 description: self.description,
143 workflow_execution_retention_period_in_days: self.workflow_execution_retention_period_in_days,
144 tags: self.tags,
145 })
146 }
147}