aws-sdk-lexmodelbuilding 1.101.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 StartImportOutput {
    /// <p>The name given to the import job.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of resource to import.</p>
    pub resource_type: ::std::option::Option<crate::types::ResourceType>,
    /// <p>The action to take when there is a merge conflict.</p>
    pub merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
    /// <p>The identifier for the specific import job.</p>
    pub import_id: ::std::option::Option<::std::string::String>,
    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
    pub import_status: ::std::option::Option<crate::types::ImportStatus>,
    /// <p>A list of tags added to the imported bot.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>A timestamp for the date and time that the import job was requested.</p>
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl StartImportOutput {
    /// <p>The name given to the import job.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of resource to import.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The action to take when there is a merge conflict.</p>
    pub fn merge_strategy(&self) -> ::std::option::Option<&crate::types::MergeStrategy> {
        self.merge_strategy.as_ref()
    }
    /// <p>The identifier for the specific import job.</p>
    pub fn import_id(&self) -> ::std::option::Option<&str> {
        self.import_id.as_deref()
    }
    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
    pub fn import_status(&self) -> ::std::option::Option<&crate::types::ImportStatus> {
        self.import_status.as_ref()
    }
    /// <p>A list of tags added to the imported bot.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>A timestamp for the date and time that the import job was requested.</p>
    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_date.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for StartImportOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl StartImportOutput {
    /// Creates a new builder-style object to manufacture [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
    pub fn builder() -> crate::operation::start_import::builders::StartImportOutputBuilder {
        crate::operation::start_import::builders::StartImportOutputBuilder::default()
    }
}

/// A builder for [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartImportOutputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) resource_type: ::std::option::Option<crate::types::ResourceType>,
    pub(crate) merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
    pub(crate) import_id: ::std::option::Option<::std::string::String>,
    pub(crate) import_status: ::std::option::Option<crate::types::ImportStatus>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl StartImportOutputBuilder {
    /// <p>The name given to the import job.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name given to the import job.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name given to the import job.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of resource to import.</p>
    pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
        self.resource_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of resource to import.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>The type of resource to import.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
        &self.resource_type
    }
    /// <p>The action to take when there is a merge conflict.</p>
    pub fn merge_strategy(mut self, input: crate::types::MergeStrategy) -> Self {
        self.merge_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action to take when there is a merge conflict.</p>
    pub fn set_merge_strategy(mut self, input: ::std::option::Option<crate::types::MergeStrategy>) -> Self {
        self.merge_strategy = input;
        self
    }
    /// <p>The action to take when there is a merge conflict.</p>
    pub fn get_merge_strategy(&self) -> &::std::option::Option<crate::types::MergeStrategy> {
        &self.merge_strategy
    }
    /// <p>The identifier for the specific import job.</p>
    pub fn import_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.import_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the specific import job.</p>
    pub fn set_import_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.import_id = input;
        self
    }
    /// <p>The identifier for the specific import job.</p>
    pub fn get_import_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.import_id
    }
    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
    pub fn import_status(mut self, input: crate::types::ImportStatus) -> Self {
        self.import_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
    pub fn set_import_status(mut self, input: ::std::option::Option<crate::types::ImportStatus>) -> Self {
        self.import_status = input;
        self
    }
    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
    pub fn get_import_status(&self) -> &::std::option::Option<crate::types::ImportStatus> {
        &self.import_status
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of tags added to the imported bot.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of tags added to the imported bot.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A list of tags added to the imported bot.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>A timestamp for the date and time that the import job was requested.</p>
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp for the date and time that the import job was requested.</p>
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_date = input;
        self
    }
    /// <p>A timestamp for the date and time that the import job was requested.</p>
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_date
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
    pub fn build(self) -> crate::operation::start_import::StartImportOutput {
        crate::operation::start_import::StartImportOutput {
            name: self.name,
            resource_type: self.resource_type,
            merge_strategy: self.merge_strategy,
            import_id: self.import_id,
            import_status: self.import_status,
            tags: self.tags,
            created_date: self.created_date,
            _request_id: self._request_id,
        }
    }
}