aws-sdk-opensearch 1.112.0

AWS SDK for Amazon OpenSearch Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIndexInput {
    /// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the index to update.</p>
    pub index_name: ::std::option::Option<::std::string::String>,
    /// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
    pub index_schema: ::std::option::Option<::aws_smithy_types::Document>,
}
impl UpdateIndexInput {
    /// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The name of the index to update.</p>
    pub fn index_name(&self) -> ::std::option::Option<&str> {
        self.index_name.as_deref()
    }
    /// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
    pub fn index_schema(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
        self.index_schema.as_ref()
    }
}
impl UpdateIndexInput {
    /// Creates a new builder-style object to manufacture [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
    pub fn builder() -> crate::operation::update_index::builders::UpdateIndexInputBuilder {
        crate::operation::update_index::builders::UpdateIndexInputBuilder::default()
    }
}

/// A builder for [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateIndexInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
    pub(crate) index_schema: ::std::option::Option<::aws_smithy_types::Document>,
}
impl UpdateIndexInputBuilder {
    /// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</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 an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</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 an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The name of the index to update.</p>
    /// This field is required.
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.index_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the index to update.</p>
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.index_name = input;
        self
    }
    /// <p>The name of the index to update.</p>
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.index_name
    }
    /// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
    /// This field is required.
    pub fn index_schema(mut self, input: ::aws_smithy_types::Document) -> Self {
        self.index_schema = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
    pub fn set_index_schema(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
        self.index_schema = input;
        self
    }
    /// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
    pub fn get_index_schema(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
        &self.index_schema
    }
    /// Consumes the builder and constructs a [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_index::UpdateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_index::UpdateIndexInput {
            domain_name: self.domain_name,
            index_name: self.index_name,
            index_schema: self.index_schema,
        })
    }
}