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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAgentStatusInput {
    /// <p>UUID of agent to update.</p>
    pub agent_id: ::std::option::Option<::std::string::String>,
    /// <p>GUID of agent task.</p>
    pub task_id: ::std::option::Option<::std::string::String>,
    /// <p>Aggregate status for agent.</p>
    pub aggregate_status: ::std::option::Option<crate::types::AggregateStatus>,
    /// <p>List of component statuses for agent.</p>
    pub component_statuses: ::std::option::Option<::std::vec::Vec<crate::types::ComponentStatusData>>,
}
impl UpdateAgentStatusInput {
    /// <p>UUID of agent to update.</p>
    pub fn agent_id(&self) -> ::std::option::Option<&str> {
        self.agent_id.as_deref()
    }
    /// <p>GUID of agent task.</p>
    pub fn task_id(&self) -> ::std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>Aggregate status for agent.</p>
    pub fn aggregate_status(&self) -> ::std::option::Option<&crate::types::AggregateStatus> {
        self.aggregate_status.as_ref()
    }
    /// <p>List of component statuses for agent.</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 `.component_statuses.is_none()`.
    pub fn component_statuses(&self) -> &[crate::types::ComponentStatusData] {
        self.component_statuses.as_deref().unwrap_or_default()
    }
}
impl UpdateAgentStatusInput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentStatusInput`](crate::operation::update_agent_status::UpdateAgentStatusInput).
    pub fn builder() -> crate::operation::update_agent_status::builders::UpdateAgentStatusInputBuilder {
        crate::operation::update_agent_status::builders::UpdateAgentStatusInputBuilder::default()
    }
}

/// A builder for [`UpdateAgentStatusInput`](crate::operation::update_agent_status::UpdateAgentStatusInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateAgentStatusInputBuilder {
    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) aggregate_status: ::std::option::Option<crate::types::AggregateStatus>,
    pub(crate) component_statuses: ::std::option::Option<::std::vec::Vec<crate::types::ComponentStatusData>>,
}
impl UpdateAgentStatusInputBuilder {
    /// <p>UUID of agent to update.</p>
    /// This field is required.
    pub fn agent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>UUID of agent to update.</p>
    pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_id = input;
        self
    }
    /// <p>UUID of agent to update.</p>
    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_id
    }
    /// <p>GUID of agent task.</p>
    /// This field is required.
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>GUID of agent task.</p>
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// <p>GUID of agent task.</p>
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// <p>Aggregate status for agent.</p>
    /// This field is required.
    pub fn aggregate_status(mut self, input: crate::types::AggregateStatus) -> Self {
        self.aggregate_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Aggregate status for agent.</p>
    pub fn set_aggregate_status(mut self, input: ::std::option::Option<crate::types::AggregateStatus>) -> Self {
        self.aggregate_status = input;
        self
    }
    /// <p>Aggregate status for agent.</p>
    pub fn get_aggregate_status(&self) -> &::std::option::Option<crate::types::AggregateStatus> {
        &self.aggregate_status
    }
    /// Appends an item to `component_statuses`.
    ///
    /// To override the contents of this collection use [`set_component_statuses`](Self::set_component_statuses).
    ///
    /// <p>List of component statuses for agent.</p>
    pub fn component_statuses(mut self, input: crate::types::ComponentStatusData) -> Self {
        let mut v = self.component_statuses.unwrap_or_default();
        v.push(input);
        self.component_statuses = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of component statuses for agent.</p>
    pub fn set_component_statuses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComponentStatusData>>) -> Self {
        self.component_statuses = input;
        self
    }
    /// <p>List of component statuses for agent.</p>
    pub fn get_component_statuses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComponentStatusData>> {
        &self.component_statuses
    }
    /// Consumes the builder and constructs a [`UpdateAgentStatusInput`](crate::operation::update_agent_status::UpdateAgentStatusInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_agent_status::UpdateAgentStatusInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_agent_status::UpdateAgentStatusInput {
            agent_id: self.agent_id,
            task_id: self.task_id,
            aggregate_status: self.aggregate_status,
            component_statuses: self.component_statuses,
        })
    }
}