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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
// 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 RegisterInstanceInput {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub stack_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance's host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub hostname: ::std::option::Option<::std::string::String>,
    /// <p>The instance's public IP address.</p>
    pub public_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instance's private IP address.</p>
    pub private_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub rsa_public_key: ::std::option::Option<::std::string::String>,
    /// <p>The instances public RSA key fingerprint.</p>
    pub rsa_public_key_fingerprint: ::std::option::Option<::std::string::String>,
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub instance_identity: ::std::option::Option<crate::types::InstanceIdentity>,
}
impl RegisterInstanceInput {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn stack_id(&self) -> ::std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>The instance's host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn hostname(&self) -> ::std::option::Option<&str> {
        self.hostname.as_deref()
    }
    /// <p>The instance's public IP address.</p>
    pub fn public_ip(&self) -> ::std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(&self) -> ::std::option::Option<&str> {
        self.private_ip.as_deref()
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn rsa_public_key(&self) -> ::std::option::Option<&str> {
        self.rsa_public_key.as_deref()
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn rsa_public_key_fingerprint(&self) -> ::std::option::Option<&str> {
        self.rsa_public_key_fingerprint.as_deref()
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn instance_identity(&self) -> ::std::option::Option<&crate::types::InstanceIdentity> {
        self.instance_identity.as_ref()
    }
}
impl RegisterInstanceInput {
    /// Creates a new builder-style object to manufacture [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
    pub fn builder() -> crate::operation::register_instance::builders::RegisterInstanceInputBuilder {
        crate::operation::register_instance::builders::RegisterInstanceInputBuilder::default()
    }
}

/// A builder for [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RegisterInstanceInputBuilder {
    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
    pub(crate) hostname: ::std::option::Option<::std::string::String>,
    pub(crate) public_ip: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip: ::std::option::Option<::std::string::String>,
    pub(crate) rsa_public_key: ::std::option::Option<::std::string::String>,
    pub(crate) rsa_public_key_fingerprint: ::std::option::Option<::std::string::String>,
    pub(crate) instance_identity: ::std::option::Option<crate::types::InstanceIdentity>,
}
impl RegisterInstanceInputBuilder {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    /// This field is required.
    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_id
    }
    /// <p>The instance's host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hostname = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn set_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hostname = input;
        self
    }
    /// <p>The instance's host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn get_hostname(&self) -> &::std::option::Option<::std::string::String> {
        &self.hostname
    }
    /// <p>The instance's public IP address.</p>
    pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's public IP address.</p>
    pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_ip = input;
        self
    }
    /// <p>The instance's public IP address.</p>
    pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_ip
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn set_private_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ip = input;
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn get_private_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ip
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn rsa_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rsa_public_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn set_rsa_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rsa_public_key = input;
        self
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn get_rsa_public_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.rsa_public_key
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn rsa_public_key_fingerprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rsa_public_key_fingerprint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn set_rsa_public_key_fingerprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rsa_public_key_fingerprint = input;
        self
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn get_rsa_public_key_fingerprint(&self) -> &::std::option::Option<::std::string::String> {
        &self.rsa_public_key_fingerprint
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn instance_identity(mut self, input: crate::types::InstanceIdentity) -> Self {
        self.instance_identity = ::std::option::Option::Some(input);
        self
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn set_instance_identity(mut self, input: ::std::option::Option<crate::types::InstanceIdentity>) -> Self {
        self.instance_identity = input;
        self
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn get_instance_identity(&self) -> &::std::option::Option<crate::types::InstanceIdentity> {
        &self.instance_identity
    }
    /// Consumes the builder and constructs a [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_instance::RegisterInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::register_instance::RegisterInstanceInput {
            stack_id: self.stack_id,
            hostname: self.hostname,
            public_ip: self.public_ip,
            private_ip: self.private_ip,
            rsa_public_key: self.rsa_public_key,
            rsa_public_key_fingerprint: self.rsa_public_key_fingerprint,
            instance_identity: self.instance_identity,
        })
    }
}