#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PrometheusTarget {
#[allow(missing_docs)] pub targets: std::option::Option<std::vec::Vec<std::string::String>>,
pub labels:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl PrometheusTarget {
#[allow(missing_docs)] pub fn targets(&self) -> std::option::Option<&[std::string::String]> {
self.targets.as_deref()
}
pub fn labels(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.labels.as_ref()
}
}
impl std::fmt::Debug for PrometheusTarget {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PrometheusTarget");
formatter.field("targets", &self.targets);
formatter.field("labels", &self.labels);
formatter.finish()
}
}
pub mod prometheus_target {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) targets: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) labels: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn targets(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input.into());
self.targets = Some(v);
self
}
#[allow(missing_docs)] pub fn set_targets(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.targets = input;
self
}
pub fn labels(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.labels.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.labels = Some(hash_map);
self
}
pub fn set_labels(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.labels = input;
self
}
pub fn build(self) -> crate::model::PrometheusTarget {
crate::model::PrometheusTarget {
targets: self.targets,
labels: self.labels,
}
}
}
}
impl PrometheusTarget {
pub fn builder() -> crate::model::prometheus_target::Builder {
crate::model::prometheus_target::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SystemdOutputInner {
pub hostname: std::option::Option<std::string::String>,
pub service: std::option::Option<std::string::String>,
pub output: std::option::Option<std::string::String>,
pub error: std::option::Option<std::string::String>,
pub exit_code: std::option::Option<i64>,
}
impl SystemdOutputInner {
pub fn hostname(&self) -> std::option::Option<&str> {
self.hostname.as_deref()
}
pub fn service(&self) -> std::option::Option<&str> {
self.service.as_deref()
}
pub fn output(&self) -> std::option::Option<&str> {
self.output.as_deref()
}
pub fn error(&self) -> std::option::Option<&str> {
self.error.as_deref()
}
pub fn exit_code(&self) -> std::option::Option<i64> {
self.exit_code
}
}
impl std::fmt::Debug for SystemdOutputInner {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SystemdOutputInner");
formatter.field("hostname", &self.hostname);
formatter.field("service", &self.service);
formatter.field("output", &self.output);
formatter.field("error", &self.error);
formatter.field("exit_code", &self.exit_code);
formatter.finish()
}
}
pub mod systemd_output_inner {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) hostname: std::option::Option<std::string::String>,
pub(crate) service: std::option::Option<std::string::String>,
pub(crate) output: std::option::Option<std::string::String>,
pub(crate) error: std::option::Option<std::string::String>,
pub(crate) exit_code: std::option::Option<i64>,
}
impl Builder {
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.hostname = Some(input.into());
self
}
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hostname = input;
self
}
pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
self.service = Some(input.into());
self
}
pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service = input;
self
}
pub fn output(mut self, input: impl Into<std::string::String>) -> Self {
self.output = Some(input.into());
self
}
pub fn set_output(mut self, input: std::option::Option<std::string::String>) -> Self {
self.output = input;
self
}
pub fn error(mut self, input: impl Into<std::string::String>) -> Self {
self.error = Some(input.into());
self
}
pub fn set_error(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error = input;
self
}
pub fn exit_code(mut self, input: i64) -> Self {
self.exit_code = Some(input);
self
}
pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
self.exit_code = input;
self
}
pub fn build(self) -> crate::model::SystemdOutputInner {
crate::model::SystemdOutputInner {
hostname: self.hostname,
service: self.service,
output: self.output,
error: self.error,
exit_code: self.exit_code,
}
}
}
}
impl SystemdOutputInner {
pub fn builder() -> crate::model::systemd_output_inner::Builder {
crate::model::systemd_output_inner::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListOutput {
pub primary: std::option::Option<std::string::String>,
pub host: std::option::Option<crate::model::Host>,
pub resources: std::option::Option<crate::model::Resources>,
pub services: std::option::Option<std::vec::Vec<crate::model::Service>>,
pub checksum: std::option::Option<std::string::String>,
pub available_services: std::option::Option<std::vec::Vec<std::string::String>>,
pub peers: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::ListOutput>,
>,
}
impl ListOutput {
pub fn primary(&self) -> std::option::Option<&str> {
self.primary.as_deref()
}
pub fn host(&self) -> std::option::Option<&crate::model::Host> {
self.host.as_ref()
}
pub fn resources(&self) -> std::option::Option<&crate::model::Resources> {
self.resources.as_ref()
}
pub fn services(&self) -> std::option::Option<&[crate::model::Service]> {
self.services.as_deref()
}
pub fn checksum(&self) -> std::option::Option<&str> {
self.checksum.as_deref()
}
pub fn available_services(&self) -> std::option::Option<&[std::string::String]> {
self.available_services.as_deref()
}
pub fn peers(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::ListOutput>,
> {
self.peers.as_ref()
}
}
impl std::fmt::Debug for ListOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListOutput");
formatter.field("primary", &self.primary);
formatter.field("host", &self.host);
formatter.field("resources", &self.resources);
formatter.field("services", &self.services);
formatter.field("checksum", &self.checksum);
formatter.field("available_services", &self.available_services);
formatter.field("peers", &self.peers);
formatter.finish()
}
}
pub mod list_output {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) primary: std::option::Option<std::string::String>,
pub(crate) host: std::option::Option<crate::model::Host>,
pub(crate) resources: std::option::Option<crate::model::Resources>,
pub(crate) services: std::option::Option<std::vec::Vec<crate::model::Service>>,
pub(crate) checksum: std::option::Option<std::string::String>,
pub(crate) available_services: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) peers: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::ListOutput>,
>,
}
impl Builder {
pub fn primary(mut self, input: impl Into<std::string::String>) -> Self {
self.primary = Some(input.into());
self
}
pub fn set_primary(mut self, input: std::option::Option<std::string::String>) -> Self {
self.primary = input;
self
}
pub fn host(mut self, input: crate::model::Host) -> Self {
self.host = Some(input);
self
}
pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
self.host = input;
self
}
pub fn resources(mut self, input: crate::model::Resources) -> Self {
self.resources = Some(input);
self
}
pub fn set_resources(
mut self,
input: std::option::Option<crate::model::Resources>,
) -> Self {
self.resources = input;
self
}
pub fn services(mut self, input: crate::model::Service) -> Self {
let mut v = self.services.unwrap_or_default();
v.push(input);
self.services = Some(v);
self
}
pub fn set_services(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Service>>,
) -> Self {
self.services = input;
self
}
pub fn checksum(mut self, input: impl Into<std::string::String>) -> Self {
self.checksum = Some(input.into());
self
}
pub fn set_checksum(mut self, input: std::option::Option<std::string::String>) -> Self {
self.checksum = input;
self
}
pub fn available_services(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.available_services.unwrap_or_default();
v.push(input.into());
self.available_services = Some(v);
self
}
pub fn set_available_services(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.available_services = input;
self
}
pub fn peers(
mut self,
k: impl Into<std::string::String>,
v: crate::model::ListOutput,
) -> Self {
let mut hash_map = self.peers.unwrap_or_default();
hash_map.insert(k.into(), v);
self.peers = Some(hash_map);
self
}
pub fn set_peers(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::ListOutput>,
>,
) -> Self {
self.peers = input;
self
}
pub fn build(self) -> crate::model::ListOutput {
crate::model::ListOutput {
primary: self.primary,
host: self.host,
resources: self.resources,
services: self.services,
checksum: self.checksum,
available_services: self.available_services,
peers: self.peers,
}
}
}
}
impl ListOutput {
pub fn builder() -> crate::model::list_output::Builder {
crate::model::list_output::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Service {
pub id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub service: std::option::Option<std::string::String>,
pub pod: std::option::Option<std::string::String>,
pub host: std::option::Option<crate::model::Host>,
pub weave: std::option::Option<crate::model::WeaveInfo>,
pub https: std::option::Option<std::vec::Vec<crate::model::Http>>,
pub tcps: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
pub monitorings: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
pub healthcheck: std::option::Option<crate::model::Healthcheck>,
}
impl Service {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn service(&self) -> std::option::Option<&str> {
self.service.as_deref()
}
pub fn pod(&self) -> std::option::Option<&str> {
self.pod.as_deref()
}
pub fn host(&self) -> std::option::Option<&crate::model::Host> {
self.host.as_ref()
}
pub fn weave(&self) -> std::option::Option<&crate::model::WeaveInfo> {
self.weave.as_ref()
}
pub fn https(&self) -> std::option::Option<&[crate::model::Http]> {
self.https.as_deref()
}
pub fn tcps(&self) -> std::option::Option<&[crate::model::Tcp]> {
self.tcps.as_deref()
}
pub fn monitorings(&self) -> std::option::Option<&[crate::model::Monitoring]> {
self.monitorings.as_deref()
}
pub fn healthcheck(&self) -> std::option::Option<&crate::model::Healthcheck> {
self.healthcheck.as_ref()
}
}
impl std::fmt::Debug for Service {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Service");
formatter.field("id", &self.id);
formatter.field("name", &self.name);
formatter.field("service", &self.service);
formatter.field("pod", &self.pod);
formatter.field("host", &self.host);
formatter.field("weave", &self.weave);
formatter.field("https", &self.https);
formatter.field("tcps", &self.tcps);
formatter.field("monitorings", &self.monitorings);
formatter.field("healthcheck", &self.healthcheck);
formatter.finish()
}
}
pub mod service {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) service: std::option::Option<std::string::String>,
pub(crate) pod: std::option::Option<std::string::String>,
pub(crate) host: std::option::Option<crate::model::Host>,
pub(crate) weave: std::option::Option<crate::model::WeaveInfo>,
pub(crate) https: std::option::Option<std::vec::Vec<crate::model::Http>>,
pub(crate) tcps: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
pub(crate) monitorings: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
pub(crate) healthcheck: std::option::Option<crate::model::Healthcheck>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
self.service = Some(input.into());
self
}
pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service = input;
self
}
pub fn pod(mut self, input: impl Into<std::string::String>) -> Self {
self.pod = Some(input.into());
self
}
pub fn set_pod(mut self, input: std::option::Option<std::string::String>) -> Self {
self.pod = input;
self
}
pub fn host(mut self, input: crate::model::Host) -> Self {
self.host = Some(input);
self
}
pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
self.host = input;
self
}
pub fn weave(mut self, input: crate::model::WeaveInfo) -> Self {
self.weave = Some(input);
self
}
pub fn set_weave(mut self, input: std::option::Option<crate::model::WeaveInfo>) -> Self {
self.weave = input;
self
}
pub fn https(mut self, input: crate::model::Http) -> Self {
let mut v = self.https.unwrap_or_default();
v.push(input);
self.https = Some(v);
self
}
pub fn set_https(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Http>>,
) -> Self {
self.https = input;
self
}
pub fn tcps(mut self, input: crate::model::Tcp) -> Self {
let mut v = self.tcps.unwrap_or_default();
v.push(input);
self.tcps = Some(v);
self
}
pub fn set_tcps(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
) -> Self {
self.tcps = input;
self
}
pub fn monitorings(mut self, input: crate::model::Monitoring) -> Self {
let mut v = self.monitorings.unwrap_or_default();
v.push(input);
self.monitorings = Some(v);
self
}
pub fn set_monitorings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
) -> Self {
self.monitorings = input;
self
}
pub fn healthcheck(mut self, input: crate::model::Healthcheck) -> Self {
self.healthcheck = Some(input);
self
}
pub fn set_healthcheck(
mut self,
input: std::option::Option<crate::model::Healthcheck>,
) -> Self {
self.healthcheck = input;
self
}
pub fn build(self) -> crate::model::Service {
crate::model::Service {
id: self.id,
name: self.name,
service: self.service,
pod: self.pod,
host: self.host,
weave: self.weave,
https: self.https,
tcps: self.tcps,
monitorings: self.monitorings,
healthcheck: self.healthcheck,
}
}
}
}
impl Service {
pub fn builder() -> crate::model::service::Builder {
crate::model::service::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Healthcheck {
pub message: std::option::Option<std::string::String>,
pub status: std::option::Option<std::string::String>,
pub exit_code: std::option::Option<i64>,
pub failing_streak: std::option::Option<i64>,
}
impl Healthcheck {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
pub fn status(&self) -> std::option::Option<&str> {
self.status.as_deref()
}
pub fn exit_code(&self) -> std::option::Option<i64> {
self.exit_code
}
pub fn failing_streak(&self) -> std::option::Option<i64> {
self.failing_streak
}
}
impl std::fmt::Debug for Healthcheck {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Healthcheck");
formatter.field("message", &self.message);
formatter.field("status", &self.status);
formatter.field("exit_code", &self.exit_code);
formatter.field("failing_streak", &self.failing_streak);
formatter.finish()
}
}
pub mod healthcheck {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<std::string::String>,
pub(crate) exit_code: std::option::Option<i64>,
pub(crate) failing_streak: std::option::Option<i64>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
self.status = Some(input.into());
self
}
pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.status = input;
self
}
pub fn exit_code(mut self, input: i64) -> Self {
self.exit_code = Some(input);
self
}
pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
self.exit_code = input;
self
}
pub fn failing_streak(mut self, input: i64) -> Self {
self.failing_streak = Some(input);
self
}
pub fn set_failing_streak(mut self, input: std::option::Option<i64>) -> Self {
self.failing_streak = input;
self
}
pub fn build(self) -> crate::model::Healthcheck {
crate::model::Healthcheck {
message: self.message,
status: self.status,
exit_code: self.exit_code,
failing_streak: self.failing_streak,
}
}
}
}
impl Healthcheck {
pub fn builder() -> crate::model::healthcheck::Builder {
crate::model::healthcheck::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Monitoring {
pub hostname: std::option::Option<std::string::String>,
pub url: std::option::Option<std::string::String>,
pub port: std::option::Option<i16>,
}
impl Monitoring {
pub fn hostname(&self) -> std::option::Option<&str> {
self.hostname.as_deref()
}
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
pub fn port(&self) -> std::option::Option<i16> {
self.port
}
}
impl std::fmt::Debug for Monitoring {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Monitoring");
formatter.field("hostname", &self.hostname);
formatter.field("url", &self.url);
formatter.field("port", &self.port);
formatter.finish()
}
}
pub mod monitoring {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) hostname: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
pub(crate) port: std::option::Option<i16>,
}
impl Builder {
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.hostname = Some(input.into());
self
}
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hostname = input;
self
}
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
pub fn port(mut self, input: i16) -> Self {
self.port = Some(input);
self
}
pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
self.port = input;
self
}
pub fn build(self) -> crate::model::Monitoring {
crate::model::Monitoring {
hostname: self.hostname,
url: self.url,
port: self.port,
}
}
}
}
impl Monitoring {
pub fn builder() -> crate::model::monitoring::Builder {
crate::model::monitoring::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tcp {
pub external: std::option::Option<i16>,
pub internal: std::option::Option<i16>,
}
impl Tcp {
pub fn external(&self) -> std::option::Option<i16> {
self.external
}
pub fn internal(&self) -> std::option::Option<i16> {
self.internal
}
}
impl std::fmt::Debug for Tcp {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tcp");
formatter.field("external", &self.external);
formatter.field("internal", &self.internal);
formatter.finish()
}
}
pub mod tcp {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) external: std::option::Option<i16>,
pub(crate) internal: std::option::Option<i16>,
}
impl Builder {
pub fn external(mut self, input: i16) -> Self {
self.external = Some(input);
self
}
pub fn set_external(mut self, input: std::option::Option<i16>) -> Self {
self.external = input;
self
}
pub fn internal(mut self, input: i16) -> Self {
self.internal = Some(input);
self
}
pub fn set_internal(mut self, input: std::option::Option<i16>) -> Self {
self.internal = input;
self
}
pub fn build(self) -> crate::model::Tcp {
crate::model::Tcp {
external: self.external,
internal: self.internal,
}
}
}
}
impl Tcp {
pub fn builder() -> crate::model::tcp::Builder {
crate::model::tcp::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Http {
pub port: std::option::Option<i16>,
pub verb: std::option::Option<std::string::String>,
pub auth: std::option::Option<bool>,
}
impl Http {
pub fn port(&self) -> std::option::Option<i16> {
self.port
}
pub fn verb(&self) -> std::option::Option<&str> {
self.verb.as_deref()
}
pub fn auth(&self) -> std::option::Option<bool> {
self.auth
}
}
impl std::fmt::Debug for Http {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Http");
formatter.field("port", &self.port);
formatter.field("verb", &self.verb);
formatter.field("auth", &self.auth);
formatter.finish()
}
}
pub mod http {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) port: std::option::Option<i16>,
pub(crate) verb: std::option::Option<std::string::String>,
pub(crate) auth: std::option::Option<bool>,
}
impl Builder {
pub fn port(mut self, input: i16) -> Self {
self.port = Some(input);
self
}
pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
self.port = input;
self
}
pub fn verb(mut self, input: impl Into<std::string::String>) -> Self {
self.verb = Some(input.into());
self
}
pub fn set_verb(mut self, input: std::option::Option<std::string::String>) -> Self {
self.verb = input;
self
}
pub fn auth(mut self, input: bool) -> Self {
self.auth = Some(input);
self
}
pub fn set_auth(mut self, input: std::option::Option<bool>) -> Self {
self.auth = input;
self
}
pub fn build(self) -> crate::model::Http {
crate::model::Http {
port: self.port,
verb: self.verb,
auth: self.auth,
}
}
}
}
impl Http {
pub fn builder() -> crate::model::http::Builder {
crate::model::http::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WeaveInfo {
pub domain: std::option::Option<std::string::String>,
pub ip: std::option::Option<std::string::String>,
}
impl WeaveInfo {
pub fn domain(&self) -> std::option::Option<&str> {
self.domain.as_deref()
}
pub fn ip(&self) -> std::option::Option<&str> {
self.ip.as_deref()
}
}
impl std::fmt::Debug for WeaveInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WeaveInfo");
formatter.field("domain", &self.domain);
formatter.field("ip", &self.ip);
formatter.finish()
}
}
pub mod weave_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain: std::option::Option<std::string::String>,
pub(crate) ip: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
self.domain = Some(input.into());
self
}
pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain = input;
self
}
pub fn ip(mut self, input: impl Into<std::string::String>) -> Self {
self.ip = Some(input.into());
self
}
pub fn set_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip = input;
self
}
pub fn build(self) -> crate::model::WeaveInfo {
crate::model::WeaveInfo {
domain: self.domain,
ip: self.ip,
}
}
}
}
impl WeaveInfo {
pub fn builder() -> crate::model::weave_info::Builder {
crate::model::weave_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Host {
pub hostname: std::option::Option<std::string::String>,
pub domain: std::option::Option<std::string::String>,
}
impl Host {
pub fn hostname(&self) -> std::option::Option<&str> {
self.hostname.as_deref()
}
pub fn domain(&self) -> std::option::Option<&str> {
self.domain.as_deref()
}
}
impl std::fmt::Debug for Host {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Host");
formatter.field("hostname", &self.hostname);
formatter.field("domain", &self.domain);
formatter.finish()
}
}
pub mod host {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) hostname: std::option::Option<std::string::String>,
pub(crate) domain: std::option::Option<std::string::String>,
}
impl Builder {
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.hostname = Some(input.into());
self
}
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hostname = input;
self
}
pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
self.domain = Some(input.into());
self
}
pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain = input;
self
}
pub fn build(self) -> crate::model::Host {
crate::model::Host {
hostname: self.hostname,
domain: self.domain,
}
}
}
}
impl Host {
pub fn builder() -> crate::model::host::Builder {
crate::model::host::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Resources {
pub cpus: std::option::Option<i16>,
pub memory: std::option::Option<crate::model::Memory>,
pub load_avg: std::option::Option<crate::model::LoadAvg>,
pub temperature: std::option::Option<f32>,
}
impl Resources {
pub fn cpus(&self) -> std::option::Option<i16> {
self.cpus
}
pub fn memory(&self) -> std::option::Option<&crate::model::Memory> {
self.memory.as_ref()
}
pub fn load_avg(&self) -> std::option::Option<&crate::model::LoadAvg> {
self.load_avg.as_ref()
}
pub fn temperature(&self) -> std::option::Option<f32> {
self.temperature
}
}
impl std::fmt::Debug for Resources {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Resources");
formatter.field("cpus", &self.cpus);
formatter.field("memory", &self.memory);
formatter.field("load_avg", &self.load_avg);
formatter.field("temperature", &self.temperature);
formatter.finish()
}
}
pub mod resources {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) cpus: std::option::Option<i16>,
pub(crate) memory: std::option::Option<crate::model::Memory>,
pub(crate) load_avg: std::option::Option<crate::model::LoadAvg>,
pub(crate) temperature: std::option::Option<f32>,
}
impl Builder {
pub fn cpus(mut self, input: i16) -> Self {
self.cpus = Some(input);
self
}
pub fn set_cpus(mut self, input: std::option::Option<i16>) -> Self {
self.cpus = input;
self
}
pub fn memory(mut self, input: crate::model::Memory) -> Self {
self.memory = Some(input);
self
}
pub fn set_memory(mut self, input: std::option::Option<crate::model::Memory>) -> Self {
self.memory = input;
self
}
pub fn load_avg(mut self, input: crate::model::LoadAvg) -> Self {
self.load_avg = Some(input);
self
}
pub fn set_load_avg(mut self, input: std::option::Option<crate::model::LoadAvg>) -> Self {
self.load_avg = input;
self
}
pub fn temperature(mut self, input: f32) -> Self {
self.temperature = Some(input);
self
}
pub fn set_temperature(mut self, input: std::option::Option<f32>) -> Self {
self.temperature = input;
self
}
pub fn build(self) -> crate::model::Resources {
crate::model::Resources {
cpus: self.cpus,
memory: self.memory,
load_avg: self.load_avg,
temperature: self.temperature,
}
}
}
}
impl Resources {
pub fn builder() -> crate::model::resources::Builder {
crate::model::resources::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LoadAvg {
pub one: std::option::Option<f32>,
pub five: std::option::Option<f32>,
pub fifteen: std::option::Option<f32>,
}
impl LoadAvg {
pub fn one(&self) -> std::option::Option<f32> {
self.one
}
pub fn five(&self) -> std::option::Option<f32> {
self.five
}
pub fn fifteen(&self) -> std::option::Option<f32> {
self.fifteen
}
}
impl std::fmt::Debug for LoadAvg {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LoadAvg");
formatter.field("one", &self.one);
formatter.field("five", &self.five);
formatter.field("fifteen", &self.fifteen);
formatter.finish()
}
}
pub mod load_avg {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) one: std::option::Option<f32>,
pub(crate) five: std::option::Option<f32>,
pub(crate) fifteen: std::option::Option<f32>,
}
impl Builder {
pub fn one(mut self, input: f32) -> Self {
self.one = Some(input);
self
}
pub fn set_one(mut self, input: std::option::Option<f32>) -> Self {
self.one = input;
self
}
pub fn five(mut self, input: f32) -> Self {
self.five = Some(input);
self
}
pub fn set_five(mut self, input: std::option::Option<f32>) -> Self {
self.five = input;
self
}
pub fn fifteen(mut self, input: f32) -> Self {
self.fifteen = Some(input);
self
}
pub fn set_fifteen(mut self, input: std::option::Option<f32>) -> Self {
self.fifteen = input;
self
}
pub fn build(self) -> crate::model::LoadAvg {
crate::model::LoadAvg {
one: self.one,
five: self.five,
fifteen: self.fifteen,
}
}
}
}
impl LoadAvg {
pub fn builder() -> crate::model::load_avg::Builder {
crate::model::load_avg::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Memory {
pub free: std::option::Option<f32>,
pub used: std::option::Option<f32>,
pub total: std::option::Option<f32>,
}
impl Memory {
pub fn free(&self) -> std::option::Option<f32> {
self.free
}
pub fn used(&self) -> std::option::Option<f32> {
self.used
}
pub fn total(&self) -> std::option::Option<f32> {
self.total
}
}
impl std::fmt::Debug for Memory {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Memory");
formatter.field("free", &self.free);
formatter.field("used", &self.used);
formatter.field("total", &self.total);
formatter.finish()
}
}
pub mod memory {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) free: std::option::Option<f32>,
pub(crate) used: std::option::Option<f32>,
pub(crate) total: std::option::Option<f32>,
}
impl Builder {
pub fn free(mut self, input: f32) -> Self {
self.free = Some(input);
self
}
pub fn set_free(mut self, input: std::option::Option<f32>) -> Self {
self.free = input;
self
}
pub fn used(mut self, input: f32) -> Self {
self.used = Some(input);
self
}
pub fn set_used(mut self, input: std::option::Option<f32>) -> Self {
self.used = input;
self
}
pub fn total(mut self, input: f32) -> Self {
self.total = Some(input);
self
}
pub fn set_total(mut self, input: std::option::Option<f32>) -> Self {
self.total = input;
self
}
pub fn build(self) -> crate::model::Memory {
crate::model::Memory {
free: self.free,
used: self.used,
total: self.total,
}
}
}
}
impl Memory {
pub fn builder() -> crate::model::memory::Builder {
crate::model::memory::Builder::default()
}
}