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 StartMigrationInput {
    /// <p>The unique identifier of the OpenSearch application to migrate saved objects into.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.</p>
    pub migration_options: ::std::option::Option<crate::types::MigrationOptions>,
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl StartMigrationInput {
    /// <p>The unique identifier of the OpenSearch application to migrate saved objects into.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.</p>
    pub fn migration_options(&self) -> ::std::option::Option<&crate::types::MigrationOptions> {
        self.migration_options.as_ref()
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl StartMigrationInput {
    /// Creates a new builder-style object to manufacture [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
    pub fn builder() -> crate::operation::start_migration::builders::StartMigrationInputBuilder {
        crate::operation::start_migration::builders::StartMigrationInputBuilder::default()
    }
}

/// A builder for [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartMigrationInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) migration_options: ::std::option::Option<crate::types::MigrationOptions>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl StartMigrationInputBuilder {
    /// <p>The unique identifier of the OpenSearch application to migrate saved objects into.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the OpenSearch application to migrate saved objects into.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The unique identifier of the OpenSearch application to migrate saved objects into.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.</p>
    /// This field is required.
    pub fn migration_options(mut self, input: crate::types::MigrationOptions) -> Self {
        self.migration_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.</p>
    pub fn set_migration_options(mut self, input: ::std::option::Option<crate::types::MigrationOptions>) -> Self {
        self.migration_options = input;
        self
    }
    /// <p>The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.</p>
    pub fn get_migration_options(&self) -> &::std::option::Option<crate::types::MigrationOptions> {
        &self.migration_options
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.</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>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_migration::StartMigrationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_migration::StartMigrationInput {
            application_id: self.application_id,
            migration_options: self.migration_options,
            client_token: self.client_token,
        })
    }
}