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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about agents associated with the user’s Amazon Web Services account. Information includes agent IDs, IP addresses, media access control (MAC) addresses, agent or collector status, hostname where the agent resides, and agent version for each agent.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AgentInfo {
    /// <p>The agent or collector ID.</p>
    pub agent_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the host where the agent or collector resides. The host can be a server or virtual machine.</p>
    pub host_name: ::std::option::Option<::std::string::String>,
    /// <p>Network details about the host where the agent or collector resides.</p>
    pub agent_network_info_list: ::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>>,
    /// <p>The ID of the connector.</p>
    pub connector_id: ::std::option::Option<::std::string::String>,
    /// <p>The agent or collector version.</p>
    pub version: ::std::option::Option<::std::string::String>,
    /// <p>The health of the agent.</p>
    pub health: ::std::option::Option<crate::types::AgentStatus>,
    /// <p>Time since agent health was reported.</p>
    pub last_health_ping_time: ::std::option::Option<::std::string::String>,
    /// <p>Status of the collection process for an agent.</p>
    pub collection_status: ::std::option::Option<::std::string::String>,
    /// <p>Type of agent.</p>
    pub agent_type: ::std::option::Option<::std::string::String>,
    /// <p>Agent's first registration timestamp in UTC.</p>
    pub registered_time: ::std::option::Option<::std::string::String>,
}
impl AgentInfo {
    /// <p>The agent or collector ID.</p>
    pub fn agent_id(&self) -> ::std::option::Option<&str> {
        self.agent_id.as_deref()
    }
    /// <p>The name of the host where the agent or collector resides. The host can be a server or virtual machine.</p>
    pub fn host_name(&self) -> ::std::option::Option<&str> {
        self.host_name.as_deref()
    }
    /// <p>Network details about the host where the agent or collector resides.</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 `.agent_network_info_list.is_none()`.
    pub fn agent_network_info_list(&self) -> &[crate::types::AgentNetworkInfo] {
        self.agent_network_info_list.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the connector.</p>
    pub fn connector_id(&self) -> ::std::option::Option<&str> {
        self.connector_id.as_deref()
    }
    /// <p>The agent or collector version.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
    /// <p>The health of the agent.</p>
    pub fn health(&self) -> ::std::option::Option<&crate::types::AgentStatus> {
        self.health.as_ref()
    }
    /// <p>Time since agent health was reported.</p>
    pub fn last_health_ping_time(&self) -> ::std::option::Option<&str> {
        self.last_health_ping_time.as_deref()
    }
    /// <p>Status of the collection process for an agent.</p>
    pub fn collection_status(&self) -> ::std::option::Option<&str> {
        self.collection_status.as_deref()
    }
    /// <p>Type of agent.</p>
    pub fn agent_type(&self) -> ::std::option::Option<&str> {
        self.agent_type.as_deref()
    }
    /// <p>Agent's first registration timestamp in UTC.</p>
    pub fn registered_time(&self) -> ::std::option::Option<&str> {
        self.registered_time.as_deref()
    }
}
impl AgentInfo {
    /// Creates a new builder-style object to manufacture [`AgentInfo`](crate::types::AgentInfo).
    pub fn builder() -> crate::types::builders::AgentInfoBuilder {
        crate::types::builders::AgentInfoBuilder::default()
    }
}

/// A builder for [`AgentInfo`](crate::types::AgentInfo).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AgentInfoBuilder {
    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
    pub(crate) host_name: ::std::option::Option<::std::string::String>,
    pub(crate) agent_network_info_list: ::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>>,
    pub(crate) connector_id: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) health: ::std::option::Option<crate::types::AgentStatus>,
    pub(crate) last_health_ping_time: ::std::option::Option<::std::string::String>,
    pub(crate) collection_status: ::std::option::Option<::std::string::String>,
    pub(crate) agent_type: ::std::option::Option<::std::string::String>,
    pub(crate) registered_time: ::std::option::Option<::std::string::String>,
}
impl AgentInfoBuilder {
    /// <p>The agent or collector ID.</p>
    pub fn agent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent or collector ID.</p>
    pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_id = input;
        self
    }
    /// <p>The agent or collector ID.</p>
    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_id
    }
    /// <p>The name of the host where the agent or collector resides. The host can be a server or virtual machine.</p>
    pub fn host_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the host where the agent or collector resides. The host can be a server or virtual machine.</p>
    pub fn set_host_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_name = input;
        self
    }
    /// <p>The name of the host where the agent or collector resides. The host can be a server or virtual machine.</p>
    pub fn get_host_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_name
    }
    /// Appends an item to `agent_network_info_list`.
    ///
    /// To override the contents of this collection use [`set_agent_network_info_list`](Self::set_agent_network_info_list).
    ///
    /// <p>Network details about the host where the agent or collector resides.</p>
    pub fn agent_network_info_list(mut self, input: crate::types::AgentNetworkInfo) -> Self {
        let mut v = self.agent_network_info_list.unwrap_or_default();
        v.push(input);
        self.agent_network_info_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>Network details about the host where the agent or collector resides.</p>
    pub fn set_agent_network_info_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>>) -> Self {
        self.agent_network_info_list = input;
        self
    }
    /// <p>Network details about the host where the agent or collector resides.</p>
    pub fn get_agent_network_info_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>> {
        &self.agent_network_info_list
    }
    /// <p>The ID of the connector.</p>
    pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connector_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the connector.</p>
    pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connector_id = input;
        self
    }
    /// <p>The ID of the connector.</p>
    pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connector_id
    }
    /// <p>The agent or collector version.</p>
    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 agent or collector version.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The agent or collector version.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// <p>The health of the agent.</p>
    pub fn health(mut self, input: crate::types::AgentStatus) -> Self {
        self.health = ::std::option::Option::Some(input);
        self
    }
    /// <p>The health of the agent.</p>
    pub fn set_health(mut self, input: ::std::option::Option<crate::types::AgentStatus>) -> Self {
        self.health = input;
        self
    }
    /// <p>The health of the agent.</p>
    pub fn get_health(&self) -> &::std::option::Option<crate::types::AgentStatus> {
        &self.health
    }
    /// <p>Time since agent health was reported.</p>
    pub fn last_health_ping_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_health_ping_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Time since agent health was reported.</p>
    pub fn set_last_health_ping_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_health_ping_time = input;
        self
    }
    /// <p>Time since agent health was reported.</p>
    pub fn get_last_health_ping_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_health_ping_time
    }
    /// <p>Status of the collection process for an agent.</p>
    pub fn collection_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.collection_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Status of the collection process for an agent.</p>
    pub fn set_collection_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.collection_status = input;
        self
    }
    /// <p>Status of the collection process for an agent.</p>
    pub fn get_collection_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.collection_status
    }
    /// <p>Type of agent.</p>
    pub fn agent_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Type of agent.</p>
    pub fn set_agent_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_type = input;
        self
    }
    /// <p>Type of agent.</p>
    pub fn get_agent_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_type
    }
    /// <p>Agent's first registration timestamp in UTC.</p>
    pub fn registered_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.registered_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Agent's first registration timestamp in UTC.</p>
    pub fn set_registered_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.registered_time = input;
        self
    }
    /// <p>Agent's first registration timestamp in UTC.</p>
    pub fn get_registered_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.registered_time
    }
    /// Consumes the builder and constructs a [`AgentInfo`](crate::types::AgentInfo).
    pub fn build(self) -> crate::types::AgentInfo {
        crate::types::AgentInfo {
            agent_id: self.agent_id,
            host_name: self.host_name,
            agent_network_info_list: self.agent_network_info_list,
            connector_id: self.connector_id,
            version: self.version,
            health: self.health,
            last_health_ping_time: self.last_health_ping_time,
            collection_status: self.collection_status,
            agent_type: self.agent_type,
            registered_time: self.registered_time,
        }
    }
}