aws-sdk-lexmodelbuilding 1.99.0

AWS SDK for Amazon Lex Model Building Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "Amazon Lex V1 is deprecated. Use Amazon Lex V2 instead.", since = "2025-09-08")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartMigrationInput {
    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
    pub v1_bot_name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
    pub v1_bot_version: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
    /// <ul>
    /// <li>
    /// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
    /// <li>
    /// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub v2_bot_name: ::std::option::Option<::std::string::String>,
    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
    pub v2_bot_role: ::std::option::Option<::std::string::String>,
    /// <p>The strategy used to conduct the migration.</p>
    /// <ul>
    /// <li>
    /// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
    /// <li>
    /// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
}
impl StartMigrationInput {
    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
    pub fn v1_bot_name(&self) -> ::std::option::Option<&str> {
        self.v1_bot_name.as_deref()
    }
    /// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
    pub fn v1_bot_version(&self) -> ::std::option::Option<&str> {
        self.v1_bot_version.as_deref()
    }
    /// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
    /// <ul>
    /// <li>
    /// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
    /// <li>
    /// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn v2_bot_name(&self) -> ::std::option::Option<&str> {
        self.v2_bot_name.as_deref()
    }
    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
    pub fn v2_bot_role(&self) -> ::std::option::Option<&str> {
        self.v2_bot_role.as_deref()
    }
    /// <p>The strategy used to conduct the migration.</p>
    /// <ul>
    /// <li>
    /// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
    /// <li>
    /// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn migration_strategy(&self) -> ::std::option::Option<&crate::types::MigrationStrategy> {
        self.migration_strategy.as_ref()
    }
}
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) v1_bot_name: ::std::option::Option<::std::string::String>,
    pub(crate) v1_bot_version: ::std::option::Option<::std::string::String>,
    pub(crate) v2_bot_name: ::std::option::Option<::std::string::String>,
    pub(crate) v2_bot_role: ::std::option::Option<::std::string::String>,
    pub(crate) migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
}
impl StartMigrationInputBuilder {
    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
    /// This field is required.
    pub fn v1_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.v1_bot_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
    pub fn set_v1_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.v1_bot_name = input;
        self
    }
    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
    pub fn get_v1_bot_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.v1_bot_name
    }
    /// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
    /// This field is required.
    pub fn v1_bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.v1_bot_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
    pub fn set_v1_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.v1_bot_version = input;
        self
    }
    /// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
    pub fn get_v1_bot_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.v1_bot_version
    }
    /// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
    /// <ul>
    /// <li>
    /// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
    /// <li>
    /// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
    /// </ul>
    /// This field is required.
    pub fn v2_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.v2_bot_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
    /// <ul>
    /// <li>
    /// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
    /// <li>
    /// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn set_v2_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.v2_bot_name = input;
        self
    }
    /// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
    /// <ul>
    /// <li>
    /// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
    /// <li>
    /// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn get_v2_bot_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.v2_bot_name
    }
    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
    /// This field is required.
    pub fn v2_bot_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.v2_bot_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
    pub fn set_v2_bot_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.v2_bot_role = input;
        self
    }
    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
    pub fn get_v2_bot_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.v2_bot_role
    }
    /// <p>The strategy used to conduct the migration.</p>
    /// <ul>
    /// <li>
    /// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
    /// <li>
    /// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
    /// </ul>
    /// This field is required.
    pub fn migration_strategy(mut self, input: crate::types::MigrationStrategy) -> Self {
        self.migration_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The strategy used to conduct the migration.</p>
    /// <ul>
    /// <li>
    /// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
    /// <li>
    /// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn set_migration_strategy(mut self, input: ::std::option::Option<crate::types::MigrationStrategy>) -> Self {
        self.migration_strategy = input;
        self
    }
    /// <p>The strategy used to conduct the migration.</p>
    /// <ul>
    /// <li>
    /// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
    /// <li>
    /// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
    /// </ul>
    pub fn get_migration_strategy(&self) -> &::std::option::Option<crate::types::MigrationStrategy> {
        &self.migration_strategy
    }
    /// 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 {
            v1_bot_name: self.v1_bot_name,
            v1_bot_version: self.v1_bot_version,
            v2_bot_name: self.v2_bot_name,
            v2_bot_role: self.v2_bot_role,
            migration_strategy: self.migration_strategy,
        })
    }
}