aws-sdk-opensearchserverless 1.111.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 UpdateCollectionInput {
    /// <p>The unique identifier of the collection.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>A description of the collection.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Configuration options for vector search capabilities in the collection.</p>
    pub vector_options: ::std::option::Option<crate::types::VectorOptions>,
    /// <p>Indicates whether to enable or disable deletion protection for the collection. When set to <code>ENABLED</code>, the collection cannot be deleted.</p>
    pub deletion_protection: ::std::option::Option<crate::types::DeletionProtection>,
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateCollectionInput {
    /// <p>The unique identifier of the collection.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>A description of the collection.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Configuration options for vector search capabilities in the collection.</p>
    pub fn vector_options(&self) -> ::std::option::Option<&crate::types::VectorOptions> {
        self.vector_options.as_ref()
    }
    /// <p>Indicates whether to enable or disable deletion protection for the collection. When set to <code>ENABLED</code>, the collection cannot be deleted.</p>
    pub fn deletion_protection(&self) -> ::std::option::Option<&crate::types::DeletionProtection> {
        self.deletion_protection.as_ref()
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl UpdateCollectionInput {
    /// Creates a new builder-style object to manufacture [`UpdateCollectionInput`](crate::operation::update_collection::UpdateCollectionInput).
    pub fn builder() -> crate::operation::update_collection::builders::UpdateCollectionInputBuilder {
        crate::operation::update_collection::builders::UpdateCollectionInputBuilder::default()
    }
}

/// A builder for [`UpdateCollectionInput`](crate::operation::update_collection::UpdateCollectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCollectionInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) vector_options: ::std::option::Option<crate::types::VectorOptions>,
    pub(crate) deletion_protection: ::std::option::Option<crate::types::DeletionProtection>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateCollectionInputBuilder {
    /// <p>The unique identifier of the collection.</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.</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.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>A description of the collection.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the collection.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the collection.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Configuration options for vector search capabilities in the collection.</p>
    pub fn vector_options(mut self, input: crate::types::VectorOptions) -> Self {
        self.vector_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration options for vector search capabilities in the collection.</p>
    pub fn set_vector_options(mut self, input: ::std::option::Option<crate::types::VectorOptions>) -> Self {
        self.vector_options = input;
        self
    }
    /// <p>Configuration options for vector search capabilities in the collection.</p>
    pub fn get_vector_options(&self) -> &::std::option::Option<crate::types::VectorOptions> {
        &self.vector_options
    }
    /// <p>Indicates whether to enable or disable deletion protection for the collection. When set to <code>ENABLED</code>, the collection cannot be deleted.</p>
    pub fn deletion_protection(mut self, input: crate::types::DeletionProtection) -> Self {
        self.deletion_protection = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether to enable or disable deletion protection for the collection. When set to <code>ENABLED</code>, the collection cannot be deleted.</p>
    pub fn set_deletion_protection(mut self, input: ::std::option::Option<crate::types::DeletionProtection>) -> Self {
        self.deletion_protection = input;
        self
    }
    /// <p>Indicates whether to enable or disable deletion protection for the collection. When set to <code>ENABLED</code>, the collection cannot be deleted.</p>
    pub fn get_deletion_protection(&self) -> &::std::option::Option<crate::types::DeletionProtection> {
        &self.deletion_protection
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`UpdateCollectionInput`](crate::operation::update_collection::UpdateCollectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_collection::UpdateCollectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_collection::UpdateCollectionInput {
            id: self.id,
            description: self.description,
            vector_options: self.vector_options,
            deletion_protection: self.deletion_protection,
            client_token: self.client_token,
        })
    }
}