aws-sdk-quicksight 1.130.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the SPICE ingestion for a dataset.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Ingestion {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub arn: ::std::string::String,
    /// <p>Ingestion ID.</p>
    pub ingestion_id: ::std::option::Option<::std::string::String>,
    /// <p>Ingestion status.</p>
    pub ingestion_status: crate::types::IngestionStatus,
    /// <p>Error information for this ingestion.</p>
    pub error_info: ::std::option::Option<crate::types::ErrorInfo>,
    /// <p>Information about rows for a data set SPICE ingestion.</p>
    pub row_info: ::std::option::Option<crate::types::RowInfo>,
    /// <p>Information about a queued dataset SPICE ingestion.</p>
    pub queue_info: ::std::option::Option<crate::types::QueueInfo>,
    /// <p>The time that this ingestion started.</p>
    pub created_time: ::aws_smithy_types::DateTime,
    /// <p>The time that this ingestion took, measured in seconds.</p>
    pub ingestion_time_in_seconds: ::std::option::Option<i64>,
    /// <p>The size of the data ingested, in bytes.</p>
    pub ingestion_size_in_bytes: ::std::option::Option<i64>,
    /// <p>Event source for this ingestion.</p>
    pub request_source: ::std::option::Option<crate::types::IngestionRequestSource>,
    /// <p>Type of this ingestion.</p>
    pub request_type: ::std::option::Option<crate::types::IngestionRequestType>,
}
impl Ingestion {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>Ingestion ID.</p>
    pub fn ingestion_id(&self) -> ::std::option::Option<&str> {
        self.ingestion_id.as_deref()
    }
    /// <p>Ingestion status.</p>
    pub fn ingestion_status(&self) -> &crate::types::IngestionStatus {
        &self.ingestion_status
    }
    /// <p>Error information for this ingestion.</p>
    pub fn error_info(&self) -> ::std::option::Option<&crate::types::ErrorInfo> {
        self.error_info.as_ref()
    }
    /// <p>Information about rows for a data set SPICE ingestion.</p>
    pub fn row_info(&self) -> ::std::option::Option<&crate::types::RowInfo> {
        self.row_info.as_ref()
    }
    /// <p>Information about a queued dataset SPICE ingestion.</p>
    pub fn queue_info(&self) -> ::std::option::Option<&crate::types::QueueInfo> {
        self.queue_info.as_ref()
    }
    /// <p>The time that this ingestion started.</p>
    pub fn created_time(&self) -> &::aws_smithy_types::DateTime {
        &self.created_time
    }
    /// <p>The time that this ingestion took, measured in seconds.</p>
    pub fn ingestion_time_in_seconds(&self) -> ::std::option::Option<i64> {
        self.ingestion_time_in_seconds
    }
    /// <p>The size of the data ingested, in bytes.</p>
    pub fn ingestion_size_in_bytes(&self) -> ::std::option::Option<i64> {
        self.ingestion_size_in_bytes
    }
    /// <p>Event source for this ingestion.</p>
    pub fn request_source(&self) -> ::std::option::Option<&crate::types::IngestionRequestSource> {
        self.request_source.as_ref()
    }
    /// <p>Type of this ingestion.</p>
    pub fn request_type(&self) -> ::std::option::Option<&crate::types::IngestionRequestType> {
        self.request_type.as_ref()
    }
}
impl Ingestion {
    /// Creates a new builder-style object to manufacture [`Ingestion`](crate::types::Ingestion).
    pub fn builder() -> crate::types::builders::IngestionBuilder {
        crate::types::builders::IngestionBuilder::default()
    }
}

