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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information and credentials that you can use to remotely connect to an instance in an EC2 managed fleet. This data type is returned in response to a call to <code>GetInstanceAccess</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct InstanceAccess {
    /// <p>A unique identifier for the fleet containing the instance to be accessed.</p>
    pub fleet_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the instance to be accessed.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>IP address assigned to the instance.</p>
    pub ip_address: ::std::option::Option<::std::string::String>,
    /// <p>Operating system that is running on the instance.</p>
    pub operating_system: ::std::option::Option<crate::types::OperatingSystem>,
    /// <p>Security credentials that are required to access the instance.</p>
    pub credentials: ::std::option::Option<crate::types::InstanceCredentials>,
}
impl InstanceAccess {
    /// <p>A unique identifier for the fleet containing the instance to be accessed.</p>
    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
    /// <p>A unique identifier for the instance to be accessed.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>IP address assigned to the instance.</p>
    pub fn ip_address(&self) -> ::std::option::Option<&str> {
        self.ip_address.as_deref()
    }
    /// <p>Operating system that is running on the instance.</p>
    pub fn operating_system(&self) -> ::std::option::Option<&crate::types::OperatingSystem> {
        self.operating_system.as_ref()
    }
    /// <p>Security credentials that are required to access the instance.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::InstanceCredentials> {
        self.credentials.as_ref()
    }
}
impl ::std::fmt::Debug for InstanceAccess {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("InstanceAccess");
        formatter.field("fleet_id", &self.fleet_id);
        formatter.field("instance_id", &self.instance_id);
        formatter.field("ip_address", &"*** Sensitive Data Redacted ***");
        formatter.field("operating_system", &self.operating_system);
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl InstanceAccess {
    /// Creates a new builder-style object to manufacture [`InstanceAccess`](crate::types::InstanceAccess).
    pub fn builder() -> crate::types::builders::InstanceAccessBuilder {
        crate::types::builders::InstanceAccessBuilder::default()
    }
}

/// A builder for [`InstanceAccess`](crate::types::InstanceAccess).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct InstanceAccessBuilder {
    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) operating_system: ::std::option::Option<crate::types::OperatingSystem>,
    pub(crate) credentials: ::std::option::Option<crate::types::InstanceCredentials>,
}
impl InstanceAccessBuilder {
    /// <p>A unique identifier for the fleet containing the instance to be accessed.</p>
    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.fleet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the fleet containing the instance to be accessed.</p>
    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.fleet_id = input;
        self
    }
    /// <p>A unique identifier for the fleet containing the instance to be accessed.</p>
    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.fleet_id
    }
    /// <p>A unique identifier for the instance to be accessed.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the instance to be accessed.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>A unique identifier for the instance to be accessed.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>IP address assigned to the instance.</p>
    pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>IP address assigned to the instance.</p>
    pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip_address = input;
        self
    }
    /// <p>IP address assigned to the instance.</p>
    pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip_address
    }
    /// <p>Operating system that is running on the instance.</p>
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
        self.operating_system = ::std::option::Option::Some(input);
        self
    }
    /// <p>Operating system that is running on the instance.</p>
    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
        self.operating_system = input;
        self
    }
    /// <p>Operating system that is running on the instance.</p>
    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
        &self.operating_system
    }
    /// <p>Security credentials that are required to access the instance.</p>
    pub fn credentials(mut self, input: crate::types::InstanceCredentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>Security credentials that are required to access the instance.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::InstanceCredentials>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>Security credentials that are required to access the instance.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::InstanceCredentials> {
        &self.credentials
    }
    /// Consumes the builder and constructs a [`InstanceAccess`](crate::types::InstanceAccess).
    pub fn build(self) -> crate::types::InstanceAccess {
        crate::types::InstanceAccess {
            fleet_id: self.fleet_id,
            instance_id: self.instance_id,
            ip_address: self.ip_address,
            operating_system: self.operating_system,
            credentials: self.credentials,
        }
    }
}
impl ::std::fmt::Debug for InstanceAccessBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("InstanceAccessBuilder");
        formatter.field("fleet_id", &self.fleet_id);
        formatter.field("instance_id", &self.instance_id);
        formatter.field("ip_address", &"*** Sensitive Data Redacted ***");
        formatter.field("operating_system", &self.operating_system);
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}