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
// 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 ReleaseHostsInput {
    /// <p>The IDs of the Dedicated Hosts to release.</p>
    pub host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ReleaseHostsInput {
    /// <p>The IDs of the Dedicated Hosts to release.</p>
    pub fn host_ids(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.host_ids.as_deref()
    }
}
impl ReleaseHostsInput {
    /// Creates a new builder-style object to manufacture [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
    pub fn builder() -> crate::operation::release_hosts::builders::ReleaseHostsInputBuilder {
        crate::operation::release_hosts::builders::ReleaseHostsInputBuilder::default()
    }
}

/// A builder for [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ReleaseHostsInputBuilder {
    pub(crate) host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ReleaseHostsInputBuilder {
    /// Appends an item to `host_ids`.
    ///
    /// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
    ///
    /// <p>The IDs of the Dedicated Hosts to release.</p>
    pub fn host_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.host_ids.unwrap_or_default();
        v.push(input.into());
        self.host_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the Dedicated Hosts to release.</p>
    pub fn set_host_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.host_ids = input;
        self
    }
    /// <p>The IDs of the Dedicated Hosts to release.</p>
    pub fn get_host_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.host_ids
    }
    /// Consumes the builder and constructs a [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::release_hosts::ReleaseHostsInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::release_hosts::ReleaseHostsInput { host_ids: self.host_ids })
    }
}