aws-sdk-opensearchserverless 1.108.0

AWS SDK for OpenSearch Service Serverless
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 GetIndexInput {
    /// <p>The unique identifier of the collection containing the index.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the index to retrieve information about.</p>
    pub index_name: ::std::option::Option<::std::string::String>,
}
impl GetIndexInput {
    /// <p>The unique identifier of the collection containing the index.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The name of the index to retrieve information about.</p>
    pub fn index_name(&self) -> ::std::option::Option<&str> {
        self.index_name.as_deref()
    }
}
impl GetIndexInput {
    /// Creates a new builder-style object to manufacture [`GetIndexInput`](crate::operation::get_index::GetIndexInput).
    pub fn builder() -> crate::operation::get_index::builders::GetIndexInputBuilder {
        crate::operation::get_index::builders::GetIndexInputBuilder::default()
    }
}

/// A builder for [`GetIndexInput`](crate::operation::get_index::GetIndexInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIndexInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
}
impl GetIndexInputBuilder {
    /// <p>The unique identifier of the collection containing the index.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the collection containing the index.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The unique identifier of the collection containing the index.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The name of the index to retrieve information about.</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 retrieve information about.</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 retrieve information about.</p>
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.index_name
    }
    /// Consumes the builder and constructs a [`GetIndexInput`](crate::operation::get_index::GetIndexInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_index::GetIndexInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_index::GetIndexInput {
            id: self.id,
            index_name: self.index_name,
        })
    }
}