aws-sdk-opensearch 1.138.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 DetachDataSourceInput {
    /// <p>The unique identifier or name of the OpenSearch application to detach the data source from.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
    pub data_source_arn: ::std::option::Option<::std::string::String>,
}
impl DetachDataSourceInput {
    /// <p>The unique identifier or name of the OpenSearch application to detach the data source from.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
    pub fn data_source_arn(&self) -> ::std::option::Option<&str> {
        self.data_source_arn.as_deref()
    }
}
impl DetachDataSourceInput {
    /// Creates a new builder-style object to manufacture [`DetachDataSourceInput`](crate::operation::detach_data_source::DetachDataSourceInput).
    pub fn builder() -> crate::operation::detach_data_source::builders::DetachDataSourceInputBuilder {
        crate::operation::detach_data_source::builders::DetachDataSourceInputBuilder::default()
    }
}

/// A builder for [`DetachDataSourceInput`](crate::operation::detach_data_source::DetachDataSourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DetachDataSourceInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) data_source_arn: ::std::option::Option<::std::string::String>,
}
impl DetachDataSourceInputBuilder {
    /// <p>The unique identifier or name of the OpenSearch application to detach the data source from.</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 or name of the OpenSearch application to detach the data source from.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The unique identifier or name of the OpenSearch application to detach the data source from.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
    /// This field is required.
    pub fn data_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_source_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
    pub fn set_data_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_source_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
    pub fn get_data_source_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_source_arn
    }
    /// Consumes the builder and constructs a [`DetachDataSourceInput`](crate::operation::detach_data_source::DetachDataSourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::detach_data_source::DetachDataSourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::detach_data_source::DetachDataSourceInput {
            id: self.id,
            data_source_arn: self.data_source_arn,
        })
    }
}