1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ReleaseHostsInput {
6/// <p>The IDs of the Dedicated Hosts to release.</p>
7pub host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8}
9impl ReleaseHostsInput {
10/// <p>The IDs of the Dedicated Hosts to release.</p>
11 ///
12 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.host_ids.is_none()`.
13pub fn host_ids(&self) -> &[::std::string::String] {
14self.host_ids.as_deref().unwrap_or_default()
15 }
16}
17impl ReleaseHostsInput {
18/// Creates a new builder-style object to manufacture [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
19pub fn builder() -> crate::operation::release_hosts::builders::ReleaseHostsInputBuilder {
20crate::operation::release_hosts::builders::ReleaseHostsInputBuilder::default()
21 }
22}
2324/// A builder for [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct ReleaseHostsInputBuilder {
28pub(crate) host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29}
30impl ReleaseHostsInputBuilder {
31/// Appends an item to `host_ids`.
32 ///
33 /// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
34 ///
35 /// <p>The IDs of the Dedicated Hosts to release.</p>
36pub fn host_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
37let mut v = self.host_ids.unwrap_or_default();
38 v.push(input.into());
39self.host_ids = ::std::option::Option::Some(v);
40self
41}
42/// <p>The IDs of the Dedicated Hosts to release.</p>
43pub fn set_host_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
44self.host_ids = input;
45self
46}
47/// <p>The IDs of the Dedicated Hosts to release.</p>
48pub fn get_host_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
49&self.host_ids
50 }
51/// Consumes the builder and constructs a [`ReleaseHostsInput`](crate::operation::release_hosts::ReleaseHostsInput).
52pub fn build(
53self,
54 ) -> ::std::result::Result<crate::operation::release_hosts::ReleaseHostsInput, ::aws_smithy_types::error::operation::BuildError> {
55 ::std::result::Result::Ok(crate::operation::release_hosts::ReleaseHostsInput { host_ids: self.host_ids })
56 }
57}