aws-sdk-opensearchserverless 1.102.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 UpdateCollectionGroupInput {
    /// <p>The unique identifier of the collection group to update.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>A new description for the collection group.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Updated capacity limits for the collection group, in OpenSearch Compute Units (OCUs).</p>
    pub capacity_limits: ::std::option::Option<crate::types::CollectionGroupCapacityLimits>,
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateCollectionGroupInput {
    /// <p>The unique identifier of the collection group to update.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>A new description for the collection group.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Updated capacity limits for the collection group, in OpenSearch Compute Units (OCUs).</p>
    pub fn capacity_limits(&self) -> ::std::option::Option<&crate::types::CollectionGroupCapacityLimits> {
        self.capacity_limits.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 UpdateCollectionGroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateCollectionGroupInput`](crate::operation::update_collection_group::UpdateCollectionGroupInput).
    pub fn builder() -> crate::operation::update_collection_group::builders::UpdateCollectionGroupInputBuilder {
        crate::operation::update_collection_group::builders::UpdateCollectionGroupInputBuilder::default()
    }
}

/// A builder for [`UpdateCollectionGroupInput`](crate::operation::update_collection_group::UpdateCollectionGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCollectionGroupInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_limits: ::std::option::Option<crate::types::CollectionGroupCapacityLimits>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateCollectionGroupInputBuilder {
    /// <p>The unique identifier of the collection group to update.</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 group to update.</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 group to update.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>A new description for the collection group.</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 new description for the collection group.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A new description for the collection group.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Updated capacity limits for the collection group, in OpenSearch Compute Units (OCUs).</p>
    pub fn capacity_limits(mut self, input: crate::types::CollectionGroupCapacityLimits) -> Self {
        self.capacity_limits = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updated capacity limits for the collection group, in OpenSearch Compute Units (OCUs).</p>
    pub fn set_capacity_limits(mut self, input: ::std::option::Option<crate::types::CollectionGroupCapacityLimits>) -> Self {
        self.capacity_limits = input;
        self
    }
    /// <p>Updated capacity limits for the collection group, in OpenSearch Compute Units (OCUs).</p>
    pub fn get_capacity_limits(&self) -> &::std::option::Option<crate::types::CollectionGroupCapacityLimits> {
        &self.capacity_limits
    }
    /// <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 [`UpdateCollectionGroupInput`](crate::operation::update_collection_group::UpdateCollectionGroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_collection_group::UpdateCollectionGroupInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_collection_group::UpdateCollectionGroupInput {
            id: self.id,
            description: self.description,
            capacity_limits: self.capacity_limits,
            client_token: self.client_token,
        })
    }
}