aws-sdk-cloudsearch 1.98.0

AWS SDK for Amazon CloudSearch
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Container for the parameters to the <code><code>DescribeSuggester</code></code> operation. Specifies the name of the domain you want to describe. To restrict the response to particular suggesters, specify the names of the suggesters you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeSuggestersInput {
    /// <p>The name of the domain you want to describe.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The suggesters you want to describe.</p>
    pub suggester_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
    pub deployed: ::std::option::Option<bool>,
}
impl DescribeSuggestersInput {
    /// <p>The name of the domain you want to describe.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The suggesters you want to describe.</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 `.suggester_names.is_none()`.
    pub fn suggester_names(&self) -> &[::std::string::String] {
        self.suggester_names.as_deref().unwrap_or_default()
    }
    /// <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
    pub fn deployed(&self) -> ::std::option::Option<bool> {
        self.deployed
    }
}
impl DescribeSuggestersInput {
    /// Creates a new builder-style object to manufacture [`DescribeSuggestersInput`](crate::operation::describe_suggesters::DescribeSuggestersInput).
    pub fn builder() -> crate::operation::describe_suggesters::builders::DescribeSuggestersInputBuilder {
        crate::operation::describe_suggesters::builders::DescribeSuggestersInputBuilder::default()
    }
}

/// A builder for [`DescribeSuggestersInput`](crate::operation::describe_suggesters::DescribeSuggestersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeSuggestersInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) suggester_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) deployed: ::std::option::Option<bool>,
}
impl DescribeSuggestersInputBuilder {
    /// <p>The name of the domain you want to describe.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the domain you want to describe.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The name of the domain you want to describe.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// Appends an item to `suggester_names`.
    ///
    /// To override the contents of this collection use [`set_suggester_names`](Self::set_suggester_names).
    ///
    /// <p>The suggesters you want to describe.</p>
    pub fn suggester_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.suggester_names.unwrap_or_default();
        v.push(input.into());
        self.suggester_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The suggesters you want to describe.</p>
    pub fn set_suggester_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.suggester_names = input;
        self
    }
    /// <p>The suggesters you want to describe.</p>
    pub fn get_suggester_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.suggester_names
    }
    /// <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
    pub fn deployed(mut self, input: bool) -> Self {
        self.deployed = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
    pub fn set_deployed(mut self, input: ::std::option::Option<bool>) -> Self {
        self.deployed = input;
        self
    }
    /// <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
    pub fn get_deployed(&self) -> &::std::option::Option<bool> {
        &self.deployed
    }
    /// Consumes the builder and constructs a [`DescribeSuggestersInput`](crate::operation::describe_suggesters::DescribeSuggestersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_suggesters::DescribeSuggestersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_suggesters::DescribeSuggestersInput {
            domain_name: self.domain_name,
            suggester_names: self.suggester_names,
            deployed: self.deployed,
        })
    }
}