1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object representing the health status of the container instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ContainerInstanceHealthStatus {
    /// <p>The overall health status of the container instance. This is an aggregate status of all container instance health checks.</p>
    pub overall_status: ::std::option::Option<crate::types::InstanceHealthCheckState>,
    /// <p>An array of objects representing the details of the container instance health status.</p>
    pub details: ::std::option::Option<::std::vec::Vec<crate::types::InstanceHealthCheckResult>>,
}
impl ContainerInstanceHealthStatus {
    /// <p>The overall health status of the container instance. This is an aggregate status of all container instance health checks.</p>
    pub fn overall_status(&self) -> ::std::option::Option<&crate::types::InstanceHealthCheckState> {
        self.overall_status.as_ref()
    }
    /// <p>An array of objects representing the details of the container instance health status.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.details.is_none()`.
    pub fn details(&self) -> &[crate::types::InstanceHealthCheckResult] {
        self.details.as_deref().unwrap_or_default()
    }
}
impl ContainerInstanceHealthStatus {
    /// Creates a new builder-style object to manufacture [`ContainerInstanceHealthStatus`](crate::types::ContainerInstanceHealthStatus).
    pub fn builder() -> crate::types::builders::ContainerInstanceHealthStatusBuilder {
        crate::types::builders::ContainerInstanceHealthStatusBuilder::default()
    }
}

/// A builder for [`ContainerInstanceHealthStatus`](crate::types::ContainerInstanceHealthStatus).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ContainerInstanceHealthStatusBuilder {
    pub(crate) overall_status: ::std::option::Option<crate::types::InstanceHealthCheckState>,
    pub(crate) details: ::std::option::Option<::std::vec::Vec<crate::types::InstanceHealthCheckResult>>,
}
impl ContainerInstanceHealthStatusBuilder {
    /// <p>The overall health status of the container instance. This is an aggregate status of all container instance health checks.</p>
    pub fn overall_status(mut self, input: crate::types::InstanceHealthCheckState) -> Self {
        self.overall_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The overall health status of the container instance. This is an aggregate status of all container instance health checks.</p>
    pub fn set_overall_status(mut self, input: ::std::option::Option<crate::types::InstanceHealthCheckState>) -> Self {
        self.overall_status = input;
        self
    }
    /// <p>The overall health status of the container instance. This is an aggregate status of all container instance health checks.</p>
    pub fn get_overall_status(&self) -> &::std::option::Option<crate::types::InstanceHealthCheckState> {
        &self.overall_status
    }
    /// Appends an item to `details`.
    ///
    /// To override the contents of this collection use [`set_details`](Self::set_details).
    ///
    /// <p>An array of objects representing the details of the container instance health status.</p>
    pub fn details(mut self, input: crate::types::InstanceHealthCheckResult) -> Self {
        let mut v = self.details.unwrap_or_default();
        v.push(input);
        self.details = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of objects representing the details of the container instance health status.</p>
    pub fn set_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceHealthCheckResult>>) -> Self {
        self.details = input;
        self
    }
    /// <p>An array of objects representing the details of the container instance health status.</p>
    pub fn get_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceHealthCheckResult>> {
        &self.details
    }
    /// Consumes the builder and constructs a [`ContainerInstanceHealthStatus`](crate::types::ContainerInstanceHealthStatus).
    pub fn build(self) -> crate::types::ContainerInstanceHealthStatus {
        crate::types::ContainerInstanceHealthStatus {
            overall_status: self.overall_status,
            details: self.details,
        }
    }
}