aws_sdk_ec2/operation/release_hosts/
_release_hosts_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ReleaseHostsInput {
6 pub host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8}
9impl ReleaseHostsInput {
10 pub fn host_ids(&self) -> &[::std::string::String] {
14 self.host_ids.as_deref().unwrap_or_default()
15 }
16}
17impl ReleaseHostsInput {
18 pub fn builder() -> crate::operation::release_hosts::builders::ReleaseHostsInputBuilder {
20 crate::operation::release_hosts::builders::ReleaseHostsInputBuilder::default()
21 }
22}
23
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct ReleaseHostsInputBuilder {
28 pub(crate) host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29}
30impl ReleaseHostsInputBuilder {
31 pub fn host_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
37 let mut v = self.host_ids.unwrap_or_default();
38 v.push(input.into());
39 self.host_ids = ::std::option::Option::Some(v);
40 self
41 }
42 pub fn set_host_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
44 self.host_ids = input;
45 self
46 }
47 pub fn get_host_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
49 &self.host_ids
50 }
51 pub fn build(
53 self,
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}