#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Ingestion {
pub arn: ::std::string::String,
pub ingestion_id: ::std::option::Option<::std::string::String>,
pub ingestion_status: crate::types::IngestionStatus,
pub error_info: ::std::option::Option<crate::types::ErrorInfo>,
pub row_info: ::std::option::Option<crate::types::RowInfo>,
pub queue_info: ::std::option::Option<crate::types::QueueInfo>,
pub created_time: ::aws_smithy_types::DateTime,
pub ingestion_time_in_seconds: ::std::option::Option<i64>,
pub ingestion_size_in_bytes: ::std::option::Option<i64>,
pub request_source: ::std::option::Option<crate::types::IngestionRequestSource>,
pub request_type: ::std::option::Option<crate::types::IngestionRequestType>,
}
impl Ingestion {
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn ingestion_id(&self) -> ::std::option::Option<&str> {
self.ingestion_id.as_deref()
}
pub fn ingestion_status(&self) -> &crate::types::IngestionStatus {
&self.ingestion_status
}
pub fn error_info(&self) -> ::std::option::Option<&crate::types::ErrorInfo> {
self.error_info.as_ref()
}
pub fn row_info(&self) -> ::std::option::Option<&crate::types::RowInfo> {
self.row_info.as_ref()
}
pub fn queue_info(&self) -> ::std::option::Option<&crate::types::QueueInfo> {
self.queue_info.as_ref()
}
pub fn created_time(&self) -> &::aws_smithy_types::DateTime {
&self.created_time
}
pub fn ingestion_time_in_seconds(&self) -> ::std::option::Option<i64> {
self.ingestion_time_in_seconds
}
pub fn ingestion_size_in_bytes(&self) -> ::std::option::Option<i64> {
self.ingestion_size_in_bytes
}
pub fn request_source(&self) -> ::std::option::Option<&crate::types::IngestionRequestSource> {
self.request_source.as_ref()
}
pub fn request_type(&self) -> ::std::option::Option<&crate::types::IngestionRequestType> {
self.request_type.as_ref()
}
}
impl Ingestion {
pub fn builder() -> crate::types::builders::IngestionBuilder {
crate::types::builders::IngestionBuilder::default()
}
}
#[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 {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
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
}
pub fn set_ingestion_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ingestion_id = input;
self
}
pub fn get_ingestion_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ingestion_id
}
pub fn ingestion_status(mut self, input: crate::types::IngestionStatus) -> Self {
self.ingestion_status = ::std::option::Option::Some(input);
self
}
pub fn set_ingestion_status(mut self, input: ::std::option::Option<crate::types::IngestionStatus>) -> Self {
self.ingestion_status = input;
self
}
pub fn get_ingestion_status(&self) -> &::std::option::Option<crate::types::IngestionStatus> {
&self.ingestion_status
}
pub fn error_info(mut self, input: crate::types::ErrorInfo) -> Self {
self.error_info = ::std::option::Option::Some(input);
self
}
pub fn set_error_info(mut self, input: ::std::option::Option<crate::types::ErrorInfo>) -> Self {
self.error_info = input;
self
}
pub fn get_error_info(&self) -> &::std::option::Option<crate::types::ErrorInfo> {
&self.error_info
}
pub fn row_info(mut self, input: crate::types::RowInfo) -> Self {
self.row_info = ::std::option::Option::Some(input);
self
}
pub fn set_row_info(mut self, input: ::std::option::Option<crate::types::RowInfo>) -> Self {
self.row_info = input;
self
}
pub fn get_row_info(&self) -> &::std::option::Option<crate::types::RowInfo> {
&self.row_info
}
pub fn queue_info(mut self, input: crate::types::QueueInfo) -> Self {
self.queue_info = ::std::option::Option::Some(input);
self
}
pub fn set_queue_info(mut self, input: ::std::option::Option<crate::types::QueueInfo>) -> Self {
self.queue_info = input;
self
}
pub fn get_queue_info(&self) -> &::std::option::Option<crate::types::QueueInfo> {
&self.queue_info
}
pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_time = ::std::option::Option::Some(input);
self
}
pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_time = input;
self
}
pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_time
}
pub fn ingestion_time_in_seconds(mut self, input: i64) -> Self {
self.ingestion_time_in_seconds = ::std::option::Option::Some(input);
self
}
pub fn set_ingestion_time_in_seconds(mut self, input: ::std::option::Option<i64>) -> Self {
self.ingestion_time_in_seconds = input;
self
}
pub fn get_ingestion_time_in_seconds(&self) -> &::std::option::Option<i64> {
&self.ingestion_time_in_seconds
}
pub fn ingestion_size_in_bytes(mut self, input: i64) -> Self {
self.ingestion_size_in_bytes = ::std::option::Option::Some(input);
self
}
pub fn set_ingestion_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
self.ingestion_size_in_bytes = input;
self
}
pub fn get_ingestion_size_in_bytes(&self) -> &::std::option::Option<i64> {
&self.ingestion_size_in_bytes
}
pub fn request_source(mut self, input: crate::types::IngestionRequestSource) -> Self {
self.request_source = ::std::option::Option::Some(input);
self
}
pub fn set_request_source(mut self, input: ::std::option::Option<crate::types::IngestionRequestSource>) -> Self {
self.request_source = input;
self
}
pub fn get_request_source(&self) -> &::std::option::Option<crate::types::IngestionRequestSource> {
&self.request_source
}
pub fn request_type(mut self, input: crate::types::IngestionRequestType) -> Self {
self.request_type = ::std::option::Option::Some(input);
self
}
pub fn set_request_type(mut self, input: ::std::option::Option<crate::types::IngestionRequestType>) -> Self {
self.request_type = input;
self
}
pub fn get_request_type(&self) -> &::std::option::Option<crate::types::IngestionRequestType> {
&self.request_type
}
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,
})
}
}