docktor_api/
model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Single Prometheus target.
3#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct PrometheusTarget {
6    #[allow(missing_docs)] // documentation missing in model
7    pub targets: std::option::Option<std::vec::Vec<std::string::String>>,
8    /// Label mapping.
9    pub labels:
10        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
11}
12impl PrometheusTarget {
13    #[allow(missing_docs)] // documentation missing in model
14    pub fn targets(&self) -> std::option::Option<&[std::string::String]> {
15        self.targets.as_deref()
16    }
17    /// Label mapping.
18    pub fn labels(
19        &self,
20    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
21    {
22        self.labels.as_ref()
23    }
24}
25impl std::fmt::Debug for PrometheusTarget {
26    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27        let mut formatter = f.debug_struct("PrometheusTarget");
28        formatter.field("targets", &self.targets);
29        formatter.field("labels", &self.labels);
30        formatter.finish()
31    }
32}
33/// See [`PrometheusTarget`](crate::model::PrometheusTarget)
34pub mod prometheus_target {
35    /// A builder for [`PrometheusTarget`](crate::model::PrometheusTarget)
36    #[non_exhaustive]
37    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
38    pub struct Builder {
39        pub(crate) targets: std::option::Option<std::vec::Vec<std::string::String>>,
40        pub(crate) labels: std::option::Option<
41            std::collections::HashMap<std::string::String, std::string::String>,
42        >,
43    }
44    impl Builder {
45        /// Appends an item to `targets`.
46        ///
47        /// To override the contents of this collection use [`set_targets`](Self::set_targets).
48        ///
49        pub fn targets(mut self, input: impl Into<std::string::String>) -> Self {
50            let mut v = self.targets.unwrap_or_default();
51            v.push(input.into());
52            self.targets = Some(v);
53            self
54        }
55        #[allow(missing_docs)] // documentation missing in model
56        pub fn set_targets(
57            mut self,
58            input: std::option::Option<std::vec::Vec<std::string::String>>,
59        ) -> Self {
60            self.targets = input;
61            self
62        }
63        /// Adds a key-value pair to `labels`.
64        ///
65        /// To override the contents of this collection use [`set_labels`](Self::set_labels).
66        ///
67        /// Label mapping.
68        pub fn labels(
69            mut self,
70            k: impl Into<std::string::String>,
71            v: impl Into<std::string::String>,
72        ) -> Self {
73            let mut hash_map = self.labels.unwrap_or_default();
74            hash_map.insert(k.into(), v.into());
75            self.labels = Some(hash_map);
76            self
77        }
78        /// Label mapping.
79        pub fn set_labels(
80            mut self,
81            input: std::option::Option<
82                std::collections::HashMap<std::string::String, std::string::String>,
83            >,
84        ) -> Self {
85            self.labels = input;
86            self
87        }
88        /// Consumes the builder and constructs a [`PrometheusTarget`](crate::model::PrometheusTarget)
89        pub fn build(self) -> crate::model::PrometheusTarget {
90            crate::model::PrometheusTarget {
91                targets: self.targets,
92                labels: self.labels,
93            }
94        }
95    }
96}
97impl PrometheusTarget {
98    /// Creates a new builder-style object to manufacture [`PrometheusTarget`](crate::model::PrometheusTarget)
99    pub fn builder() -> crate::model::prometheus_target::Builder {
100        crate::model::prometheus_target::Builder::default()
101    }
102}
103
104/// Systemd output structure.
105#[non_exhaustive]
106#[derive(std::clone::Clone, std::cmp::PartialEq)]
107pub struct SystemdOutputInner {
108    /// Hostname
109    pub hostname: std::option::Option<std::string::String>,
110    /// Service name.
111    pub service: std::option::Option<std::string::String>,
112    /// Command output.
113    pub output: std::option::Option<std::string::String>,
114    /// Command error..
115    pub error: std::option::Option<std::string::String>,
116    /// Exit code.
117    pub exit_code: std::option::Option<i64>,
118}
119impl SystemdOutputInner {
120    /// Hostname
121    pub fn hostname(&self) -> std::option::Option<&str> {
122        self.hostname.as_deref()
123    }
124    /// Service name.
125    pub fn service(&self) -> std::option::Option<&str> {
126        self.service.as_deref()
127    }
128    /// Command output.
129    pub fn output(&self) -> std::option::Option<&str> {
130        self.output.as_deref()
131    }
132    /// Command error..
133    pub fn error(&self) -> std::option::Option<&str> {
134        self.error.as_deref()
135    }
136    /// Exit code.
137    pub fn exit_code(&self) -> std::option::Option<i64> {
138        self.exit_code
139    }
140}
141impl std::fmt::Debug for SystemdOutputInner {
142    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
143        let mut formatter = f.debug_struct("SystemdOutputInner");
144        formatter.field("hostname", &self.hostname);
145        formatter.field("service", &self.service);
146        formatter.field("output", &self.output);
147        formatter.field("error", &self.error);
148        formatter.field("exit_code", &self.exit_code);
149        formatter.finish()
150    }
151}
152/// See [`SystemdOutputInner`](crate::model::SystemdOutputInner)
153pub mod systemd_output_inner {
154    /// A builder for [`SystemdOutputInner`](crate::model::SystemdOutputInner)
155    #[non_exhaustive]
156    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
157    pub struct Builder {
158        pub(crate) hostname: std::option::Option<std::string::String>,
159        pub(crate) service: std::option::Option<std::string::String>,
160        pub(crate) output: std::option::Option<std::string::String>,
161        pub(crate) error: std::option::Option<std::string::String>,
162        pub(crate) exit_code: std::option::Option<i64>,
163    }
164    impl Builder {
165        /// Hostname
166        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
167            self.hostname = Some(input.into());
168            self
169        }
170        /// Hostname
171        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
172            self.hostname = input;
173            self
174        }
175        /// Service name.
176        pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
177            self.service = Some(input.into());
178            self
179        }
180        /// Service name.
181        pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
182            self.service = input;
183            self
184        }
185        /// Command output.
186        pub fn output(mut self, input: impl Into<std::string::String>) -> Self {
187            self.output = Some(input.into());
188            self
189        }
190        /// Command output.
191        pub fn set_output(mut self, input: std::option::Option<std::string::String>) -> Self {
192            self.output = input;
193            self
194        }
195        /// Command error..
196        pub fn error(mut self, input: impl Into<std::string::String>) -> Self {
197            self.error = Some(input.into());
198            self
199        }
200        /// Command error..
201        pub fn set_error(mut self, input: std::option::Option<std::string::String>) -> Self {
202            self.error = input;
203            self
204        }
205        /// Exit code.
206        pub fn exit_code(mut self, input: i64) -> Self {
207            self.exit_code = Some(input);
208            self
209        }
210        /// Exit code.
211        pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
212            self.exit_code = input;
213            self
214        }
215        /// Consumes the builder and constructs a [`SystemdOutputInner`](crate::model::SystemdOutputInner)
216        pub fn build(self) -> crate::model::SystemdOutputInner {
217            crate::model::SystemdOutputInner {
218                hostname: self.hostname,
219                service: self.service,
220                output: self.output,
221                error: self.error,
222                exit_code: self.exit_code,
223            }
224        }
225    }
226}
227impl SystemdOutputInner {
228    /// Creates a new builder-style object to manufacture [`SystemdOutputInner`](crate::model::SystemdOutputInner)
229    pub fn builder() -> crate::model::systemd_output_inner::Builder {
230        crate::model::systemd_output_inner::Builder::default()
231    }
232}
233
234/// ListOutpuut structure
235#[non_exhaustive]
236#[derive(std::clone::Clone, std::cmp::PartialEq)]
237pub struct ListOutput {
238    /// Is primary?
239    pub primary: std::option::Option<std::string::String>,
240    /// Host info.
241    pub host: std::option::Option<crate::model::Host>,
242    /// Host resources.
243    pub resources: std::option::Option<crate::model::Resources>,
244    /// List of available services.
245    pub services: std::option::Option<std::vec::Vec<crate::model::Service>>,
246    /// Service checksum.
247    pub checksum: std::option::Option<std::string::String>,
248    /// List of services runnable by this host
249    pub available_services: std::option::Option<std::vec::Vec<std::string::String>>,
250    /// Map of peers configurations
251    pub peers: std::option::Option<
252        std::collections::HashMap<std::string::String, crate::model::ListOutput>,
253    >,
254}
255impl ListOutput {
256    /// Is primary?
257    pub fn primary(&self) -> std::option::Option<&str> {
258        self.primary.as_deref()
259    }
260    /// Host info.
261    pub fn host(&self) -> std::option::Option<&crate::model::Host> {
262        self.host.as_ref()
263    }
264    /// Host resources.
265    pub fn resources(&self) -> std::option::Option<&crate::model::Resources> {
266        self.resources.as_ref()
267    }
268    /// List of available services.
269    pub fn services(&self) -> std::option::Option<&[crate::model::Service]> {
270        self.services.as_deref()
271    }
272    /// Service checksum.
273    pub fn checksum(&self) -> std::option::Option<&str> {
274        self.checksum.as_deref()
275    }
276    /// List of services runnable by this host
277    pub fn available_services(&self) -> std::option::Option<&[std::string::String]> {
278        self.available_services.as_deref()
279    }
280    /// Map of peers configurations
281    pub fn peers(
282        &self,
283    ) -> std::option::Option<
284        &std::collections::HashMap<std::string::String, crate::model::ListOutput>,
285    > {
286        self.peers.as_ref()
287    }
288}
289impl std::fmt::Debug for ListOutput {
290    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
291        let mut formatter = f.debug_struct("ListOutput");
292        formatter.field("primary", &self.primary);
293        formatter.field("host", &self.host);
294        formatter.field("resources", &self.resources);
295        formatter.field("services", &self.services);
296        formatter.field("checksum", &self.checksum);
297        formatter.field("available_services", &self.available_services);
298        formatter.field("peers", &self.peers);
299        formatter.finish()
300    }
301}
302/// See [`ListOutput`](crate::model::ListOutput)
303pub mod list_output {
304    /// A builder for [`ListOutput`](crate::model::ListOutput)
305    #[non_exhaustive]
306    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
307    pub struct Builder {
308        pub(crate) primary: std::option::Option<std::string::String>,
309        pub(crate) host: std::option::Option<crate::model::Host>,
310        pub(crate) resources: std::option::Option<crate::model::Resources>,
311        pub(crate) services: std::option::Option<std::vec::Vec<crate::model::Service>>,
312        pub(crate) checksum: std::option::Option<std::string::String>,
313        pub(crate) available_services: std::option::Option<std::vec::Vec<std::string::String>>,
314        pub(crate) peers: std::option::Option<
315            std::collections::HashMap<std::string::String, crate::model::ListOutput>,
316        >,
317    }
318    impl Builder {
319        /// Is primary?
320        pub fn primary(mut self, input: impl Into<std::string::String>) -> Self {
321            self.primary = Some(input.into());
322            self
323        }
324        /// Is primary?
325        pub fn set_primary(mut self, input: std::option::Option<std::string::String>) -> Self {
326            self.primary = input;
327            self
328        }
329        /// Host info.
330        pub fn host(mut self, input: crate::model::Host) -> Self {
331            self.host = Some(input);
332            self
333        }
334        /// Host info.
335        pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
336            self.host = input;
337            self
338        }
339        /// Host resources.
340        pub fn resources(mut self, input: crate::model::Resources) -> Self {
341            self.resources = Some(input);
342            self
343        }
344        /// Host resources.
345        pub fn set_resources(
346            mut self,
347            input: std::option::Option<crate::model::Resources>,
348        ) -> Self {
349            self.resources = input;
350            self
351        }
352        /// Appends an item to `services`.
353        ///
354        /// To override the contents of this collection use [`set_services`](Self::set_services).
355        ///
356        /// List of available services.
357        pub fn services(mut self, input: crate::model::Service) -> Self {
358            let mut v = self.services.unwrap_or_default();
359            v.push(input);
360            self.services = Some(v);
361            self
362        }
363        /// List of available services.
364        pub fn set_services(
365            mut self,
366            input: std::option::Option<std::vec::Vec<crate::model::Service>>,
367        ) -> Self {
368            self.services = input;
369            self
370        }
371        /// Service checksum.
372        pub fn checksum(mut self, input: impl Into<std::string::String>) -> Self {
373            self.checksum = Some(input.into());
374            self
375        }
376        /// Service checksum.
377        pub fn set_checksum(mut self, input: std::option::Option<std::string::String>) -> Self {
378            self.checksum = input;
379            self
380        }
381        /// Appends an item to `available_services`.
382        ///
383        /// To override the contents of this collection use [`set_available_services`](Self::set_available_services).
384        ///
385        /// List of services runnable by this host
386        pub fn available_services(mut self, input: impl Into<std::string::String>) -> Self {
387            let mut v = self.available_services.unwrap_or_default();
388            v.push(input.into());
389            self.available_services = Some(v);
390            self
391        }
392        /// List of services runnable by this host
393        pub fn set_available_services(
394            mut self,
395            input: std::option::Option<std::vec::Vec<std::string::String>>,
396        ) -> Self {
397            self.available_services = input;
398            self
399        }
400        /// Adds a key-value pair to `peers`.
401        ///
402        /// To override the contents of this collection use [`set_peers`](Self::set_peers).
403        ///
404        /// Map of peers configurations
405        pub fn peers(
406            mut self,
407            k: impl Into<std::string::String>,
408            v: crate::model::ListOutput,
409        ) -> Self {
410            let mut hash_map = self.peers.unwrap_or_default();
411            hash_map.insert(k.into(), v);
412            self.peers = Some(hash_map);
413            self
414        }
415        /// Map of peers configurations
416        pub fn set_peers(
417            mut self,
418            input: std::option::Option<
419                std::collections::HashMap<std::string::String, crate::model::ListOutput>,
420            >,
421        ) -> Self {
422            self.peers = input;
423            self
424        }
425        /// Consumes the builder and constructs a [`ListOutput`](crate::model::ListOutput)
426        pub fn build(self) -> crate::model::ListOutput {
427            crate::model::ListOutput {
428                primary: self.primary,
429                host: self.host,
430                resources: self.resources,
431                services: self.services,
432                checksum: self.checksum,
433                available_services: self.available_services,
434                peers: self.peers,
435            }
436        }
437    }
438}
439impl ListOutput {
440    /// Creates a new builder-style object to manufacture [`ListOutput`](crate::model::ListOutput)
441    pub fn builder() -> crate::model::list_output::Builder {
442        crate::model::list_output::Builder::default()
443    }
444}
445
446/// Service view
447#[non_exhaustive]
448#[derive(std::clone::Clone, std::cmp::PartialEq)]
449pub struct Service {
450    /// Service unique ID.
451    pub id: std::option::Option<std::string::String>,
452    /// Container / process name.
453    pub name: std::option::Option<std::string::String>,
454    /// Service name.
455    pub service: std::option::Option<std::string::String>,
456    /// Pod for this service.
457    pub pod: std::option::Option<std::string::String>,
458    /// Host info.
459    pub host: std::option::Option<crate::model::Host>,
460    /// Weave info.
461    pub weave: std::option::Option<crate::model::WeaveInfo>,
462    /// HTTP port exposed.
463    pub https: std::option::Option<std::vec::Vec<crate::model::Http>>,
464    /// TCP port to expose on load balancer.
465    pub tcps: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
466    /// TCP internal ports
467    pub monitorings: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
468    /// Status info
469    pub healthcheck: std::option::Option<crate::model::Healthcheck>,
470}
471impl Service {
472    /// Service unique ID.
473    pub fn id(&self) -> std::option::Option<&str> {
474        self.id.as_deref()
475    }
476    /// Container / process name.
477    pub fn name(&self) -> std::option::Option<&str> {
478        self.name.as_deref()
479    }
480    /// Service name.
481    pub fn service(&self) -> std::option::Option<&str> {
482        self.service.as_deref()
483    }
484    /// Pod for this service.
485    pub fn pod(&self) -> std::option::Option<&str> {
486        self.pod.as_deref()
487    }
488    /// Host info.
489    pub fn host(&self) -> std::option::Option<&crate::model::Host> {
490        self.host.as_ref()
491    }
492    /// Weave info.
493    pub fn weave(&self) -> std::option::Option<&crate::model::WeaveInfo> {
494        self.weave.as_ref()
495    }
496    /// HTTP port exposed.
497    pub fn https(&self) -> std::option::Option<&[crate::model::Http]> {
498        self.https.as_deref()
499    }
500    /// TCP port to expose on load balancer.
501    pub fn tcps(&self) -> std::option::Option<&[crate::model::Tcp]> {
502        self.tcps.as_deref()
503    }
504    /// TCP internal ports
505    pub fn monitorings(&self) -> std::option::Option<&[crate::model::Monitoring]> {
506        self.monitorings.as_deref()
507    }
508    /// Status info
509    pub fn healthcheck(&self) -> std::option::Option<&crate::model::Healthcheck> {
510        self.healthcheck.as_ref()
511    }
512}
513impl std::fmt::Debug for Service {
514    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
515        let mut formatter = f.debug_struct("Service");
516        formatter.field("id", &self.id);
517        formatter.field("name", &self.name);
518        formatter.field("service", &self.service);
519        formatter.field("pod", &self.pod);
520        formatter.field("host", &self.host);
521        formatter.field("weave", &self.weave);
522        formatter.field("https", &self.https);
523        formatter.field("tcps", &self.tcps);
524        formatter.field("monitorings", &self.monitorings);
525        formatter.field("healthcheck", &self.healthcheck);
526        formatter.finish()
527    }
528}
529/// See [`Service`](crate::model::Service)
530pub mod service {
531    /// A builder for [`Service`](crate::model::Service)
532    #[non_exhaustive]
533    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
534    pub struct Builder {
535        pub(crate) id: std::option::Option<std::string::String>,
536        pub(crate) name: std::option::Option<std::string::String>,
537        pub(crate) service: std::option::Option<std::string::String>,
538        pub(crate) pod: std::option::Option<std::string::String>,
539        pub(crate) host: std::option::Option<crate::model::Host>,
540        pub(crate) weave: std::option::Option<crate::model::WeaveInfo>,
541        pub(crate) https: std::option::Option<std::vec::Vec<crate::model::Http>>,
542        pub(crate) tcps: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
543        pub(crate) monitorings: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
544        pub(crate) healthcheck: std::option::Option<crate::model::Healthcheck>,
545    }
546    impl Builder {
547        /// Service unique ID.
548        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
549            self.id = Some(input.into());
550            self
551        }
552        /// Service unique ID.
553        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
554            self.id = input;
555            self
556        }
557        /// Container / process name.
558        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
559            self.name = Some(input.into());
560            self
561        }
562        /// Container / process name.
563        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
564            self.name = input;
565            self
566        }
567        /// Service name.
568        pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
569            self.service = Some(input.into());
570            self
571        }
572        /// Service name.
573        pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
574            self.service = input;
575            self
576        }
577        /// Pod for this service.
578        pub fn pod(mut self, input: impl Into<std::string::String>) -> Self {
579            self.pod = Some(input.into());
580            self
581        }
582        /// Pod for this service.
583        pub fn set_pod(mut self, input: std::option::Option<std::string::String>) -> Self {
584            self.pod = input;
585            self
586        }
587        /// Host info.
588        pub fn host(mut self, input: crate::model::Host) -> Self {
589            self.host = Some(input);
590            self
591        }
592        /// Host info.
593        pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
594            self.host = input;
595            self
596        }
597        /// Weave info.
598        pub fn weave(mut self, input: crate::model::WeaveInfo) -> Self {
599            self.weave = Some(input);
600            self
601        }
602        /// Weave info.
603        pub fn set_weave(mut self, input: std::option::Option<crate::model::WeaveInfo>) -> Self {
604            self.weave = input;
605            self
606        }
607        /// Appends an item to `https`.
608        ///
609        /// To override the contents of this collection use [`set_https`](Self::set_https).
610        ///
611        /// HTTP port exposed.
612        pub fn https(mut self, input: crate::model::Http) -> Self {
613            let mut v = self.https.unwrap_or_default();
614            v.push(input);
615            self.https = Some(v);
616            self
617        }
618        /// HTTP port exposed.
619        pub fn set_https(
620            mut self,
621            input: std::option::Option<std::vec::Vec<crate::model::Http>>,
622        ) -> Self {
623            self.https = input;
624            self
625        }
626        /// Appends an item to `tcps`.
627        ///
628        /// To override the contents of this collection use [`set_tcps`](Self::set_tcps).
629        ///
630        /// TCP port to expose on load balancer.
631        pub fn tcps(mut self, input: crate::model::Tcp) -> Self {
632            let mut v = self.tcps.unwrap_or_default();
633            v.push(input);
634            self.tcps = Some(v);
635            self
636        }
637        /// TCP port to expose on load balancer.
638        pub fn set_tcps(
639            mut self,
640            input: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
641        ) -> Self {
642            self.tcps = input;
643            self
644        }
645        /// Appends an item to `monitorings`.
646        ///
647        /// To override the contents of this collection use [`set_monitorings`](Self::set_monitorings).
648        ///
649        /// TCP internal ports
650        pub fn monitorings(mut self, input: crate::model::Monitoring) -> Self {
651            let mut v = self.monitorings.unwrap_or_default();
652            v.push(input);
653            self.monitorings = Some(v);
654            self
655        }
656        /// TCP internal ports
657        pub fn set_monitorings(
658            mut self,
659            input: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
660        ) -> Self {
661            self.monitorings = input;
662            self
663        }
664        /// Status info
665        pub fn healthcheck(mut self, input: crate::model::Healthcheck) -> Self {
666            self.healthcheck = Some(input);
667            self
668        }
669        /// Status info
670        pub fn set_healthcheck(
671            mut self,
672            input: std::option::Option<crate::model::Healthcheck>,
673        ) -> Self {
674            self.healthcheck = input;
675            self
676        }
677        /// Consumes the builder and constructs a [`Service`](crate::model::Service)
678        pub fn build(self) -> crate::model::Service {
679            crate::model::Service {
680                id: self.id,
681                name: self.name,
682                service: self.service,
683                pod: self.pod,
684                host: self.host,
685                weave: self.weave,
686                https: self.https,
687                tcps: self.tcps,
688                monitorings: self.monitorings,
689                healthcheck: self.healthcheck,
690            }
691        }
692    }
693}
694impl Service {
695    /// Creates a new builder-style object to manufacture [`Service`](crate::model::Service)
696    pub fn builder() -> crate::model::service::Builder {
697        crate::model::service::Builder::default()
698    }
699}
700
701/// Docker / system healthcheck result.
702#[non_exhaustive]
703#[derive(std::clone::Clone, std::cmp::PartialEq)]
704pub struct Healthcheck {
705    /// Status message.
706    pub message: std::option::Option<std::string::String>,
707    /// Short status identifier.
708    pub status: std::option::Option<std::string::String>,
709    /// Exit code.
710    pub exit_code: std::option::Option<i64>,
711    /// How many failing tests so far.
712    pub failing_streak: std::option::Option<i64>,
713}
714impl Healthcheck {
715    /// Status message.
716    pub fn message(&self) -> std::option::Option<&str> {
717        self.message.as_deref()
718    }
719    /// Short status identifier.
720    pub fn status(&self) -> std::option::Option<&str> {
721        self.status.as_deref()
722    }
723    /// Exit code.
724    pub fn exit_code(&self) -> std::option::Option<i64> {
725        self.exit_code
726    }
727    /// How many failing tests so far.
728    pub fn failing_streak(&self) -> std::option::Option<i64> {
729        self.failing_streak
730    }
731}
732impl std::fmt::Debug for Healthcheck {
733    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
734        let mut formatter = f.debug_struct("Healthcheck");
735        formatter.field("message", &self.message);
736        formatter.field("status", &self.status);
737        formatter.field("exit_code", &self.exit_code);
738        formatter.field("failing_streak", &self.failing_streak);
739        formatter.finish()
740    }
741}
742/// See [`Healthcheck`](crate::model::Healthcheck)
743pub mod healthcheck {
744    /// A builder for [`Healthcheck`](crate::model::Healthcheck)
745    #[non_exhaustive]
746    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
747    pub struct Builder {
748        pub(crate) message: std::option::Option<std::string::String>,
749        pub(crate) status: std::option::Option<std::string::String>,
750        pub(crate) exit_code: std::option::Option<i64>,
751        pub(crate) failing_streak: std::option::Option<i64>,
752    }
753    impl Builder {
754        /// Status message.
755        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
756            self.message = Some(input.into());
757            self
758        }
759        /// Status message.
760        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
761            self.message = input;
762            self
763        }
764        /// Short status identifier.
765        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
766            self.status = Some(input.into());
767            self
768        }
769        /// Short status identifier.
770        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
771            self.status = input;
772            self
773        }
774        /// Exit code.
775        pub fn exit_code(mut self, input: i64) -> Self {
776            self.exit_code = Some(input);
777            self
778        }
779        /// Exit code.
780        pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
781            self.exit_code = input;
782            self
783        }
784        /// How many failing tests so far.
785        pub fn failing_streak(mut self, input: i64) -> Self {
786            self.failing_streak = Some(input);
787            self
788        }
789        /// How many failing tests so far.
790        pub fn set_failing_streak(mut self, input: std::option::Option<i64>) -> Self {
791            self.failing_streak = input;
792            self
793        }
794        /// Consumes the builder and constructs a [`Healthcheck`](crate::model::Healthcheck)
795        pub fn build(self) -> crate::model::Healthcheck {
796            crate::model::Healthcheck {
797                message: self.message,
798                status: self.status,
799                exit_code: self.exit_code,
800                failing_streak: self.failing_streak,
801            }
802        }
803    }
804}
805impl Healthcheck {
806    /// Creates a new builder-style object to manufacture [`Healthcheck`](crate::model::Healthcheck)
807    pub fn builder() -> crate::model::healthcheck::Builder {
808        crate::model::healthcheck::Builder::default()
809    }
810}
811
812/// Monitoring directives.
813#[non_exhaustive]
814#[derive(std::clone::Clone, std::cmp::PartialEq)]
815pub struct Monitoring {
816    /// Prometheus host name.
817    pub hostname: std::option::Option<std::string::String>,
818    /// Prometheus monitoring URL.
819    pub url: std::option::Option<std::string::String>,
820    /// Prometheus monitoring port.
821    pub port: std::option::Option<i16>,
822}
823impl Monitoring {
824    /// Prometheus host name.
825    pub fn hostname(&self) -> std::option::Option<&str> {
826        self.hostname.as_deref()
827    }
828    /// Prometheus monitoring URL.
829    pub fn url(&self) -> std::option::Option<&str> {
830        self.url.as_deref()
831    }
832    /// Prometheus monitoring port.
833    pub fn port(&self) -> std::option::Option<i16> {
834        self.port
835    }
836}
837impl std::fmt::Debug for Monitoring {
838    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
839        let mut formatter = f.debug_struct("Monitoring");
840        formatter.field("hostname", &self.hostname);
841        formatter.field("url", &self.url);
842        formatter.field("port", &self.port);
843        formatter.finish()
844    }
845}
846/// See [`Monitoring`](crate::model::Monitoring)
847pub mod monitoring {
848    /// A builder for [`Monitoring`](crate::model::Monitoring)
849    #[non_exhaustive]
850    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
851    pub struct Builder {
852        pub(crate) hostname: std::option::Option<std::string::String>,
853        pub(crate) url: std::option::Option<std::string::String>,
854        pub(crate) port: std::option::Option<i16>,
855    }
856    impl Builder {
857        /// Prometheus host name.
858        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
859            self.hostname = Some(input.into());
860            self
861        }
862        /// Prometheus host name.
863        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
864            self.hostname = input;
865            self
866        }
867        /// Prometheus monitoring URL.
868        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
869            self.url = Some(input.into());
870            self
871        }
872        /// Prometheus monitoring URL.
873        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
874            self.url = input;
875            self
876        }
877        /// Prometheus monitoring port.
878        pub fn port(mut self, input: i16) -> Self {
879            self.port = Some(input);
880            self
881        }
882        /// Prometheus monitoring port.
883        pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
884            self.port = input;
885            self
886        }
887        /// Consumes the builder and constructs a [`Monitoring`](crate::model::Monitoring)
888        pub fn build(self) -> crate::model::Monitoring {
889            crate::model::Monitoring {
890                hostname: self.hostname,
891                url: self.url,
892                port: self.port,
893            }
894        }
895    }
896}
897impl Monitoring {
898    /// Creates a new builder-style object to manufacture [`Monitoring`](crate::model::Monitoring)
899    pub fn builder() -> crate::model::monitoring::Builder {
900        crate::model::monitoring::Builder::default()
901    }
902}
903
904/// TCP directives.
905#[non_exhaustive]
906#[derive(std::clone::Clone, std::cmp::PartialEq)]
907pub struct Tcp {
908    /// External TCP port to bind.
909    pub external: std::option::Option<i16>,
910    /// Internal TCP port to forward.
911    pub internal: std::option::Option<i16>,
912}
913impl Tcp {
914    /// External TCP port to bind.
915    pub fn external(&self) -> std::option::Option<i16> {
916        self.external
917    }
918    /// Internal TCP port to forward.
919    pub fn internal(&self) -> std::option::Option<i16> {
920        self.internal
921    }
922}
923impl std::fmt::Debug for Tcp {
924    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
925        let mut formatter = f.debug_struct("Tcp");
926        formatter.field("external", &self.external);
927        formatter.field("internal", &self.internal);
928        formatter.finish()
929    }
930}
931/// See [`Tcp`](crate::model::Tcp)
932pub mod tcp {
933    /// A builder for [`Tcp`](crate::model::Tcp)
934    #[non_exhaustive]
935    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
936    pub struct Builder {
937        pub(crate) external: std::option::Option<i16>,
938        pub(crate) internal: std::option::Option<i16>,
939    }
940    impl Builder {
941        /// External TCP port to bind.
942        pub fn external(mut self, input: i16) -> Self {
943            self.external = Some(input);
944            self
945        }
946        /// External TCP port to bind.
947        pub fn set_external(mut self, input: std::option::Option<i16>) -> Self {
948            self.external = input;
949            self
950        }
951        /// Internal TCP port to forward.
952        pub fn internal(mut self, input: i16) -> Self {
953            self.internal = Some(input);
954            self
955        }
956        /// Internal TCP port to forward.
957        pub fn set_internal(mut self, input: std::option::Option<i16>) -> Self {
958            self.internal = input;
959            self
960        }
961        /// Consumes the builder and constructs a [`Tcp`](crate::model::Tcp)
962        pub fn build(self) -> crate::model::Tcp {
963            crate::model::Tcp {
964                external: self.external,
965                internal: self.internal,
966            }
967        }
968    }
969}
970impl Tcp {
971    /// Creates a new builder-style object to manufacture [`Tcp`](crate::model::Tcp)
972    pub fn builder() -> crate::model::tcp::Builder {
973        crate::model::tcp::Builder::default()
974    }
975}
976
977/// HTTP directives.
978#[non_exhaustive]
979#[derive(std::clone::Clone, std::cmp::PartialEq)]
980pub struct Http {
981    /// HTTP port.
982    pub port: std::option::Option<i16>,
983    /// HTTP or HTTPS.
984    pub verb: std::option::Option<std::string::String>,
985    /// Use authorization.
986    pub auth: std::option::Option<bool>,
987}
988impl Http {
989    /// HTTP port.
990    pub fn port(&self) -> std::option::Option<i16> {
991        self.port
992    }
993    /// HTTP or HTTPS.
994    pub fn verb(&self) -> std::option::Option<&str> {
995        self.verb.as_deref()
996    }
997    /// Use authorization.
998    pub fn auth(&self) -> std::option::Option<bool> {
999        self.auth
1000    }
1001}
1002impl std::fmt::Debug for Http {
1003    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1004        let mut formatter = f.debug_struct("Http");
1005        formatter.field("port", &self.port);
1006        formatter.field("verb", &self.verb);
1007        formatter.field("auth", &self.auth);
1008        formatter.finish()
1009    }
1010}
1011/// See [`Http`](crate::model::Http)
1012pub mod http {
1013    /// A builder for [`Http`](crate::model::Http)
1014    #[non_exhaustive]
1015    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1016    pub struct Builder {
1017        pub(crate) port: std::option::Option<i16>,
1018        pub(crate) verb: std::option::Option<std::string::String>,
1019        pub(crate) auth: std::option::Option<bool>,
1020    }
1021    impl Builder {
1022        /// HTTP port.
1023        pub fn port(mut self, input: i16) -> Self {
1024            self.port = Some(input);
1025            self
1026        }
1027        /// HTTP port.
1028        pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
1029            self.port = input;
1030            self
1031        }
1032        /// HTTP or HTTPS.
1033        pub fn verb(mut self, input: impl Into<std::string::String>) -> Self {
1034            self.verb = Some(input.into());
1035            self
1036        }
1037        /// HTTP or HTTPS.
1038        pub fn set_verb(mut self, input: std::option::Option<std::string::String>) -> Self {
1039            self.verb = input;
1040            self
1041        }
1042        /// Use authorization.
1043        pub fn auth(mut self, input: bool) -> Self {
1044            self.auth = Some(input);
1045            self
1046        }
1047        /// Use authorization.
1048        pub fn set_auth(mut self, input: std::option::Option<bool>) -> Self {
1049            self.auth = input;
1050            self
1051        }
1052        /// Consumes the builder and constructs a [`Http`](crate::model::Http)
1053        pub fn build(self) -> crate::model::Http {
1054            crate::model::Http {
1055                port: self.port,
1056                verb: self.verb,
1057                auth: self.auth,
1058            }
1059        }
1060    }
1061}
1062impl Http {
1063    /// Creates a new builder-style object to manufacture [`Http`](crate::model::Http)
1064    pub fn builder() -> crate::model::http::Builder {
1065        crate::model::http::Builder::default()
1066    }
1067}
1068
1069/// Weave domain and IP.
1070#[non_exhaustive]
1071#[derive(std::clone::Clone, std::cmp::PartialEq)]
1072pub struct WeaveInfo {
1073    /// Domain.
1074    pub domain: std::option::Option<std::string::String>,
1075    /// IP address.
1076    pub ip: std::option::Option<std::string::String>,
1077}
1078impl WeaveInfo {
1079    /// Domain.
1080    pub fn domain(&self) -> std::option::Option<&str> {
1081        self.domain.as_deref()
1082    }
1083    /// IP address.
1084    pub fn ip(&self) -> std::option::Option<&str> {
1085        self.ip.as_deref()
1086    }
1087}
1088impl std::fmt::Debug for WeaveInfo {
1089    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1090        let mut formatter = f.debug_struct("WeaveInfo");
1091        formatter.field("domain", &self.domain);
1092        formatter.field("ip", &self.ip);
1093        formatter.finish()
1094    }
1095}
1096/// See [`WeaveInfo`](crate::model::WeaveInfo)
1097pub mod weave_info {
1098    /// A builder for [`WeaveInfo`](crate::model::WeaveInfo)
1099    #[non_exhaustive]
1100    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1101    pub struct Builder {
1102        pub(crate) domain: std::option::Option<std::string::String>,
1103        pub(crate) ip: std::option::Option<std::string::String>,
1104    }
1105    impl Builder {
1106        /// Domain.
1107        pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
1108            self.domain = Some(input.into());
1109            self
1110        }
1111        /// Domain.
1112        pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
1113            self.domain = input;
1114            self
1115        }
1116        /// IP address.
1117        pub fn ip(mut self, input: impl Into<std::string::String>) -> Self {
1118            self.ip = Some(input.into());
1119            self
1120        }
1121        /// IP address.
1122        pub fn set_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
1123            self.ip = input;
1124            self
1125        }
1126        /// Consumes the builder and constructs a [`WeaveInfo`](crate::model::WeaveInfo)
1127        pub fn build(self) -> crate::model::WeaveInfo {
1128            crate::model::WeaveInfo {
1129                domain: self.domain,
1130                ip: self.ip,
1131            }
1132        }
1133    }
1134}
1135impl WeaveInfo {
1136    /// Creates a new builder-style object to manufacture [`WeaveInfo`](crate::model::WeaveInfo)
1137    pub fn builder() -> crate::model::weave_info::Builder {
1138        crate::model::weave_info::Builder::default()
1139    }
1140}
1141
1142/// Host information
1143#[non_exhaustive]
1144#[derive(std::clone::Clone, std::cmp::PartialEq)]
1145pub struct Host {
1146    /// Hostname running the service.
1147    pub hostname: std::option::Option<std::string::String>,
1148    /// Cluster domain
1149    pub domain: std::option::Option<std::string::String>,
1150}
1151impl Host {
1152    /// Hostname running the service.
1153    pub fn hostname(&self) -> std::option::Option<&str> {
1154        self.hostname.as_deref()
1155    }
1156    /// Cluster domain
1157    pub fn domain(&self) -> std::option::Option<&str> {
1158        self.domain.as_deref()
1159    }
1160}
1161impl std::fmt::Debug for Host {
1162    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1163        let mut formatter = f.debug_struct("Host");
1164        formatter.field("hostname", &self.hostname);
1165        formatter.field("domain", &self.domain);
1166        formatter.finish()
1167    }
1168}
1169/// See [`Host`](crate::model::Host)
1170pub mod host {
1171    /// A builder for [`Host`](crate::model::Host)
1172    #[non_exhaustive]
1173    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1174    pub struct Builder {
1175        pub(crate) hostname: std::option::Option<std::string::String>,
1176        pub(crate) domain: std::option::Option<std::string::String>,
1177    }
1178    impl Builder {
1179        /// Hostname running the service.
1180        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
1181            self.hostname = Some(input.into());
1182            self
1183        }
1184        /// Hostname running the service.
1185        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
1186            self.hostname = input;
1187            self
1188        }
1189        /// Cluster domain
1190        pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
1191            self.domain = Some(input.into());
1192            self
1193        }
1194        /// Cluster domain
1195        pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
1196            self.domain = input;
1197            self
1198        }
1199        /// Consumes the builder and constructs a [`Host`](crate::model::Host)
1200        pub fn build(self) -> crate::model::Host {
1201            crate::model::Host {
1202                hostname: self.hostname,
1203                domain: self.domain,
1204            }
1205        }
1206    }
1207}
1208impl Host {
1209    /// Creates a new builder-style object to manufacture [`Host`](crate::model::Host)
1210    pub fn builder() -> crate::model::host::Builder {
1211        crate::model::host::Builder::default()
1212    }
1213}
1214
1215/// Host resources
1216#[non_exhaustive]
1217#[derive(std::clone::Clone, std::cmp::PartialEq)]
1218pub struct Resources {
1219    /// Number of CPUs.
1220    pub cpus: std::option::Option<i16>,
1221    /// Memory information,
1222    pub memory: std::option::Option<crate::model::Memory>,
1223    /// Load average.
1224    pub load_avg: std::option::Option<crate::model::LoadAvg>,
1225    /// Temoerature.
1226    pub temperature: std::option::Option<f32>,
1227}
1228impl Resources {
1229    /// Number of CPUs.
1230    pub fn cpus(&self) -> std::option::Option<i16> {
1231        self.cpus
1232    }
1233    /// Memory information,
1234    pub fn memory(&self) -> std::option::Option<&crate::model::Memory> {
1235        self.memory.as_ref()
1236    }
1237    /// Load average.
1238    pub fn load_avg(&self) -> std::option::Option<&crate::model::LoadAvg> {
1239        self.load_avg.as_ref()
1240    }
1241    /// Temoerature.
1242    pub fn temperature(&self) -> std::option::Option<f32> {
1243        self.temperature
1244    }
1245}
1246impl std::fmt::Debug for Resources {
1247    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1248        let mut formatter = f.debug_struct("Resources");
1249        formatter.field("cpus", &self.cpus);
1250        formatter.field("memory", &self.memory);
1251        formatter.field("load_avg", &self.load_avg);
1252        formatter.field("temperature", &self.temperature);
1253        formatter.finish()
1254    }
1255}
1256/// See [`Resources`](crate::model::Resources)
1257pub mod resources {
1258    /// A builder for [`Resources`](crate::model::Resources)
1259    #[non_exhaustive]
1260    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1261    pub struct Builder {
1262        pub(crate) cpus: std::option::Option<i16>,
1263        pub(crate) memory: std::option::Option<crate::model::Memory>,
1264        pub(crate) load_avg: std::option::Option<crate::model::LoadAvg>,
1265        pub(crate) temperature: std::option::Option<f32>,
1266    }
1267    impl Builder {
1268        /// Number of CPUs.
1269        pub fn cpus(mut self, input: i16) -> Self {
1270            self.cpus = Some(input);
1271            self
1272        }
1273        /// Number of CPUs.
1274        pub fn set_cpus(mut self, input: std::option::Option<i16>) -> Self {
1275            self.cpus = input;
1276            self
1277        }
1278        /// Memory information,
1279        pub fn memory(mut self, input: crate::model::Memory) -> Self {
1280            self.memory = Some(input);
1281            self
1282        }
1283        /// Memory information,
1284        pub fn set_memory(mut self, input: std::option::Option<crate::model::Memory>) -> Self {
1285            self.memory = input;
1286            self
1287        }
1288        /// Load average.
1289        pub fn load_avg(mut self, input: crate::model::LoadAvg) -> Self {
1290            self.load_avg = Some(input);
1291            self
1292        }
1293        /// Load average.
1294        pub fn set_load_avg(mut self, input: std::option::Option<crate::model::LoadAvg>) -> Self {
1295            self.load_avg = input;
1296            self
1297        }
1298        /// Temoerature.
1299        pub fn temperature(mut self, input: f32) -> Self {
1300            self.temperature = Some(input);
1301            self
1302        }
1303        /// Temoerature.
1304        pub fn set_temperature(mut self, input: std::option::Option<f32>) -> Self {
1305            self.temperature = input;
1306            self
1307        }
1308        /// Consumes the builder and constructs a [`Resources`](crate::model::Resources)
1309        pub fn build(self) -> crate::model::Resources {
1310            crate::model::Resources {
1311                cpus: self.cpus,
1312                memory: self.memory,
1313                load_avg: self.load_avg,
1314                temperature: self.temperature,
1315            }
1316        }
1317    }
1318}
1319impl Resources {
1320    /// Creates a new builder-style object to manufacture [`Resources`](crate::model::Resources)
1321    pub fn builder() -> crate::model::resources::Builder {
1322        crate::model::resources::Builder::default()
1323    }
1324}
1325
1326/// Load average representation.
1327#[non_exhaustive]
1328#[derive(std::clone::Clone, std::cmp::PartialEq)]
1329pub struct LoadAvg {
1330    /// One minute.
1331    pub one: std::option::Option<f32>,
1332    /// Five minutes.
1333    pub five: std::option::Option<f32>,
1334    /// Fifteen minutes.
1335    pub fifteen: std::option::Option<f32>,
1336}
1337impl LoadAvg {
1338    /// One minute.
1339    pub fn one(&self) -> std::option::Option<f32> {
1340        self.one
1341    }
1342    /// Five minutes.
1343    pub fn five(&self) -> std::option::Option<f32> {
1344        self.five
1345    }
1346    /// Fifteen minutes.
1347    pub fn fifteen(&self) -> std::option::Option<f32> {
1348        self.fifteen
1349    }
1350}
1351impl std::fmt::Debug for LoadAvg {
1352    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1353        let mut formatter = f.debug_struct("LoadAvg");
1354        formatter.field("one", &self.one);
1355        formatter.field("five", &self.five);
1356        formatter.field("fifteen", &self.fifteen);
1357        formatter.finish()
1358    }
1359}
1360/// See [`LoadAvg`](crate::model::LoadAvg)
1361pub mod load_avg {
1362    /// A builder for [`LoadAvg`](crate::model::LoadAvg)
1363    #[non_exhaustive]
1364    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1365    pub struct Builder {
1366        pub(crate) one: std::option::Option<f32>,
1367        pub(crate) five: std::option::Option<f32>,
1368        pub(crate) fifteen: std::option::Option<f32>,
1369    }
1370    impl Builder {
1371        /// One minute.
1372        pub fn one(mut self, input: f32) -> Self {
1373            self.one = Some(input);
1374            self
1375        }
1376        /// One minute.
1377        pub fn set_one(mut self, input: std::option::Option<f32>) -> Self {
1378            self.one = input;
1379            self
1380        }
1381        /// Five minutes.
1382        pub fn five(mut self, input: f32) -> Self {
1383            self.five = Some(input);
1384            self
1385        }
1386        /// Five minutes.
1387        pub fn set_five(mut self, input: std::option::Option<f32>) -> Self {
1388            self.five = input;
1389            self
1390        }
1391        /// Fifteen minutes.
1392        pub fn fifteen(mut self, input: f32) -> Self {
1393            self.fifteen = Some(input);
1394            self
1395        }
1396        /// Fifteen minutes.
1397        pub fn set_fifteen(mut self, input: std::option::Option<f32>) -> Self {
1398            self.fifteen = input;
1399            self
1400        }
1401        /// Consumes the builder and constructs a [`LoadAvg`](crate::model::LoadAvg)
1402        pub fn build(self) -> crate::model::LoadAvg {
1403            crate::model::LoadAvg {
1404                one: self.one,
1405                five: self.five,
1406                fifteen: self.fifteen,
1407            }
1408        }
1409    }
1410}
1411impl LoadAvg {
1412    /// Creates a new builder-style object to manufacture [`LoadAvg`](crate::model::LoadAvg)
1413    pub fn builder() -> crate::model::load_avg::Builder {
1414        crate::model::load_avg::Builder::default()
1415    }
1416}
1417
1418/// Memory information.
1419#[non_exhaustive]
1420#[derive(std::clone::Clone, std::cmp::PartialEq)]
1421pub struct Memory {
1422    /// Free memory.
1423    pub free: std::option::Option<f32>,
1424    /// Used memory.
1425    pub used: std::option::Option<f32>,
1426    /// Total memory.
1427    pub total: std::option::Option<f32>,
1428}
1429impl Memory {
1430    /// Free memory.
1431    pub fn free(&self) -> std::option::Option<f32> {
1432        self.free
1433    }
1434    /// Used memory.
1435    pub fn used(&self) -> std::option::Option<f32> {
1436        self.used
1437    }
1438    /// Total memory.
1439    pub fn total(&self) -> std::option::Option<f32> {
1440        self.total
1441    }
1442}
1443impl std::fmt::Debug for Memory {
1444    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1445        let mut formatter = f.debug_struct("Memory");
1446        formatter.field("free", &self.free);
1447        formatter.field("used", &self.used);
1448        formatter.field("total", &self.total);
1449        formatter.finish()
1450    }
1451}
1452/// See [`Memory`](crate::model::Memory)
1453pub mod memory {
1454    /// A builder for [`Memory`](crate::model::Memory)
1455    #[non_exhaustive]
1456    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1457    pub struct Builder {
1458        pub(crate) free: std::option::Option<f32>,
1459        pub(crate) used: std::option::Option<f32>,
1460        pub(crate) total: std::option::Option<f32>,
1461    }
1462    impl Builder {
1463        /// Free memory.
1464        pub fn free(mut self, input: f32) -> Self {
1465            self.free = Some(input);
1466            self
1467        }
1468        /// Free memory.
1469        pub fn set_free(mut self, input: std::option::Option<f32>) -> Self {
1470            self.free = input;
1471            self
1472        }
1473        /// Used memory.
1474        pub fn used(mut self, input: f32) -> Self {
1475            self.used = Some(input);
1476            self
1477        }
1478        /// Used memory.
1479        pub fn set_used(mut self, input: std::option::Option<f32>) -> Self {
1480            self.used = input;
1481            self
1482        }
1483        /// Total memory.
1484        pub fn total(mut self, input: f32) -> Self {
1485            self.total = Some(input);
1486            self
1487        }
1488        /// Total memory.
1489        pub fn set_total(mut self, input: std::option::Option<f32>) -> Self {
1490            self.total = input;
1491            self
1492        }
1493        /// Consumes the builder and constructs a [`Memory`](crate::model::Memory)
1494        pub fn build(self) -> crate::model::Memory {
1495            crate::model::Memory {
1496                free: self.free,
1497                used: self.used,
1498                total: self.total,
1499            }
1500        }
1501    }
1502}
1503impl Memory {
1504    /// Creates a new builder-style object to manufacture [`Memory`](crate::model::Memory)
1505    pub fn builder() -> crate::model::memory::Builder {
1506        crate::model::memory::Builder::default()
1507    }
1508}