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>DescribeIndexFields</code></code> operation. Specifies the name of the domain you want to describe. To restrict the response to particular index fields, specify the names of the index fields 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 DescribeIndexFieldsInput {
    /// <p>The name of the domain you want to describe.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</p>
    pub field_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 DescribeIndexFieldsInput {
    /// <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>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</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 `.field_names.is_none()`.
    pub fn field_names(&self) -> &[::std::string::String] {
        self.field_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 DescribeIndexFieldsInput {
    /// Creates a new builder-style object to manufacture [`DescribeIndexFieldsInput`](crate::operation::describe_index_fields::DescribeIndexFieldsInput).
    pub fn builder() -> crate::operation::describe_index_fields::builders::DescribeIndexFieldsInputBuilder {
        crate::operation::describe_index_fields::builders::DescribeIndexFieldsInputBuilder::default()
    }
}

/// A builder for [`DescribeIndexFieldsInput`](crate::operation::describe_index_fields::DescribeIndexFieldsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeIndexFieldsInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) field_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) deployed: ::std::option::Option<bool>,
}
impl DescribeIndexFieldsInputBuilder {
    /// <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 `field_names`.
    ///
    /// To override the contents of this collection use [`set_field_names`](Self::set_field_names).
    ///
    /// <p>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</p>
    pub fn field_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.field_names.unwrap_or_default();
        v.push(input.into());
        self.field_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</p>
    pub fn set_field_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.field_names = input;
        self
    }
    /// <p>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</p>
    pub fn get_field_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.field_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 [`DescribeIndexFieldsInput`](crate::operation::describe_index_fields::DescribeIndexFieldsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_index_fields::DescribeIndexFieldsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_index_fields::DescribeIndexFieldsInput {
            domain_name: self.domain_name,
            field_names: self.field_names,
            deployed: self.deployed,
        })
    }
}