aws-sdk-lexmodelbuilding 1.100.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 GetImportOutput {
    /// <p>The name given to the import job.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of resource imported.</p>
    pub resource_type: ::std::option::Option<crate::types::ResourceType>,
    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</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 from the <code>failureReason</code> field.</p>
    pub import_status: ::std::option::Option<crate::types::ImportStatus>,
    /// <p>A string that describes why an import job failed to complete.</p>
    pub failure_reason: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A timestamp for the date and time that the import job was created.</p>
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetImportOutput {
    /// <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 imported.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</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 from the <code>failureReason</code> field.</p>
    pub fn import_status(&self) -> ::std::option::Option<&crate::types::ImportStatus> {
        self.import_status.as_ref()
    }
    /// <p>A string that describes why an import job failed to complete.</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 `.failure_reason.is_none()`.
    pub fn failure_reason(&self) -> &[::std::string::String] {
        self.failure_reason.as_deref().unwrap_or_default()
    }
    /// <p>A timestamp for the date and time that the import job was created.</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 GetImportOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetImportOutput {
    /// Creates a new builder-style object to manufacture [`GetImportOutput`](crate::operation::get_import::GetImportOutput).
    pub fn builder() -> crate::operation::get_import::builders::GetImportOutputBuilder {
        crate::operation::get_import::builders::GetImportOutputBuilder::default()
    }
}

/// A builder for [`GetImportOutput`](crate::operation::get_import::GetImportOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetImportOutputBuilder {
    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) failure_reason: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetImportOutputBuilder {
    /// <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 imported.</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 imported.</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 imported.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
        &self.resource_type
    }
    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</p>
    pub fn merge_strategy(mut self, input: crate::types::MergeStrategy) -> Self {
        self.merge_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</p>
    pub fn set_merge_strategy(mut self, input: ::std::option::Option<crate::types::MergeStrategy>) -> Self {
        self.merge_strategy = input;
        self
    }
    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</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 from the <code>failureReason</code> field.</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 from the <code>failureReason</code> field.</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 from the <code>failureReason</code> field.</p>
    pub fn get_import_status(&self) -> &::std::option::Option<crate::types::ImportStatus> {
        &self.import_status
    }
    /// Appends an item to `failure_reason`.
    ///
    /// To override the contents of this collection use [`set_failure_reason`](Self::set_failure_reason).
    ///
    /// <p>A string that describes why an import job failed to complete.</p>
    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.failure_reason.unwrap_or_default();
        v.push(input.into());
        self.failure_reason = ::std::option::Option::Some(v);
        self
    }
    /// <p>A string that describes why an import job failed to complete.</p>
    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.failure_reason = input;
        self
    }
    /// <p>A string that describes why an import job failed to complete.</p>
    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.failure_reason
    }
    /// <p>A timestamp for the date and time that the import job was created.</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 created.</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 created.</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 [`GetImportOutput`](crate::operation::get_import::GetImportOutput).
    pub fn build(self) -> crate::operation::get_import::GetImportOutput {
        crate::operation::get_import::GetImportOutput {
            name: self.name,
            resource_type: self.resource_type,
            merge_strategy: self.merge_strategy,
            import_id: self.import_id,
            import_status: self.import_status,
            failure_reason: self.failure_reason,
            created_date: self.created_date,
            _request_id: self._request_id,
        }
    }
}