aws-sdk-lexmodelsv2 1.111.0

AWS SDK for Amazon Lex Model Building V2
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)]
pub struct CreateExportInput {
    /// <p>Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.</p>
    pub resource_specification: ::std::option::Option<crate::types::ExportResourceSpecification>,
    /// <p>The file format of the bot or bot locale definition files.</p>
    pub file_format: ::std::option::Option<crate::types::ImportExportFileFormat>,
    /// <p>An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.</p>
    pub file_password: ::std::option::Option<::std::string::String>,
}
impl CreateExportInput {
    /// <p>Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.</p>
    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ExportResourceSpecification> {
        self.resource_specification.as_ref()
    }
    /// <p>The file format of the bot or bot locale definition files.</p>
    pub fn file_format(&self) -> ::std::option::Option<&crate::types::ImportExportFileFormat> {
        self.file_format.as_ref()
    }
    /// <p>An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.</p>
    pub fn file_password(&self) -> ::std::option::Option<&str> {
        self.file_password.as_deref()
    }
}
impl ::std::fmt::Debug for CreateExportInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateExportInput");
        formatter.field("resource_specification", &self.resource_specification);
        formatter.field("file_format", &self.file_format);
        formatter.field("file_password", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateExportInput {
    /// Creates a new builder-style object to manufacture [`CreateExportInput`](crate::operation::create_export::CreateExportInput).
    pub fn builder() -> crate::operation::create_export::builders::CreateExportInputBuilder {
        crate::operation::create_export::builders::CreateExportInputBuilder::default()
    }
}

/// A builder for [`CreateExportInput`](crate::operation::create_export::CreateExportInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateExportInputBuilder {
    pub(crate) resource_specification: ::std::option::Option<crate::types::ExportResourceSpecification>,
    pub(crate) file_format: ::std::option::Option<crate::types::ImportExportFileFormat>,
    pub(crate) file_password: ::std::option::Option<::std::string::String>,
}
impl CreateExportInputBuilder {
    /// <p>Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.</p>
    /// This field is required.
    pub fn resource_specification(mut self, input: crate::types::ExportResourceSpecification) -> Self {
        self.resource_specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.</p>
    pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ExportResourceSpecification>) -> Self {
        self.resource_specification = input;
        self
    }
    /// <p>Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.</p>
    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ExportResourceSpecification> {
        &self.resource_specification
    }
    /// <p>The file format of the bot or bot locale definition files.</p>
    /// This field is required.
    pub fn file_format(mut self, input: crate::types::ImportExportFileFormat) -> Self {
        self.file_format = ::std::option::Option::Some(input);
        self
    }
    /// <p>The file format of the bot or bot locale definition files.</p>
    pub fn set_file_format(mut self, input: ::std::option::Option<crate::types::ImportExportFileFormat>) -> Self {
        self.file_format = input;
        self
    }
    /// <p>The file format of the bot or bot locale definition files.</p>
    pub fn get_file_format(&self) -> &::std::option::Option<crate::types::ImportExportFileFormat> {
        &self.file_format
    }
    /// <p>An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.</p>
    pub fn file_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_password = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.</p>
    pub fn set_file_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_password = input;
        self
    }
    /// <p>An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.</p>
    pub fn get_file_password(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_password
    }
    /// Consumes the builder and constructs a [`CreateExportInput`](crate::operation::create_export::CreateExportInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_export::CreateExportInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_export::CreateExportInput {
            resource_specification: self.resource_specification,
            file_format: self.file_format,
            file_password: self.file_password,
        })
    }
}
impl ::std::fmt::Debug for CreateExportInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateExportInputBuilder");
        formatter.field("resource_specification", &self.resource_specification);
        formatter.field("file_format", &self.file_format);
        formatter.field("file_password", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}