/// A builder for [`Ingestion`](crate::types::Ingestion).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct IngestionBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) ingestion_id: ::std::option::Option<::std::string::String>,
    pub(crate) ingestion_status: ::std::option::Option<crate::types::IngestionStatus>,
    pub(crate) error_info: ::std::option::Option<crate::types::ErrorInfo>,
    pub(crate) row_info: ::std::option::Option<crate::types::RowInfo>,
    pub(crate) queue_info: ::std::option::Option<crate::types::QueueInfo>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ingestion_time_in_seconds: ::std::option::Option<i64>,
    pub(crate) ingestion_size_in_bytes: ::std::option::Option<i64>,
    pub(crate) request_source: ::std::option::Option<crate::types::IngestionRequestSource>,
    pub(crate) request_type: ::std::option::Option<crate::types::IngestionRequestType>,
}
impl IngestionBuilder {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>Ingestion ID.</p>
    pub fn ingestion_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ingestion_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Ingestion ID.</p>
    pub fn set_ingestion_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ingestion_id = input;
        self
    }
    /// <p>Ingestion ID.</p>
    pub fn get_ingestion_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ingestion_id
    }
    /// <p>Ingestion status.</p>
    /// This field is required.
    pub fn ingestion_status(mut self, input: crate::types::IngestionStatus) -> Self {
        self.ingestion_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Ingestion status.</p>
    pub fn set_ingestion_status(mut self, input: ::std::option::Option<crate::types::IngestionStatus>) -> Self {
        self.ingestion_status = input;
        self
    }
    /// <p>Ingestion status.</p>
    pub fn get_ingestion_status(&self) -> &::std::option::Option<crate::types::IngestionStatus> {
        &self.ingestion_status
    }
    /// <p>Error information for this ingestion.</p>
    pub fn error_info(mut self, input: crate::types::ErrorInfo) -> Self {
        self.error_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Error information for this ingestion.</p>
    pub fn set_error_info(mut self, input: ::std::option::Option<crate::types::ErrorInfo>) -> Self {
        self.error_info = input;
        self
    }
    /// <p>Error information for this ingestion.</p>
    pub fn get_error_info(&self) -> &::std::option::Option<crate::types::ErrorInfo> {
        &self.error_info
    }
    /// <p>Information about rows for a data set SPICE ingestion.</p>
    pub fn row_info(mut self, input: crate::types::RowInfo) -> Self {
        self.row_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about rows for a data set SPICE ingestion.</p>
    pub fn set_row_info(mut self, input: ::std::option::Option<crate::types::RowInfo>) -> Self {
        self.row_info = input;
        self
    }
    /// <p>Information about rows for a data set SPICE ingestion.</p>
    pub fn get_row_info(&self) -> &::std::option::Option<crate::types::RowInfo> {
        &self.row_info
    }
    /// <p>Information about a queued dataset SPICE ingestion.</p>
    pub fn queue_info(mut self, input: crate::types::QueueInfo) -> Self {
        self.queue_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about a queued dataset SPICE ingestion.</p>
    pub fn set_queue_info(mut self, input: ::std::option::Option<crate::types::QueueInfo>) -> Self {
        self.queue_info = input;
        self
    }
    /// <p>Information about a queued dataset SPICE ingestion.</p>
    pub fn get_queue_info(&self) -> &::std::option::Option<crate::types::QueueInfo> {
        &self.queue_info
    }
    /// <p>The time that this ingestion started.</p>
    /// This field is required.
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that this ingestion started.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>The time that this ingestion started.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The time that this ingestion took, measured in seconds.</p>
    pub fn ingestion_time_in_seconds(mut self, input: i64) -> Self {
        self.ingestion_time_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that this ingestion took, measured in seconds.</p>
    pub fn set_ingestion_time_in_seconds(mut self, input: ::std::option::Option<i64>) -> Self {
        self.ingestion_time_in_seconds = input;
        self
    }
    /// <p>The time that this ingestion took, measured in seconds.</p>
    pub fn get_ingestion_time_in_seconds(&self) -> &::std::option::Option<i64> {
        &self.ingestion_time_in_seconds
    }
    /// <p>The size of the data ingested, in bytes.</p>
    pub fn ingestion_size_in_bytes(mut self, input: i64) -> Self {
        self.ingestion_size_in_bytes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size of the data ingested, in bytes.</p>
    pub fn set_ingestion_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
        self.ingestion_size_in_bytes = input;
        self
    }
    /// <p>The size of the data ingested, in bytes.</p>
    pub fn get_ingestion_size_in_bytes(&self) -> &::std::option::Option<i64> {
        &self.ingestion_size_in_bytes
    }
    /// <p>Event source for this ingestion.</p>
    pub fn request_source(mut self, input: crate::types::IngestionRequestSource) -> Self {
        self.request_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>Event source for this ingestion.</p>
    pub fn set_request_source(mut self, input: ::std::option::Option<crate::types::IngestionRequestSource>) -> Self {
        self.request_source = input;
        self
    }
    /// <p>Event source for this ingestion.</p>
    pub fn get_request_source(&self) -> &::std::option::Option<crate::types::IngestionRequestSource> {
        &self.request_source
    }
    /// <p>Type of this ingestion.</p>
    pub fn request_type(mut self, input: crate::types::IngestionRequestType) -> Self {
        self.request_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Type of this ingestion.</p>
    pub fn set_request_type(mut self, input: ::std::option::Option<crate::types::IngestionRequestType>) -> Self {
        self.request_type = input;
        self
    }
    /// <p>Type of this ingestion.</p>
    pub fn get_request_type(&self) -> &::std::option::Option<crate::types::IngestionRequestType> {
        &self.request_type
    }
    /// Consumes the builder and constructs a [`Ingestion`](crate::types::Ingestion).
    /// This method will fail if any of the following fields are not set:
    /// - [`arn`](crate::types::builders::IngestionBuilder::arn)
    /// - [`ingestion_status`](crate::types::builders::IngestionBuilder::ingestion_status)
    /// - [`created_time`](crate::types::builders::IngestionBuilder::created_time)
    pub fn build(self) -> ::std::result::Result<crate::types::Ingestion, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Ingestion {
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building Ingestion",
                )
            })?,
            ingestion_id: self.ingestion_id,
            ingestion_status: self.ingestion_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "ingestion_status",
                    "ingestion_status was not specified but it is required when building Ingestion",
                )
            })?,
            error_info: self.error_info,
            row_info: self.row_info,
            queue_info: self.queue_info,
            created_time: self.created_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_time",
                    "created_time was not specified but it is required when building Ingestion",
                )
            })?,
            ingestion_time_in_seconds: self.ingestion_time_in_seconds,
            ingestion_size_in_bytes: self.ingestion_size_in_bytes,
            request_source: self.request_source,
            request_type: self.request_type,
        })
    }
}