1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateLandingZoneInput {
/// <p>The landing zone version, for example, 3.0.</p>
pub version: ::std::option::Option<::std::string::String>,
/// <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
pub remediation_types: ::std::option::Option<::std::vec::Vec<crate::types::RemediationType>>,
/// <p>Tags to be applied to the landing zone.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>.</p>
pub manifest: ::std::option::Option<::aws_smithy_types::Document>,
}
impl CreateLandingZoneInput {
/// <p>The landing zone version, for example, 3.0.</p>
pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
/// <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.remediation_types.is_none()`.
pub fn remediation_types(&self) -> &[crate::types::RemediationType] {
self.remediation_types.as_deref().unwrap_or_default()
}
/// <p>Tags to be applied to the landing zone.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>.</p>
pub fn manifest(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
self.manifest.as_ref()
}
}
impl CreateLandingZoneInput {
/// Creates a new builder-style object to manufacture [`CreateLandingZoneInput`](crate::operation::create_landing_zone::CreateLandingZoneInput).
pub fn builder() -> crate::operation::create_landing_zone::builders::CreateLandingZoneInputBuilder {
crate::operation::create_landing_zone::builders::CreateLandingZoneInputBuilder::default()
}
}
/// A builder for [`CreateLandingZoneInput`](crate::operation::create_landing_zone::CreateLandingZoneInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLandingZoneInputBuilder {
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) remediation_types: ::std::option::Option<::std::vec::Vec<crate::types::RemediationType>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) manifest: ::std::option::Option<::aws_smithy_types::Document>,
}
impl CreateLandingZoneInputBuilder {
/// <p>The landing zone version, for example, 3.0.</p>
/// This field is required.
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The landing zone version, for example, 3.0.</p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The landing zone version, for example, 3.0.</p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// Appends an item to `remediation_types`.
///
/// To override the contents of this collection use [`set_remediation_types`](Self::set_remediation_types).
///
/// <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
pub fn remediation_types(mut self, input: crate::types::RemediationType) -> Self {
let mut v = self.remediation_types.unwrap_or_default();
v.push(input);
self.remediation_types = ::std::option::Option::Some(v);
self
}
/// <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
pub fn set_remediation_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RemediationType>>) -> Self {
self.remediation_types = input;
self
}
/// <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
pub fn get_remediation_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RemediationType>> {
&self.remediation_types
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Tags to be applied to the landing zone.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Tags to be applied to the landing zone.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>Tags to be applied to the landing zone.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>.</p>
pub fn manifest(mut self, input: ::aws_smithy_types::Document) -> Self {
self.manifest = ::std::option::Option::Some(input);
self
}
/// <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>.</p>
pub fn set_manifest(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
self.manifest = input;
self
}
/// <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>.</p>
pub fn get_manifest(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
&self.manifest
}
/// Consumes the builder and constructs a [`CreateLandingZoneInput`](crate::operation::create_landing_zone::CreateLandingZoneInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_landing_zone::CreateLandingZoneInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_landing_zone::CreateLandingZoneInput {
version: self.version,
remediation_types: self.remediation_types,
tags: self.tags,
manifest: self.manifest,
})
}
}