#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AgentInfo {
pub agent_id: ::std::option::Option<::std::string::String>,
pub host_name: ::std::option::Option<::std::string::String>,
pub agent_network_info_list: ::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>>,
pub connector_id: ::std::option::Option<::std::string::String>,
pub version: ::std::option::Option<::std::string::String>,
pub health: ::std::option::Option<crate::types::AgentStatus>,
pub last_health_ping_time: ::std::option::Option<::std::string::String>,
pub collection_status: ::std::option::Option<::std::string::String>,
pub agent_type: ::std::option::Option<::std::string::String>,
pub registered_time: ::std::option::Option<::std::string::String>,
}
impl AgentInfo {
pub fn agent_id(&self) -> ::std::option::Option<&str> {
self.agent_id.as_deref()
}
pub fn host_name(&self) -> ::std::option::Option<&str> {
self.host_name.as_deref()
}
pub fn agent_network_info_list(&self) -> &[crate::types::AgentNetworkInfo] {
self.agent_network_info_list.as_deref().unwrap_or_default()
}
pub fn connector_id(&self) -> ::std::option::Option<&str> {
self.connector_id.as_deref()
}
pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
pub fn health(&self) -> ::std::option::Option<&crate::types::AgentStatus> {
self.health.as_ref()
}
pub fn last_health_ping_time(&self) -> ::std::option::Option<&str> {
self.last_health_ping_time.as_deref()
}
pub fn collection_status(&self) -> ::std::option::Option<&str> {
self.collection_status.as_deref()
}
pub fn agent_type(&self) -> ::std::option::Option<&str> {
self.agent_type.as_deref()
}
pub fn registered_time(&self) -> ::std::option::Option<&str> {
self.registered_time.as_deref()
}
}
impl AgentInfo {
pub fn builder() -> crate::types::builders::AgentInfoBuilder {
crate::types::builders::AgentInfoBuilder::default()
}
}
#[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 {
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
}
pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_id = input;
self
}
pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_id
}
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
}
pub fn set_host_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.host_name = input;
self
}
pub fn get_host_name(&self) -> &::std::option::Option<::std::string::String> {
&self.host_name
}
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
}
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
}
pub fn get_agent_network_info_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AgentNetworkInfo>> {
&self.agent_network_info_list
}
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
}
pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.connector_id = input;
self
}
pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
&self.connector_id
}
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
pub fn health(mut self, input: crate::types::AgentStatus) -> Self {
self.health = ::std::option::Option::Some(input);
self
}
pub fn set_health(mut self, input: ::std::option::Option<crate::types::AgentStatus>) -> Self {
self.health = input;
self
}
pub fn get_health(&self) -> &::std::option::Option<crate::types::AgentStatus> {
&self.health
}
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
}
pub fn set_last_health_ping_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_health_ping_time = input;
self
}
pub fn get_last_health_ping_time(&self) -> &::std::option::Option<::std::string::String> {
&self.last_health_ping_time
}
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
}
pub fn set_collection_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collection_status = input;
self
}
pub fn get_collection_status(&self) -> &::std::option::Option<::std::string::String> {
&self.collection_status
}
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
}
pub fn set_agent_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_type = input;
self
}
pub fn get_agent_type(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_type
}
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
}
pub fn set_registered_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registered_time = input;
self
}
pub fn get_registered_time(&self) -> &::std::option::Option<::std::string::String> {
&self.registered_time
}
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,
}
}
}