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
81
82
83
84
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A complex type that contains the response to a <code>GetHealthCheck</code> request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetHealthCheckStatusOutput {
    /// <p>A list that contains one <code>HealthCheckObservation</code> element for each Amazon Route 53 health checker that is reporting a status about the health check endpoint.</p>
    pub health_check_observations: ::std::vec::Vec<crate::types::HealthCheckObservation>,
    _request_id: Option<String>,
}
impl GetHealthCheckStatusOutput {
    /// <p>A list that contains one <code>HealthCheckObservation</code> element for each Amazon Route 53 health checker that is reporting a status about the health check endpoint.</p>
    pub fn health_check_observations(&self) -> &[crate::types::HealthCheckObservation] {
        use std::ops::Deref;
        self.health_check_observations.deref()
    }
}
impl ::aws_types::request_id::RequestId for GetHealthCheckStatusOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetHealthCheckStatusOutput {
    /// Creates a new builder-style object to manufacture [`GetHealthCheckStatusOutput`](crate::operation::get_health_check_status::GetHealthCheckStatusOutput).
    pub fn builder() -> crate::operation::get_health_check_status::builders::GetHealthCheckStatusOutputBuilder {
        crate::operation::get_health_check_status::builders::GetHealthCheckStatusOutputBuilder::default()
    }
}

/// A builder for [`GetHealthCheckStatusOutput`](crate::operation::get_health_check_status::GetHealthCheckStatusOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetHealthCheckStatusOutputBuilder {
    pub(crate) health_check_observations: ::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>>,
    _request_id: Option<String>,
}
impl GetHealthCheckStatusOutputBuilder {
    /// Appends an item to `health_check_observations`.
    ///
    /// To override the contents of this collection use [`set_health_check_observations`](Self::set_health_check_observations).
    ///
    /// <p>A list that contains one <code>HealthCheckObservation</code> element for each Amazon Route 53 health checker that is reporting a status about the health check endpoint.</p>
    pub fn health_check_observations(mut self, input: crate::types::HealthCheckObservation) -> Self {
        let mut v = self.health_check_observations.unwrap_or_default();
        v.push(input);
        self.health_check_observations = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list that contains one <code>HealthCheckObservation</code> element for each Amazon Route 53 health checker that is reporting a status about the health check endpoint.</p>
    pub fn set_health_check_observations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>>) -> Self {
        self.health_check_observations = input;
        self
    }
    /// <p>A list that contains one <code>HealthCheckObservation</code> element for each Amazon Route 53 health checker that is reporting a status about the health check endpoint.</p>
    pub fn get_health_check_observations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>> {
        &self.health_check_observations
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetHealthCheckStatusOutput`](crate::operation::get_health_check_status::GetHealthCheckStatusOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`health_check_observations`](crate::operation::get_health_check_status::builders::GetHealthCheckStatusOutputBuilder::health_check_observations)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_health_check_status::GetHealthCheckStatusOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_health_check_status::GetHealthCheckStatusOutput {
            health_check_observations: self.health_check_observations.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "health_check_observations",
                    "health_check_observations was not specified but it is required when building GetHealthCheckStatusOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}