#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3Location {
#[doc(hidden)]
pub bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub prefix: std::option::Option<std::string::String>,
}
impl S3Location {
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
}
pub mod s3_location {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) prefix: std::option::Option<std::string::String>,
}
impl Builder {
pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket = Some(input.into());
self
}
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket = input;
self
}
pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.prefix = Some(input.into());
self
}
pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.prefix = input;
self
}
pub fn build(self) -> crate::model::S3Location {
crate::model::S3Location {
bucket: self.bucket,
prefix: self.prefix,
}
}
}
}
impl S3Location {
pub fn builder() -> crate::model::s3_location::Builder {
crate::model::s3_location::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Format {
#[allow(missing_docs)] Csv,
#[allow(missing_docs)] Parquet,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Format {
fn from(s: &str) -> Self {
match s {
"CSV" => Format::Csv,
"PARQUET" => Format::Parquet,
other => Format::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for Format {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Format::from(s))
}
}
impl Format {
pub fn as_str(&self) -> &str {
match self {
Format::Csv => "CSV",
Format::Parquet => "PARQUET",
Format::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CSV", "PARQUET"]
}
}
impl AsRef<str> for Format {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ReportFrequency {
#[allow(missing_docs)] All,
#[allow(missing_docs)] Daily,
#[allow(missing_docs)] Monthly,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReportFrequency {
fn from(s: &str) -> Self {
match s {
"ALL" => ReportFrequency::All,
"DAILY" => ReportFrequency::Daily,
"MONTHLY" => ReportFrequency::Monthly,
other => ReportFrequency::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ReportFrequency {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReportFrequency::from(s))
}
}
impl ReportFrequency {
pub fn as_str(&self) -> &str {
match self {
ReportFrequency::All => "ALL",
ReportFrequency::Daily => "DAILY",
ReportFrequency::Monthly => "MONTHLY",
ReportFrequency::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ALL", "DAILY", "MONTHLY"]
}
}
impl AsRef<str> for ReportFrequency {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReportDefinition {
#[doc(hidden)]
pub report_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub report_description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub report_frequency: std::option::Option<crate::model::ReportFrequency>,
#[doc(hidden)]
pub format: std::option::Option<crate::model::Format>,
#[doc(hidden)]
pub destination_s3_location: std::option::Option<crate::model::S3Location>,
#[doc(hidden)]
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl ReportDefinition {
pub fn report_id(&self) -> std::option::Option<&str> {
self.report_id.as_deref()
}
pub fn report_description(&self) -> std::option::Option<&str> {
self.report_description.as_deref()
}
pub fn report_frequency(&self) -> std::option::Option<&crate::model::ReportFrequency> {
self.report_frequency.as_ref()
}
pub fn format(&self) -> std::option::Option<&crate::model::Format> {
self.format.as_ref()
}
pub fn destination_s3_location(&self) -> std::option::Option<&crate::model::S3Location> {
self.destination_s3_location.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
}
pub mod report_definition {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_id: std::option::Option<std::string::String>,
pub(crate) report_description: std::option::Option<std::string::String>,
pub(crate) report_frequency: std::option::Option<crate::model::ReportFrequency>,
pub(crate) format: std::option::Option<crate::model::Format>,
pub(crate) destination_s3_location: std::option::Option<crate::model::S3Location>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn report_id(mut self, input: impl Into<std::string::String>) -> Self {
self.report_id = Some(input.into());
self
}
pub fn set_report_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.report_id = input;
self
}
pub fn report_description(mut self, input: impl Into<std::string::String>) -> Self {
self.report_description = Some(input.into());
self
}
pub fn set_report_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_description = input;
self
}
pub fn report_frequency(mut self, input: crate::model::ReportFrequency) -> Self {
self.report_frequency = Some(input);
self
}
pub fn set_report_frequency(
mut self,
input: std::option::Option<crate::model::ReportFrequency>,
) -> Self {
self.report_frequency = input;
self
}
pub fn format(mut self, input: crate::model::Format) -> Self {
self.format = Some(input);
self
}
pub fn set_format(mut self, input: std::option::Option<crate::model::Format>) -> Self {
self.format = input;
self
}
pub fn destination_s3_location(mut self, input: crate::model::S3Location) -> Self {
self.destination_s3_location = Some(input);
self
}
pub fn set_destination_s3_location(
mut self,
input: std::option::Option<crate::model::S3Location>,
) -> Self {
self.destination_s3_location = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
pub fn last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_at = Some(input);
self
}
pub fn set_last_updated_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated_at = input;
self
}
pub fn build(self) -> crate::model::ReportDefinition {
crate::model::ReportDefinition {
report_id: self.report_id,
report_description: self.report_description,
report_frequency: self.report_frequency,
format: self.format,
destination_s3_location: self.destination_s3_location,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
}
}
}
}
impl ReportDefinition {
pub fn builder() -> crate::model::report_definition::Builder {
crate::model::report_definition::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SourceS3Location {
#[doc(hidden)]
pub bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub region: std::option::Option<crate::model::S3BucketRegion>,
}
impl SourceS3Location {
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn region(&self) -> std::option::Option<&crate::model::S3BucketRegion> {
self.region.as_ref()
}
}
pub mod source_s3_location {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) region: std::option::Option<crate::model::S3BucketRegion>,
}
impl Builder {
pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket = Some(input.into());
self
}
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket = input;
self
}
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
pub fn region(mut self, input: crate::model::S3BucketRegion) -> Self {
self.region = Some(input);
self
}
pub fn set_region(
mut self,
input: std::option::Option<crate::model::S3BucketRegion>,
) -> Self {
self.region = input;
self
}
pub fn build(self) -> crate::model::SourceS3Location {
crate::model::SourceS3Location {
bucket: self.bucket,
key: self.key,
region: self.region,
}
}
}
}
impl SourceS3Location {
pub fn builder() -> crate::model::source_s3_location::Builder {
crate::model::source_s3_location::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum S3BucketRegion {
#[allow(missing_docs)] AfSouth1,
#[allow(missing_docs)] ApEast1,
#[allow(missing_docs)] EuSouth1,
#[allow(missing_docs)] MeSouth1,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for S3BucketRegion {
fn from(s: &str) -> Self {
match s {
"af-south-1" => S3BucketRegion::AfSouth1,
"ap-east-1" => S3BucketRegion::ApEast1,
"eu-south-1" => S3BucketRegion::EuSouth1,
"me-south-1" => S3BucketRegion::MeSouth1,
other => S3BucketRegion::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for S3BucketRegion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(S3BucketRegion::from(s))
}
}
impl S3BucketRegion {
pub fn as_str(&self) -> &str {
match self {
S3BucketRegion::AfSouth1 => "af-south-1",
S3BucketRegion::ApEast1 => "ap-east-1",
S3BucketRegion::EuSouth1 => "eu-south-1",
S3BucketRegion::MeSouth1 => "me-south-1",
S3BucketRegion::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["af-south-1", "ap-east-1", "eu-south-1", "me-south-1"]
}
}
impl AsRef<str> for S3BucketRegion {
fn as_ref(&self) -> &str {
self.as_str()
}
}