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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Container for the parameters to the <code>DescribeDomains</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDomainsInput {
/// <p>Array of OpenSearch Service domain names that you want information about. You must specify at least one domain name.</p>
pub domain_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeDomainsInput {
/// <p>Array of OpenSearch Service domain names that you want information about. You must specify at least one domain name.</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 `.domain_names.is_none()`.
pub fn domain_names(&self) -> &[::std::string::String] {
self.domain_names.as_deref().unwrap_or_default()
}
}
impl DescribeDomainsInput {
/// Creates a new builder-style object to manufacture [`DescribeDomainsInput`](crate::operation::describe_domains::DescribeDomainsInput).
pub fn builder() -> crate::operation::describe_domains::builders::DescribeDomainsInputBuilder {
crate::operation::describe_domains::builders::DescribeDomainsInputBuilder::default()
}
}
/// A builder for [`DescribeDomainsInput`](crate::operation::describe_domains::DescribeDomainsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeDomainsInputBuilder {
pub(crate) domain_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeDomainsInputBuilder {
/// Appends an item to `domain_names`.
///
/// To override the contents of this collection use [`set_domain_names`](Self::set_domain_names).
///
/// <p>Array of OpenSearch Service domain names that you want information about. You must specify at least one domain name.</p>
pub fn domain_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.domain_names.unwrap_or_default();
v.push(input.into());
self.domain_names = ::std::option::Option::Some(v);
self
}
/// <p>Array of OpenSearch Service domain names that you want information about. You must specify at least one domain name.</p>
pub fn set_domain_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.domain_names = input;
self
}
/// <p>Array of OpenSearch Service domain names that you want information about. You must specify at least one domain name.</p>
pub fn get_domain_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.domain_names
}
/// Consumes the builder and constructs a [`DescribeDomainsInput`](crate::operation::describe_domains::DescribeDomainsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_domains::DescribeDomainsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_domains::DescribeDomainsInput {
domain_names: self.domain_names,
})
}
}