#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReportDefinition {
#[doc(hidden)]
pub report_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub time_unit: std::option::Option<crate::model::TimeUnit>,
#[doc(hidden)]
pub format: std::option::Option<crate::model::ReportFormat>,
#[doc(hidden)]
pub compression: std::option::Option<crate::model::CompressionFormat>,
#[doc(hidden)]
pub additional_schema_elements: std::option::Option<std::vec::Vec<crate::model::SchemaElement>>,
#[doc(hidden)]
pub s3_bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub s3_prefix: std::option::Option<std::string::String>,
#[doc(hidden)]
pub s3_region: std::option::Option<crate::model::AwsRegion>,
#[doc(hidden)]
pub additional_artifacts: std::option::Option<std::vec::Vec<crate::model::AdditionalArtifact>>,
#[doc(hidden)]
pub refresh_closed_reports: std::option::Option<bool>,
#[doc(hidden)]
pub report_versioning: std::option::Option<crate::model::ReportVersioning>,
#[doc(hidden)]
pub billing_view_arn: std::option::Option<std::string::String>,
}
impl ReportDefinition {
pub fn report_name(&self) -> std::option::Option<&str> {
self.report_name.as_deref()
}
pub fn time_unit(&self) -> std::option::Option<&crate::model::TimeUnit> {
self.time_unit.as_ref()
}
pub fn format(&self) -> std::option::Option<&crate::model::ReportFormat> {
self.format.as_ref()
}
pub fn compression(&self) -> std::option::Option<&crate::model::CompressionFormat> {
self.compression.as_ref()
}
pub fn additional_schema_elements(
&self,
) -> std::option::Option<&[crate::model::SchemaElement]> {
self.additional_schema_elements.as_deref()
}
pub fn s3_bucket(&self) -> std::option::Option<&str> {
self.s3_bucket.as_deref()
}
pub fn s3_prefix(&self) -> std::option::Option<&str> {
self.s3_prefix.as_deref()
}
pub fn s3_region(&self) -> std::option::Option<&crate::model::AwsRegion> {
self.s3_region.as_ref()
}
pub fn additional_artifacts(&self) -> std::option::Option<&[crate::model::AdditionalArtifact]> {
self.additional_artifacts.as_deref()
}
pub fn refresh_closed_reports(&self) -> std::option::Option<bool> {
self.refresh_closed_reports
}
pub fn report_versioning(&self) -> std::option::Option<&crate::model::ReportVersioning> {
self.report_versioning.as_ref()
}
pub fn billing_view_arn(&self) -> std::option::Option<&str> {
self.billing_view_arn.as_deref()
}
}
pub mod report_definition {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_name: std::option::Option<std::string::String>,
pub(crate) time_unit: std::option::Option<crate::model::TimeUnit>,
pub(crate) format: std::option::Option<crate::model::ReportFormat>,
pub(crate) compression: std::option::Option<crate::model::CompressionFormat>,
pub(crate) additional_schema_elements:
std::option::Option<std::vec::Vec<crate::model::SchemaElement>>,
pub(crate) s3_bucket: std::option::Option<std::string::String>,
pub(crate) s3_prefix: std::option::Option<std::string::String>,
pub(crate) s3_region: std::option::Option<crate::model::AwsRegion>,
pub(crate) additional_artifacts:
std::option::Option<std::vec::Vec<crate::model::AdditionalArtifact>>,
pub(crate) refresh_closed_reports: std::option::Option<bool>,
pub(crate) report_versioning: std::option::Option<crate::model::ReportVersioning>,
pub(crate) billing_view_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_name = Some(input.into());
self
}
pub fn set_report_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.report_name = input;
self
}
pub fn time_unit(mut self, input: crate::model::TimeUnit) -> Self {
self.time_unit = Some(input);
self
}
pub fn set_time_unit(mut self, input: std::option::Option<crate::model::TimeUnit>) -> Self {
self.time_unit = input;
self
}
pub fn format(mut self, input: crate::model::ReportFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::ReportFormat>,
) -> Self {
self.format = input;
self
}
pub fn compression(mut self, input: crate::model::CompressionFormat) -> Self {
self.compression = Some(input);
self
}
pub fn set_compression(
mut self,
input: std::option::Option<crate::model::CompressionFormat>,
) -> Self {
self.compression = input;
self
}
pub fn additional_schema_elements(mut self, input: crate::model::SchemaElement) -> Self {
let mut v = self.additional_schema_elements.unwrap_or_default();
v.push(input);
self.additional_schema_elements = Some(v);
self
}
pub fn set_additional_schema_elements(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SchemaElement>>,
) -> Self {
self.additional_schema_elements = input;
self
}
pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_bucket = Some(input.into());
self
}
pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_bucket = input;
self
}
pub fn s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_prefix = Some(input.into());
self
}
pub fn set_s3_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_prefix = input;
self
}
pub fn s3_region(mut self, input: crate::model::AwsRegion) -> Self {
self.s3_region = Some(input);
self
}
pub fn set_s3_region(
mut self,
input: std::option::Option<crate::model::AwsRegion>,
) -> Self {
self.s3_region = input;
self
}
pub fn additional_artifacts(mut self, input: crate::model::AdditionalArtifact) -> Self {
let mut v = self.additional_artifacts.unwrap_or_default();
v.push(input);
self.additional_artifacts = Some(v);
self
}
pub fn set_additional_artifacts(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AdditionalArtifact>>,
) -> Self {
self.additional_artifacts = input;
self
}
pub fn refresh_closed_reports(mut self, input: bool) -> Self {
self.refresh_closed_reports = Some(input);
self
}
pub fn set_refresh_closed_reports(mut self, input: std::option::Option<bool>) -> Self {
self.refresh_closed_reports = input;
self
}
pub fn report_versioning(mut self, input: crate::model::ReportVersioning) -> Self {
self.report_versioning = Some(input);
self
}
pub fn set_report_versioning(
mut self,
input: std::option::Option<crate::model::ReportVersioning>,
) -> Self {
self.report_versioning = input;
self
}
pub fn billing_view_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.billing_view_arn = Some(input.into());
self
}
pub fn set_billing_view_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.billing_view_arn = input;
self
}
pub fn build(self) -> crate::model::ReportDefinition {
crate::model::ReportDefinition {
report_name: self.report_name,
time_unit: self.time_unit,
format: self.format,
compression: self.compression,
additional_schema_elements: self.additional_schema_elements,
s3_bucket: self.s3_bucket,
s3_prefix: self.s3_prefix,
s3_region: self.s3_region,
additional_artifacts: self.additional_artifacts,
refresh_closed_reports: self.refresh_closed_reports,
report_versioning: self.report_versioning,
billing_view_arn: self.billing_view_arn,
}
}
}
}
impl ReportDefinition {
pub fn builder() -> crate::model::report_definition::Builder {
crate::model::report_definition::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 ReportVersioning {
#[allow(missing_docs)] CreateNewReport,
#[allow(missing_docs)] OverwriteReport,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReportVersioning {
fn from(s: &str) -> Self {
match s {
"CREATE_NEW_REPORT" => ReportVersioning::CreateNewReport,
"OVERWRITE_REPORT" => ReportVersioning::OverwriteReport,
other => ReportVersioning::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ReportVersioning {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReportVersioning::from(s))
}
}
impl ReportVersioning {
pub fn as_str(&self) -> &str {
match self {
ReportVersioning::CreateNewReport => "CREATE_NEW_REPORT",
ReportVersioning::OverwriteReport => "OVERWRITE_REPORT",
ReportVersioning::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CREATE_NEW_REPORT", "OVERWRITE_REPORT"]
}
}
impl AsRef<str> for ReportVersioning {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 AdditionalArtifact {
#[allow(missing_docs)] Athena,
#[allow(missing_docs)] Quicksight,
#[allow(missing_docs)] Redshift,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AdditionalArtifact {
fn from(s: &str) -> Self {
match s {
"ATHENA" => AdditionalArtifact::Athena,
"QUICKSIGHT" => AdditionalArtifact::Quicksight,
"REDSHIFT" => AdditionalArtifact::Redshift,
other => {
AdditionalArtifact::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for AdditionalArtifact {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AdditionalArtifact::from(s))
}
}
impl AdditionalArtifact {
pub fn as_str(&self) -> &str {
match self {
AdditionalArtifact::Athena => "ATHENA",
AdditionalArtifact::Quicksight => "QUICKSIGHT",
AdditionalArtifact::Redshift => "REDSHIFT",
AdditionalArtifact::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ATHENA", "QUICKSIGHT", "REDSHIFT"]
}
}
impl AsRef<str> for AdditionalArtifact {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 AwsRegion {
#[allow(missing_docs)] CapeTown,
#[allow(missing_docs)] HongKong,
#[allow(missing_docs)] Tokyo,
#[allow(missing_docs)] Seoul,
#[allow(missing_docs)] Osaka,
#[allow(missing_docs)] Mumbai,
#[allow(missing_docs)] Singapore,
#[allow(missing_docs)] Sydney,
#[allow(missing_docs)] Jakarta,
#[allow(missing_docs)] CanadaCentral,
#[allow(missing_docs)] Beijing,
#[allow(missing_docs)] Ningxia,
#[allow(missing_docs)] Frankfurt,
#[allow(missing_docs)] Stockholm,
#[allow(missing_docs)] Milano,
#[allow(missing_docs)] Spain,
#[allow(missing_docs)] Ireland,
#[allow(missing_docs)] London,
#[allow(missing_docs)] Paris,
#[allow(missing_docs)] Uae,
#[allow(missing_docs)] Bahrain,
#[allow(missing_docs)] SaoPaulo,
#[allow(missing_docs)] UsStandard,
#[allow(missing_docs)] Ohio,
#[allow(missing_docs)] NorthernCalifornia,
#[allow(missing_docs)] Oregon,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AwsRegion {
fn from(s: &str) -> Self {
match s {
"af-south-1" => AwsRegion::CapeTown,
"ap-east-1" => AwsRegion::HongKong,
"ap-northeast-1" => AwsRegion::Tokyo,
"ap-northeast-2" => AwsRegion::Seoul,
"ap-northeast-3" => AwsRegion::Osaka,
"ap-south-1" => AwsRegion::Mumbai,
"ap-southeast-1" => AwsRegion::Singapore,
"ap-southeast-2" => AwsRegion::Sydney,
"ap-southeast-3" => AwsRegion::Jakarta,
"ca-central-1" => AwsRegion::CanadaCentral,
"cn-north-1" => AwsRegion::Beijing,
"cn-northwest-1" => AwsRegion::Ningxia,
"eu-central-1" => AwsRegion::Frankfurt,
"eu-north-1" => AwsRegion::Stockholm,
"eu-south-1" => AwsRegion::Milano,
"eu-south-2" => AwsRegion::Spain,
"eu-west-1" => AwsRegion::Ireland,
"eu-west-2" => AwsRegion::London,
"eu-west-3" => AwsRegion::Paris,
"me-central-1" => AwsRegion::Uae,
"me-south-1" => AwsRegion::Bahrain,
"sa-east-1" => AwsRegion::SaoPaulo,
"us-east-1" => AwsRegion::UsStandard,
"us-east-2" => AwsRegion::Ohio,
"us-west-1" => AwsRegion::NorthernCalifornia,
"us-west-2" => AwsRegion::Oregon,
other => AwsRegion::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AwsRegion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AwsRegion::from(s))
}
}
impl AwsRegion {
pub fn as_str(&self) -> &str {
match self {
AwsRegion::CapeTown => "af-south-1",
AwsRegion::HongKong => "ap-east-1",
AwsRegion::Tokyo => "ap-northeast-1",
AwsRegion::Seoul => "ap-northeast-2",
AwsRegion::Osaka => "ap-northeast-3",
AwsRegion::Mumbai => "ap-south-1",
AwsRegion::Singapore => "ap-southeast-1",
AwsRegion::Sydney => "ap-southeast-2",
AwsRegion::Jakarta => "ap-southeast-3",
AwsRegion::CanadaCentral => "ca-central-1",
AwsRegion::Beijing => "cn-north-1",
AwsRegion::Ningxia => "cn-northwest-1",
AwsRegion::Frankfurt => "eu-central-1",
AwsRegion::Stockholm => "eu-north-1",
AwsRegion::Milano => "eu-south-1",
AwsRegion::Spain => "eu-south-2",
AwsRegion::Ireland => "eu-west-1",
AwsRegion::London => "eu-west-2",
AwsRegion::Paris => "eu-west-3",
AwsRegion::Uae => "me-central-1",
AwsRegion::Bahrain => "me-south-1",
AwsRegion::SaoPaulo => "sa-east-1",
AwsRegion::UsStandard => "us-east-1",
AwsRegion::Ohio => "us-east-2",
AwsRegion::NorthernCalifornia => "us-west-1",
AwsRegion::Oregon => "us-west-2",
AwsRegion::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"cn-north-1",
"cn-northwest-1",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-south-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"me-central-1",
"me-south-1",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
]
}
}
impl AsRef<str> for AwsRegion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 SchemaElement {
#[allow(missing_docs)] Resources,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SchemaElement {
fn from(s: &str) -> Self {
match s {
"RESOURCES" => SchemaElement::Resources,
other => SchemaElement::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for SchemaElement {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SchemaElement::from(s))
}
}
impl SchemaElement {
pub fn as_str(&self) -> &str {
match self {
SchemaElement::Resources => "RESOURCES",
SchemaElement::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["RESOURCES"]
}
}
impl AsRef<str> for SchemaElement {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 CompressionFormat {
#[allow(missing_docs)] Gzip,
#[allow(missing_docs)] Parquet,
#[allow(missing_docs)] Zip,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CompressionFormat {
fn from(s: &str) -> Self {
match s {
"GZIP" => CompressionFormat::Gzip,
"Parquet" => CompressionFormat::Parquet,
"ZIP" => CompressionFormat::Zip,
other => {
CompressionFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for CompressionFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CompressionFormat::from(s))
}
}
impl CompressionFormat {
pub fn as_str(&self) -> &str {
match self {
CompressionFormat::Gzip => "GZIP",
CompressionFormat::Parquet => "Parquet",
CompressionFormat::Zip => "ZIP",
CompressionFormat::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["GZIP", "Parquet", "ZIP"]
}
}
impl AsRef<str> for CompressionFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 ReportFormat {
#[allow(missing_docs)] Parquet,
#[allow(missing_docs)] Csv,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReportFormat {
fn from(s: &str) -> Self {
match s {
"Parquet" => ReportFormat::Parquet,
"textORcsv" => ReportFormat::Csv,
other => ReportFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ReportFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReportFormat::from(s))
}
}
impl ReportFormat {
pub fn as_str(&self) -> &str {
match self {
ReportFormat::Parquet => "Parquet",
ReportFormat::Csv => "textORcsv",
ReportFormat::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["Parquet", "textORcsv"]
}
}
impl AsRef<str> for ReportFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[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 TimeUnit {
#[allow(missing_docs)] Daily,
#[allow(missing_docs)] Hourly,
#[allow(missing_docs)] Monthly,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TimeUnit {
fn from(s: &str) -> Self {
match s {
"DAILY" => TimeUnit::Daily,
"HOURLY" => TimeUnit::Hourly,
"MONTHLY" => TimeUnit::Monthly,
other => TimeUnit::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for TimeUnit {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TimeUnit::from(s))
}
}
impl TimeUnit {
pub fn as_str(&self) -> &str {
match self {
TimeUnit::Daily => "DAILY",
TimeUnit::Hourly => "HOURLY",
TimeUnit::Monthly => "MONTHLY",
TimeUnit::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DAILY", "HOURLY", "MONTHLY"]
}
}
impl AsRef<str> for TimeUnit {
fn as_ref(&self) -> &str {
self.as_str()
}
}