1#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct PrometheusTarget {
6 #[allow(missing_docs)] pub targets: std::option::Option<std::vec::Vec<std::string::String>>,
8 pub labels:
10 std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
11}
12impl PrometheusTarget {
13 #[allow(missing_docs)] pub fn targets(&self) -> std::option::Option<&[std::string::String]> {
15 self.targets.as_deref()
16 }
17 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}
33pub mod prometheus_target {
35 #[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 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)] 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 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 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 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 pub fn builder() -> crate::model::prometheus_target::Builder {
100 crate::model::prometheus_target::Builder::default()
101 }
102}
103
104#[non_exhaustive]
106#[derive(std::clone::Clone, std::cmp::PartialEq)]
107pub struct SystemdOutputInner {
108 pub hostname: std::option::Option<std::string::String>,
110 pub service: std::option::Option<std::string::String>,
112 pub output: std::option::Option<std::string::String>,
114 pub error: std::option::Option<std::string::String>,
116 pub exit_code: std::option::Option<i64>,
118}
119impl SystemdOutputInner {
120 pub fn hostname(&self) -> std::option::Option<&str> {
122 self.hostname.as_deref()
123 }
124 pub fn service(&self) -> std::option::Option<&str> {
126 self.service.as_deref()
127 }
128 pub fn output(&self) -> std::option::Option<&str> {
130 self.output.as_deref()
131 }
132 pub fn error(&self) -> std::option::Option<&str> {
134 self.error.as_deref()
135 }
136 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}
152pub mod systemd_output_inner {
154 #[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 pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
167 self.hostname = Some(input.into());
168 self
169 }
170 pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
172 self.hostname = input;
173 self
174 }
175 pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
177 self.service = Some(input.into());
178 self
179 }
180 pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
182 self.service = input;
183 self
184 }
185 pub fn output(mut self, input: impl Into<std::string::String>) -> Self {
187 self.output = Some(input.into());
188 self
189 }
190 pub fn set_output(mut self, input: std::option::Option<std::string::String>) -> Self {
192 self.output = input;
193 self
194 }
195 pub fn error(mut self, input: impl Into<std::string::String>) -> Self {
197 self.error = Some(input.into());
198 self
199 }
200 pub fn set_error(mut self, input: std::option::Option<std::string::String>) -> Self {
202 self.error = input;
203 self
204 }
205 pub fn exit_code(mut self, input: i64) -> Self {
207 self.exit_code = Some(input);
208 self
209 }
210 pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
212 self.exit_code = input;
213 self
214 }
215 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 pub fn builder() -> crate::model::systemd_output_inner::Builder {
230 crate::model::systemd_output_inner::Builder::default()
231 }
232}
233
234#[non_exhaustive]
236#[derive(std::clone::Clone, std::cmp::PartialEq)]
237pub struct ListOutput {
238 pub primary: std::option::Option<std::string::String>,
240 pub host: std::option::Option<crate::model::Host>,
242 pub resources: std::option::Option<crate::model::Resources>,
244 pub services: std::option::Option<std::vec::Vec<crate::model::Service>>,
246 pub checksum: std::option::Option<std::string::String>,
248 pub available_services: std::option::Option<std::vec::Vec<std::string::String>>,
250 pub peers: std::option::Option<
252 std::collections::HashMap<std::string::String, crate::model::ListOutput>,
253 >,
254}
255impl ListOutput {
256 pub fn primary(&self) -> std::option::Option<&str> {
258 self.primary.as_deref()
259 }
260 pub fn host(&self) -> std::option::Option<&crate::model::Host> {
262 self.host.as_ref()
263 }
264 pub fn resources(&self) -> std::option::Option<&crate::model::Resources> {
266 self.resources.as_ref()
267 }
268 pub fn services(&self) -> std::option::Option<&[crate::model::Service]> {
270 self.services.as_deref()
271 }
272 pub fn checksum(&self) -> std::option::Option<&str> {
274 self.checksum.as_deref()
275 }
276 pub fn available_services(&self) -> std::option::Option<&[std::string::String]> {
278 self.available_services.as_deref()
279 }
280 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}
302pub mod list_output {
304 #[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 pub fn primary(mut self, input: impl Into<std::string::String>) -> Self {
321 self.primary = Some(input.into());
322 self
323 }
324 pub fn set_primary(mut self, input: std::option::Option<std::string::String>) -> Self {
326 self.primary = input;
327 self
328 }
329 pub fn host(mut self, input: crate::model::Host) -> Self {
331 self.host = Some(input);
332 self
333 }
334 pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
336 self.host = input;
337 self
338 }
339 pub fn resources(mut self, input: crate::model::Resources) -> Self {
341 self.resources = Some(input);
342 self
343 }
344 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 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 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 pub fn checksum(mut self, input: impl Into<std::string::String>) -> Self {
373 self.checksum = Some(input.into());
374 self
375 }
376 pub fn set_checksum(mut self, input: std::option::Option<std::string::String>) -> Self {
378 self.checksum = input;
379 self
380 }
381 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 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 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 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 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 pub fn builder() -> crate::model::list_output::Builder {
442 crate::model::list_output::Builder::default()
443 }
444}
445
446#[non_exhaustive]
448#[derive(std::clone::Clone, std::cmp::PartialEq)]
449pub struct Service {
450 pub id: std::option::Option<std::string::String>,
452 pub name: std::option::Option<std::string::String>,
454 pub service: std::option::Option<std::string::String>,
456 pub pod: std::option::Option<std::string::String>,
458 pub host: std::option::Option<crate::model::Host>,
460 pub weave: std::option::Option<crate::model::WeaveInfo>,
462 pub https: std::option::Option<std::vec::Vec<crate::model::Http>>,
464 pub tcps: std::option::Option<std::vec::Vec<crate::model::Tcp>>,
466 pub monitorings: std::option::Option<std::vec::Vec<crate::model::Monitoring>>,
468 pub healthcheck: std::option::Option<crate::model::Healthcheck>,
470}
471impl Service {
472 pub fn id(&self) -> std::option::Option<&str> {
474 self.id.as_deref()
475 }
476 pub fn name(&self) -> std::option::Option<&str> {
478 self.name.as_deref()
479 }
480 pub fn service(&self) -> std::option::Option<&str> {
482 self.service.as_deref()
483 }
484 pub fn pod(&self) -> std::option::Option<&str> {
486 self.pod.as_deref()
487 }
488 pub fn host(&self) -> std::option::Option<&crate::model::Host> {
490 self.host.as_ref()
491 }
492 pub fn weave(&self) -> std::option::Option<&crate::model::WeaveInfo> {
494 self.weave.as_ref()
495 }
496 pub fn https(&self) -> std::option::Option<&[crate::model::Http]> {
498 self.https.as_deref()
499 }
500 pub fn tcps(&self) -> std::option::Option<&[crate::model::Tcp]> {
502 self.tcps.as_deref()
503 }
504 pub fn monitorings(&self) -> std::option::Option<&[crate::model::Monitoring]> {
506 self.monitorings.as_deref()
507 }
508 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}
529pub mod service {
531 #[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 pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
549 self.id = Some(input.into());
550 self
551 }
552 pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
554 self.id = input;
555 self
556 }
557 pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
559 self.name = Some(input.into());
560 self
561 }
562 pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
564 self.name = input;
565 self
566 }
567 pub fn service(mut self, input: impl Into<std::string::String>) -> Self {
569 self.service = Some(input.into());
570 self
571 }
572 pub fn set_service(mut self, input: std::option::Option<std::string::String>) -> Self {
574 self.service = input;
575 self
576 }
577 pub fn pod(mut self, input: impl Into<std::string::String>) -> Self {
579 self.pod = Some(input.into());
580 self
581 }
582 pub fn set_pod(mut self, input: std::option::Option<std::string::String>) -> Self {
584 self.pod = input;
585 self
586 }
587 pub fn host(mut self, input: crate::model::Host) -> Self {
589 self.host = Some(input);
590 self
591 }
592 pub fn set_host(mut self, input: std::option::Option<crate::model::Host>) -> Self {
594 self.host = input;
595 self
596 }
597 pub fn weave(mut self, input: crate::model::WeaveInfo) -> Self {
599 self.weave = Some(input);
600 self
601 }
602 pub fn set_weave(mut self, input: std::option::Option<crate::model::WeaveInfo>) -> Self {
604 self.weave = input;
605 self
606 }
607 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 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 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 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 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 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 pub fn healthcheck(mut self, input: crate::model::Healthcheck) -> Self {
666 self.healthcheck = Some(input);
667 self
668 }
669 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 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 pub fn builder() -> crate::model::service::Builder {
697 crate::model::service::Builder::default()
698 }
699}
700
701#[non_exhaustive]
703#[derive(std::clone::Clone, std::cmp::PartialEq)]
704pub struct Healthcheck {
705 pub message: std::option::Option<std::string::String>,
707 pub status: std::option::Option<std::string::String>,
709 pub exit_code: std::option::Option<i64>,
711 pub failing_streak: std::option::Option<i64>,
713}
714impl Healthcheck {
715 pub fn message(&self) -> std::option::Option<&str> {
717 self.message.as_deref()
718 }
719 pub fn status(&self) -> std::option::Option<&str> {
721 self.status.as_deref()
722 }
723 pub fn exit_code(&self) -> std::option::Option<i64> {
725 self.exit_code
726 }
727 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}
742pub mod healthcheck {
744 #[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 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
756 self.message = Some(input.into());
757 self
758 }
759 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
761 self.message = input;
762 self
763 }
764 pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
766 self.status = Some(input.into());
767 self
768 }
769 pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
771 self.status = input;
772 self
773 }
774 pub fn exit_code(mut self, input: i64) -> Self {
776 self.exit_code = Some(input);
777 self
778 }
779 pub fn set_exit_code(mut self, input: std::option::Option<i64>) -> Self {
781 self.exit_code = input;
782 self
783 }
784 pub fn failing_streak(mut self, input: i64) -> Self {
786 self.failing_streak = Some(input);
787 self
788 }
789 pub fn set_failing_streak(mut self, input: std::option::Option<i64>) -> Self {
791 self.failing_streak = input;
792 self
793 }
794 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 pub fn builder() -> crate::model::healthcheck::Builder {
808 crate::model::healthcheck::Builder::default()
809 }
810}
811
812#[non_exhaustive]
814#[derive(std::clone::Clone, std::cmp::PartialEq)]
815pub struct Monitoring {
816 pub hostname: std::option::Option<std::string::String>,
818 pub url: std::option::Option<std::string::String>,
820 pub port: std::option::Option<i16>,
822}
823impl Monitoring {
824 pub fn hostname(&self) -> std::option::Option<&str> {
826 self.hostname.as_deref()
827 }
828 pub fn url(&self) -> std::option::Option<&str> {
830 self.url.as_deref()
831 }
832 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}
846pub mod monitoring {
848 #[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 pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
859 self.hostname = Some(input.into());
860 self
861 }
862 pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
864 self.hostname = input;
865 self
866 }
867 pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
869 self.url = Some(input.into());
870 self
871 }
872 pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
874 self.url = input;
875 self
876 }
877 pub fn port(mut self, input: i16) -> Self {
879 self.port = Some(input);
880 self
881 }
882 pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
884 self.port = input;
885 self
886 }
887 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 pub fn builder() -> crate::model::monitoring::Builder {
900 crate::model::monitoring::Builder::default()
901 }
902}
903
904#[non_exhaustive]
906#[derive(std::clone::Clone, std::cmp::PartialEq)]
907pub struct Tcp {
908 pub external: std::option::Option<i16>,
910 pub internal: std::option::Option<i16>,
912}
913impl Tcp {
914 pub fn external(&self) -> std::option::Option<i16> {
916 self.external
917 }
918 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}
931pub mod tcp {
933 #[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 pub fn external(mut self, input: i16) -> Self {
943 self.external = Some(input);
944 self
945 }
946 pub fn set_external(mut self, input: std::option::Option<i16>) -> Self {
948 self.external = input;
949 self
950 }
951 pub fn internal(mut self, input: i16) -> Self {
953 self.internal = Some(input);
954 self
955 }
956 pub fn set_internal(mut self, input: std::option::Option<i16>) -> Self {
958 self.internal = input;
959 self
960 }
961 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 pub fn builder() -> crate::model::tcp::Builder {
973 crate::model::tcp::Builder::default()
974 }
975}
976
977#[non_exhaustive]
979#[derive(std::clone::Clone, std::cmp::PartialEq)]
980pub struct Http {
981 pub port: std::option::Option<i16>,
983 pub verb: std::option::Option<std::string::String>,
985 pub auth: std::option::Option<bool>,
987}
988impl Http {
989 pub fn port(&self) -> std::option::Option<i16> {
991 self.port
992 }
993 pub fn verb(&self) -> std::option::Option<&str> {
995 self.verb.as_deref()
996 }
997 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}
1011pub mod http {
1013 #[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 pub fn port(mut self, input: i16) -> Self {
1024 self.port = Some(input);
1025 self
1026 }
1027 pub fn set_port(mut self, input: std::option::Option<i16>) -> Self {
1029 self.port = input;
1030 self
1031 }
1032 pub fn verb(mut self, input: impl Into<std::string::String>) -> Self {
1034 self.verb = Some(input.into());
1035 self
1036 }
1037 pub fn set_verb(mut self, input: std::option::Option<std::string::String>) -> Self {
1039 self.verb = input;
1040 self
1041 }
1042 pub fn auth(mut self, input: bool) -> Self {
1044 self.auth = Some(input);
1045 self
1046 }
1047 pub fn set_auth(mut self, input: std::option::Option<bool>) -> Self {
1049 self.auth = input;
1050 self
1051 }
1052 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 pub fn builder() -> crate::model::http::Builder {
1065 crate::model::http::Builder::default()
1066 }
1067}
1068
1069#[non_exhaustive]
1071#[derive(std::clone::Clone, std::cmp::PartialEq)]
1072pub struct WeaveInfo {
1073 pub domain: std::option::Option<std::string::String>,
1075 pub ip: std::option::Option<std::string::String>,
1077}
1078impl WeaveInfo {
1079 pub fn domain(&self) -> std::option::Option<&str> {
1081 self.domain.as_deref()
1082 }
1083 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}
1096pub mod weave_info {
1098 #[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 pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
1108 self.domain = Some(input.into());
1109 self
1110 }
1111 pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
1113 self.domain = input;
1114 self
1115 }
1116 pub fn ip(mut self, input: impl Into<std::string::String>) -> Self {
1118 self.ip = Some(input.into());
1119 self
1120 }
1121 pub fn set_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
1123 self.ip = input;
1124 self
1125 }
1126 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 pub fn builder() -> crate::model::weave_info::Builder {
1138 crate::model::weave_info::Builder::default()
1139 }
1140}
1141
1142#[non_exhaustive]
1144#[derive(std::clone::Clone, std::cmp::PartialEq)]
1145pub struct Host {
1146 pub hostname: std::option::Option<std::string::String>,
1148 pub domain: std::option::Option<std::string::String>,
1150}
1151impl Host {
1152 pub fn hostname(&self) -> std::option::Option<&str> {
1154 self.hostname.as_deref()
1155 }
1156 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}
1169pub mod host {
1171 #[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 pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
1181 self.hostname = Some(input.into());
1182 self
1183 }
1184 pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
1186 self.hostname = input;
1187 self
1188 }
1189 pub fn domain(mut self, input: impl Into<std::string::String>) -> Self {
1191 self.domain = Some(input.into());
1192 self
1193 }
1194 pub fn set_domain(mut self, input: std::option::Option<std::string::String>) -> Self {
1196 self.domain = input;
1197 self
1198 }
1199 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 pub fn builder() -> crate::model::host::Builder {
1211 crate::model::host::Builder::default()
1212 }
1213}
1214
1215#[non_exhaustive]
1217#[derive(std::clone::Clone, std::cmp::PartialEq)]
1218pub struct Resources {
1219 pub cpus: std::option::Option<i16>,
1221 pub memory: std::option::Option<crate::model::Memory>,
1223 pub load_avg: std::option::Option<crate::model::LoadAvg>,
1225 pub temperature: std::option::Option<f32>,
1227}
1228impl Resources {
1229 pub fn cpus(&self) -> std::option::Option<i16> {
1231 self.cpus
1232 }
1233 pub fn memory(&self) -> std::option::Option<&crate::model::Memory> {
1235 self.memory.as_ref()
1236 }
1237 pub fn load_avg(&self) -> std::option::Option<&crate::model::LoadAvg> {
1239 self.load_avg.as_ref()
1240 }
1241 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}
1256pub mod resources {
1258 #[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 pub fn cpus(mut self, input: i16) -> Self {
1270 self.cpus = Some(input);
1271 self
1272 }
1273 pub fn set_cpus(mut self, input: std::option::Option<i16>) -> Self {
1275 self.cpus = input;
1276 self
1277 }
1278 pub fn memory(mut self, input: crate::model::Memory) -> Self {
1280 self.memory = Some(input);
1281 self
1282 }
1283 pub fn set_memory(mut self, input: std::option::Option<crate::model::Memory>) -> Self {
1285 self.memory = input;
1286 self
1287 }
1288 pub fn load_avg(mut self, input: crate::model::LoadAvg) -> Self {
1290 self.load_avg = Some(input);
1291 self
1292 }
1293 pub fn set_load_avg(mut self, input: std::option::Option<crate::model::LoadAvg>) -> Self {
1295 self.load_avg = input;
1296 self
1297 }
1298 pub fn temperature(mut self, input: f32) -> Self {
1300 self.temperature = Some(input);
1301 self
1302 }
1303 pub fn set_temperature(mut self, input: std::option::Option<f32>) -> Self {
1305 self.temperature = input;
1306 self
1307 }
1308 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 pub fn builder() -> crate::model::resources::Builder {
1322 crate::model::resources::Builder::default()
1323 }
1324}
1325
1326#[non_exhaustive]
1328#[derive(std::clone::Clone, std::cmp::PartialEq)]
1329pub struct LoadAvg {
1330 pub one: std::option::Option<f32>,
1332 pub five: std::option::Option<f32>,
1334 pub fifteen: std::option::Option<f32>,
1336}
1337impl LoadAvg {
1338 pub fn one(&self) -> std::option::Option<f32> {
1340 self.one
1341 }
1342 pub fn five(&self) -> std::option::Option<f32> {
1344 self.five
1345 }
1346 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}
1360pub mod load_avg {
1362 #[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 pub fn one(mut self, input: f32) -> Self {
1373 self.one = Some(input);
1374 self
1375 }
1376 pub fn set_one(mut self, input: std::option::Option<f32>) -> Self {
1378 self.one = input;
1379 self
1380 }
1381 pub fn five(mut self, input: f32) -> Self {
1383 self.five = Some(input);
1384 self
1385 }
1386 pub fn set_five(mut self, input: std::option::Option<f32>) -> Self {
1388 self.five = input;
1389 self
1390 }
1391 pub fn fifteen(mut self, input: f32) -> Self {
1393 self.fifteen = Some(input);
1394 self
1395 }
1396 pub fn set_fifteen(mut self, input: std::option::Option<f32>) -> Self {
1398 self.fifteen = input;
1399 self
1400 }
1401 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 pub fn builder() -> crate::model::load_avg::Builder {
1414 crate::model::load_avg::Builder::default()
1415 }
1416}
1417
1418#[non_exhaustive]
1420#[derive(std::clone::Clone, std::cmp::PartialEq)]
1421pub struct Memory {
1422 pub free: std::option::Option<f32>,
1424 pub used: std::option::Option<f32>,
1426 pub total: std::option::Option<f32>,
1428}
1429impl Memory {
1430 pub fn free(&self) -> std::option::Option<f32> {
1432 self.free
1433 }
1434 pub fn used(&self) -> std::option::Option<f32> {
1436 self.used
1437 }
1438 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}
1452pub mod memory {
1454 #[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 pub fn free(mut self, input: f32) -> Self {
1465 self.free = Some(input);
1466 self
1467 }
1468 pub fn set_free(mut self, input: std::option::Option<f32>) -> Self {
1470 self.free = input;
1471 self
1472 }
1473 pub fn used(mut self, input: f32) -> Self {
1475 self.used = Some(input);
1476 self
1477 }
1478 pub fn set_used(mut self, input: std::option::Option<f32>) -> Self {
1480 self.used = input;
1481 self
1482 }
1483 pub fn total(mut self, input: f32) -> Self {
1485 self.total = Some(input);
1486 self
1487 }
1488 pub fn set_total(mut self, input: std::option::Option<f32>) -> Self {
1490 self.total = input;
1491 self
1492 }
1493 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 pub fn builder() -> crate::model::memory::Builder {
1506 crate::model::memory::Builder::default()
1507 }
1508}