#[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 StorageClass {
#[allow(missing_docs)] DeepArchive,
#[allow(missing_docs)] Glacier,
#[allow(missing_docs)] IntelligentTiering,
#[allow(missing_docs)] OnezoneIa,
#[allow(missing_docs)] Outposts,
#[allow(missing_docs)] ReducedRedundancy,
#[allow(missing_docs)] Standard,
#[allow(missing_docs)] StandardIa,
Unknown(String),
}
impl std::convert::From<&str> for StorageClass {
fn from(s: &str) -> Self {
match s {
"DEEP_ARCHIVE" => StorageClass::DeepArchive,
"GLACIER" => StorageClass::Glacier,
"INTELLIGENT_TIERING" => StorageClass::IntelligentTiering,
"ONEZONE_IA" => StorageClass::OnezoneIa,
"OUTPOSTS" => StorageClass::Outposts,
"REDUCED_REDUNDANCY" => StorageClass::ReducedRedundancy,
"STANDARD" => StorageClass::Standard,
"STANDARD_IA" => StorageClass::StandardIa,
other => StorageClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StorageClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StorageClass::from(s))
}
}
impl StorageClass {
pub fn as_str(&self) -> &str {
match self {
StorageClass::DeepArchive => "DEEP_ARCHIVE",
StorageClass::Glacier => "GLACIER",
StorageClass::IntelligentTiering => "INTELLIGENT_TIERING",
StorageClass::OnezoneIa => "ONEZONE_IA",
StorageClass::Outposts => "OUTPOSTS",
StorageClass::ReducedRedundancy => "REDUCED_REDUNDANCY",
StorageClass::Standard => "STANDARD",
StorageClass::StandardIa => "STANDARD_IA",
StorageClass::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DEEP_ARCHIVE",
"GLACIER",
"INTELLIGENT_TIERING",
"ONEZONE_IA",
"OUTPOSTS",
"REDUCED_REDUNDANCY",
"STANDARD",
"STANDARD_IA",
]
}
}
impl AsRef<str> for StorageClass {
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 ServerSideEncryption {
#[allow(missing_docs)] Aes256,
#[allow(missing_docs)] AwsKms,
Unknown(String),
}
impl std::convert::From<&str> for ServerSideEncryption {
fn from(s: &str) -> Self {
match s {
"AES256" => ServerSideEncryption::Aes256,
"aws:kms" => ServerSideEncryption::AwsKms,
other => ServerSideEncryption::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ServerSideEncryption {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ServerSideEncryption::from(s))
}
}
impl ServerSideEncryption {
pub fn as_str(&self) -> &str {
match self {
ServerSideEncryption::Aes256 => "AES256",
ServerSideEncryption::AwsKms => "aws:kms",
ServerSideEncryption::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AES256", "aws:kms"]
}
}
impl AsRef<str> for ServerSideEncryption {
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 RequestCharged {
#[allow(missing_docs)] Requester,
Unknown(String),
}
impl std::convert::From<&str> for RequestCharged {
fn from(s: &str) -> Self {
match s {
"requester" => RequestCharged::Requester,
other => RequestCharged::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RequestCharged {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RequestCharged::from(s))
}
}
impl RequestCharged {
pub fn as_str(&self) -> &str {
match self {
RequestCharged::Requester => "requester",
RequestCharged::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["requester"]
}
}
impl AsRef<str> for RequestCharged {
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 ReplicationStatus {
#[allow(missing_docs)] Complete,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Replica,
Unknown(String),
}
impl std::convert::From<&str> for ReplicationStatus {
fn from(s: &str) -> Self {
match s {
"COMPLETE" => ReplicationStatus::Complete,
"FAILED" => ReplicationStatus::Failed,
"PENDING" => ReplicationStatus::Pending,
"REPLICA" => ReplicationStatus::Replica,
other => ReplicationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReplicationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReplicationStatus::from(s))
}
}
impl ReplicationStatus {
pub fn as_str(&self) -> &str {
match self {
ReplicationStatus::Complete => "COMPLETE",
ReplicationStatus::Failed => "FAILED",
ReplicationStatus::Pending => "PENDING",
ReplicationStatus::Replica => "REPLICA",
ReplicationStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COMPLETE", "FAILED", "PENDING", "REPLICA"]
}
}
impl AsRef<str> for ReplicationStatus {
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 ObjectLockLegalHoldStatus {
#[allow(missing_docs)] Off,
#[allow(missing_docs)] On,
Unknown(String),
}
impl std::convert::From<&str> for ObjectLockLegalHoldStatus {
fn from(s: &str) -> Self {
match s {
"OFF" => ObjectLockLegalHoldStatus::Off,
"ON" => ObjectLockLegalHoldStatus::On,
other => ObjectLockLegalHoldStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectLockLegalHoldStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectLockLegalHoldStatus::from(s))
}
}
impl ObjectLockLegalHoldStatus {
pub fn as_str(&self) -> &str {
match self {
ObjectLockLegalHoldStatus::Off => "OFF",
ObjectLockLegalHoldStatus::On => "ON",
ObjectLockLegalHoldStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["OFF", "ON"]
}
}
impl AsRef<str> for ObjectLockLegalHoldStatus {
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 ObjectLockMode {
#[allow(missing_docs)] Compliance,
#[allow(missing_docs)] Governance,
Unknown(String),
}
impl std::convert::From<&str> for ObjectLockMode {
fn from(s: &str) -> Self {
match s {
"COMPLIANCE" => ObjectLockMode::Compliance,
"GOVERNANCE" => ObjectLockMode::Governance,
other => ObjectLockMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectLockMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectLockMode::from(s))
}
}
impl ObjectLockMode {
pub fn as_str(&self) -> &str {
match self {
ObjectLockMode::Compliance => "COMPLIANCE",
ObjectLockMode::Governance => "GOVERNANCE",
ObjectLockMode::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COMPLIANCE", "GOVERNANCE"]
}
}
impl AsRef<str> for ObjectLockMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CopyPartResult {
pub e_tag: std::option::Option<std::string::String>,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl CopyPartResult {
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
}
impl std::fmt::Debug for CopyPartResult {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CopyPartResult");
formatter.field("e_tag", &self.e_tag);
formatter.field("last_modified", &self.last_modified);
formatter.finish()
}
}
pub mod copy_part_result {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn build(self) -> crate::model::CopyPartResult {
crate::model::CopyPartResult {
e_tag: self.e_tag,
last_modified: self.last_modified,
}
}
}
}
impl CopyPartResult {
pub fn builder() -> crate::model::copy_part_result::Builder {
crate::model::copy_part_result::Builder::default()
}
}
#[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 RequestPayer {
#[allow(missing_docs)] Requester,
Unknown(String),
}
impl std::convert::From<&str> for RequestPayer {
fn from(s: &str) -> Self {
match s {
"requester" => RequestPayer::Requester,
other => RequestPayer::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RequestPayer {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RequestPayer::from(s))
}
}
impl RequestPayer {
pub fn as_str(&self) -> &str {
match self {
RequestPayer::Requester => "requester",
RequestPayer::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["requester"]
}
}
impl AsRef<str> for RequestPayer {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum SelectObjectContentEventStream {
Cont(crate::model::ContinuationEvent),
End(crate::model::EndEvent),
Progress(crate::model::ProgressEvent),
Records(crate::model::RecordsEvent),
Stats(crate::model::StatsEvent),
#[non_exhaustive]
Unknown,
}
impl SelectObjectContentEventStream {
pub fn as_cont(&self) -> std::result::Result<&crate::model::ContinuationEvent, &Self> {
if let SelectObjectContentEventStream::Cont(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_cont(&self) -> bool {
self.as_cont().is_ok()
}
pub fn as_end(&self) -> std::result::Result<&crate::model::EndEvent, &Self> {
if let SelectObjectContentEventStream::End(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_end(&self) -> bool {
self.as_end().is_ok()
}
pub fn as_progress(&self) -> std::result::Result<&crate::model::ProgressEvent, &Self> {
if let SelectObjectContentEventStream::Progress(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_progress(&self) -> bool {
self.as_progress().is_ok()
}
pub fn as_records(&self) -> std::result::Result<&crate::model::RecordsEvent, &Self> {
if let SelectObjectContentEventStream::Records(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_records(&self) -> bool {
self.as_records().is_ok()
}
pub fn as_stats(&self) -> std::result::Result<&crate::model::StatsEvent, &Self> {
if let SelectObjectContentEventStream::Stats(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_stats(&self) -> bool {
self.as_stats().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EndEvent {}
impl std::fmt::Debug for EndEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EndEvent");
formatter.finish()
}
}
pub mod end_event {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(self) -> crate::model::EndEvent {
crate::model::EndEvent {}
}
}
}
impl EndEvent {
pub fn builder() -> crate::model::end_event::Builder {
crate::model::end_event::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ContinuationEvent {}
impl std::fmt::Debug for ContinuationEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ContinuationEvent");
formatter.finish()
}
}
pub mod continuation_event {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(self) -> crate::model::ContinuationEvent {
crate::model::ContinuationEvent {}
}
}
}
impl ContinuationEvent {
pub fn builder() -> crate::model::continuation_event::Builder {
crate::model::continuation_event::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProgressEvent {
pub details: std::option::Option<crate::model::Progress>,
}
impl ProgressEvent {
pub fn details(&self) -> std::option::Option<&crate::model::Progress> {
self.details.as_ref()
}
}
impl std::fmt::Debug for ProgressEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ProgressEvent");
formatter.field("details", &self.details);
formatter.finish()
}
}
pub mod progress_event {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) details: std::option::Option<crate::model::Progress>,
}
impl Builder {
pub fn details(mut self, input: crate::model::Progress) -> Self {
self.details = Some(input);
self
}
pub fn set_details(mut self, input: std::option::Option<crate::model::Progress>) -> Self {
self.details = input;
self
}
pub fn build(self) -> crate::model::ProgressEvent {
crate::model::ProgressEvent {
details: self.details,
}
}
}
}
impl ProgressEvent {
pub fn builder() -> crate::model::progress_event::Builder {
crate::model::progress_event::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Progress {
pub bytes_scanned: i64,
pub bytes_processed: i64,
pub bytes_returned: i64,
}
impl Progress {
pub fn bytes_scanned(&self) -> i64 {
self.bytes_scanned
}
pub fn bytes_processed(&self) -> i64 {
self.bytes_processed
}
pub fn bytes_returned(&self) -> i64 {
self.bytes_returned
}
}
impl std::fmt::Debug for Progress {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Progress");
formatter.field("bytes_scanned", &self.bytes_scanned);
formatter.field("bytes_processed", &self.bytes_processed);
formatter.field("bytes_returned", &self.bytes_returned);
formatter.finish()
}
}
pub mod progress {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bytes_scanned: std::option::Option<i64>,
pub(crate) bytes_processed: std::option::Option<i64>,
pub(crate) bytes_returned: std::option::Option<i64>,
}
impl Builder {
pub fn bytes_scanned(mut self, input: i64) -> Self {
self.bytes_scanned = Some(input);
self
}
pub fn set_bytes_scanned(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_scanned = input;
self
}
pub fn bytes_processed(mut self, input: i64) -> Self {
self.bytes_processed = Some(input);
self
}
pub fn set_bytes_processed(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_processed = input;
self
}
pub fn bytes_returned(mut self, input: i64) -> Self {
self.bytes_returned = Some(input);
self
}
pub fn set_bytes_returned(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_returned = input;
self
}
pub fn build(self) -> crate::model::Progress {
crate::model::Progress {
bytes_scanned: self.bytes_scanned.unwrap_or_default(),
bytes_processed: self.bytes_processed.unwrap_or_default(),
bytes_returned: self.bytes_returned.unwrap_or_default(),
}
}
}
}
impl Progress {
pub fn builder() -> crate::model::progress::Builder {
crate::model::progress::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StatsEvent {
pub details: std::option::Option<crate::model::Stats>,
}
impl StatsEvent {
pub fn details(&self) -> std::option::Option<&crate::model::Stats> {
self.details.as_ref()
}
}
impl std::fmt::Debug for StatsEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StatsEvent");
formatter.field("details", &self.details);
formatter.finish()
}
}
pub mod stats_event {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) details: std::option::Option<crate::model::Stats>,
}
impl Builder {
pub fn details(mut self, input: crate::model::Stats) -> Self {
self.details = Some(input);
self
}
pub fn set_details(mut self, input: std::option::Option<crate::model::Stats>) -> Self {
self.details = input;
self
}
pub fn build(self) -> crate::model::StatsEvent {
crate::model::StatsEvent {
details: self.details,
}
}
}
}
impl StatsEvent {
pub fn builder() -> crate::model::stats_event::Builder {
crate::model::stats_event::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Stats {
pub bytes_scanned: i64,
pub bytes_processed: i64,
pub bytes_returned: i64,
}
impl Stats {
pub fn bytes_scanned(&self) -> i64 {
self.bytes_scanned
}
pub fn bytes_processed(&self) -> i64 {
self.bytes_processed
}
pub fn bytes_returned(&self) -> i64 {
self.bytes_returned
}
}
impl std::fmt::Debug for Stats {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Stats");
formatter.field("bytes_scanned", &self.bytes_scanned);
formatter.field("bytes_processed", &self.bytes_processed);
formatter.field("bytes_returned", &self.bytes_returned);
formatter.finish()
}
}
pub mod stats {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bytes_scanned: std::option::Option<i64>,
pub(crate) bytes_processed: std::option::Option<i64>,
pub(crate) bytes_returned: std::option::Option<i64>,
}
impl Builder {
pub fn bytes_scanned(mut self, input: i64) -> Self {
self.bytes_scanned = Some(input);
self
}
pub fn set_bytes_scanned(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_scanned = input;
self
}
pub fn bytes_processed(mut self, input: i64) -> Self {
self.bytes_processed = Some(input);
self
}
pub fn set_bytes_processed(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_processed = input;
self
}
pub fn bytes_returned(mut self, input: i64) -> Self {
self.bytes_returned = Some(input);
self
}
pub fn set_bytes_returned(mut self, input: std::option::Option<i64>) -> Self {
self.bytes_returned = input;
self
}
pub fn build(self) -> crate::model::Stats {
crate::model::Stats {
bytes_scanned: self.bytes_scanned.unwrap_or_default(),
bytes_processed: self.bytes_processed.unwrap_or_default(),
bytes_returned: self.bytes_returned.unwrap_or_default(),
}
}
}
}
impl Stats {
pub fn builder() -> crate::model::stats::Builder {
crate::model::stats::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RecordsEvent {
pub payload: std::option::Option<aws_smithy_types::Blob>,
}
impl RecordsEvent {
pub fn payload(&self) -> std::option::Option<&aws_smithy_types::Blob> {
self.payload.as_ref()
}
}
impl std::fmt::Debug for RecordsEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RecordsEvent");
formatter.field("payload", &self.payload);
formatter.finish()
}
}
pub mod records_event {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) payload: std::option::Option<aws_smithy_types::Blob>,
}
impl Builder {
pub fn payload(mut self, input: aws_smithy_types::Blob) -> Self {
self.payload = Some(input);
self
}
pub fn set_payload(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
self.payload = input;
self
}
pub fn build(self) -> crate::model::RecordsEvent {
crate::model::RecordsEvent {
payload: self.payload,
}
}
}
}
impl RecordsEvent {
pub fn builder() -> crate::model::records_event::Builder {
crate::model::records_event::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ScanRange {
pub start: i64,
pub end: i64,
}
impl ScanRange {
pub fn start(&self) -> i64 {
self.start
}
pub fn end(&self) -> i64 {
self.end
}
}
impl std::fmt::Debug for ScanRange {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ScanRange");
formatter.field("start", &self.start);
formatter.field("end", &self.end);
formatter.finish()
}
}
pub mod scan_range {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) start: std::option::Option<i64>,
pub(crate) end: std::option::Option<i64>,
}
impl Builder {
pub fn start(mut self, input: i64) -> Self {
self.start = Some(input);
self
}
pub fn set_start(mut self, input: std::option::Option<i64>) -> Self {
self.start = input;
self
}
pub fn end(mut self, input: i64) -> Self {
self.end = Some(input);
self
}
pub fn set_end(mut self, input: std::option::Option<i64>) -> Self {
self.end = input;
self
}
pub fn build(self) -> crate::model::ScanRange {
crate::model::ScanRange {
start: self.start.unwrap_or_default(),
end: self.end.unwrap_or_default(),
}
}
}
}
impl ScanRange {
pub fn builder() -> crate::model::scan_range::Builder {
crate::model::scan_range::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputSerialization {
pub csv: std::option::Option<crate::model::CsvOutput>,
pub json: std::option::Option<crate::model::JsonOutput>,
}
impl OutputSerialization {
pub fn csv(&self) -> std::option::Option<&crate::model::CsvOutput> {
self.csv.as_ref()
}
pub fn json(&self) -> std::option::Option<&crate::model::JsonOutput> {
self.json.as_ref()
}
}
impl std::fmt::Debug for OutputSerialization {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputSerialization");
formatter.field("csv", &self.csv);
formatter.field("json", &self.json);
formatter.finish()
}
}
pub mod output_serialization {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) csv: std::option::Option<crate::model::CsvOutput>,
pub(crate) json: std::option::Option<crate::model::JsonOutput>,
}
impl Builder {
pub fn csv(mut self, input: crate::model::CsvOutput) -> Self {
self.csv = Some(input);
self
}
pub fn set_csv(mut self, input: std::option::Option<crate::model::CsvOutput>) -> Self {
self.csv = input;
self
}
pub fn json(mut self, input: crate::model::JsonOutput) -> Self {
self.json = Some(input);
self
}
pub fn set_json(mut self, input: std::option::Option<crate::model::JsonOutput>) -> Self {
self.json = input;
self
}
pub fn build(self) -> crate::model::OutputSerialization {
crate::model::OutputSerialization {
csv: self.csv,
json: self.json,
}
}
}
}
impl OutputSerialization {
pub fn builder() -> crate::model::output_serialization::Builder {
crate::model::output_serialization::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JsonOutput {
pub record_delimiter: std::option::Option<std::string::String>,
}
impl JsonOutput {
pub fn record_delimiter(&self) -> std::option::Option<&str> {
self.record_delimiter.as_deref()
}
}
impl std::fmt::Debug for JsonOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JsonOutput");
formatter.field("record_delimiter", &self.record_delimiter);
formatter.finish()
}
}
pub mod json_output {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) record_delimiter: std::option::Option<std::string::String>,
}
impl Builder {
pub fn record_delimiter(mut self, input: impl Into<std::string::String>) -> Self {
self.record_delimiter = Some(input.into());
self
}
pub fn set_record_delimiter(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.record_delimiter = input;
self
}
pub fn build(self) -> crate::model::JsonOutput {
crate::model::JsonOutput {
record_delimiter: self.record_delimiter,
}
}
}
}
impl JsonOutput {
pub fn builder() -> crate::model::json_output::Builder {
crate::model::json_output::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CsvOutput {
pub quote_fields: std::option::Option<crate::model::QuoteFields>,
pub quote_escape_character: std::option::Option<std::string::String>,
pub record_delimiter: std::option::Option<std::string::String>,
pub field_delimiter: std::option::Option<std::string::String>,
pub quote_character: std::option::Option<std::string::String>,
}
impl CsvOutput {
pub fn quote_fields(&self) -> std::option::Option<&crate::model::QuoteFields> {
self.quote_fields.as_ref()
}
pub fn quote_escape_character(&self) -> std::option::Option<&str> {
self.quote_escape_character.as_deref()
}
pub fn record_delimiter(&self) -> std::option::Option<&str> {
self.record_delimiter.as_deref()
}
pub fn field_delimiter(&self) -> std::option::Option<&str> {
self.field_delimiter.as_deref()
}
pub fn quote_character(&self) -> std::option::Option<&str> {
self.quote_character.as_deref()
}
}
impl std::fmt::Debug for CsvOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CsvOutput");
formatter.field("quote_fields", &self.quote_fields);
formatter.field("quote_escape_character", &self.quote_escape_character);
formatter.field("record_delimiter", &self.record_delimiter);
formatter.field("field_delimiter", &self.field_delimiter);
formatter.field("quote_character", &self.quote_character);
formatter.finish()
}
}
pub mod csv_output {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) quote_fields: std::option::Option<crate::model::QuoteFields>,
pub(crate) quote_escape_character: std::option::Option<std::string::String>,
pub(crate) record_delimiter: std::option::Option<std::string::String>,
pub(crate) field_delimiter: std::option::Option<std::string::String>,
pub(crate) quote_character: std::option::Option<std::string::String>,
}
impl Builder {
pub fn quote_fields(mut self, input: crate::model::QuoteFields) -> Self {
self.quote_fields = Some(input);
self
}
pub fn set_quote_fields(
mut self,
input: std::option::Option<crate::model::QuoteFields>,
) -> Self {
self.quote_fields = input;
self
}
pub fn quote_escape_character(mut self, input: impl Into<std::string::String>) -> Self {
self.quote_escape_character = Some(input.into());
self
}
pub fn set_quote_escape_character(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.quote_escape_character = input;
self
}
pub fn record_delimiter(mut self, input: impl Into<std::string::String>) -> Self {
self.record_delimiter = Some(input.into());
self
}
pub fn set_record_delimiter(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.record_delimiter = input;
self
}
pub fn field_delimiter(mut self, input: impl Into<std::string::String>) -> Self {
self.field_delimiter = Some(input.into());
self
}
pub fn set_field_delimiter(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.field_delimiter = input;
self
}
pub fn quote_character(mut self, input: impl Into<std::string::String>) -> Self {
self.quote_character = Some(input.into());
self
}
pub fn set_quote_character(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.quote_character = input;
self
}
pub fn build(self) -> crate::model::CsvOutput {
crate::model::CsvOutput {
quote_fields: self.quote_fields,
quote_escape_character: self.quote_escape_character,
record_delimiter: self.record_delimiter,
field_delimiter: self.field_delimiter,
quote_character: self.quote_character,
}
}
}
}
impl CsvOutput {
pub fn builder() -> crate::model::csv_output::Builder {
crate::model::csv_output::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 QuoteFields {
#[allow(missing_docs)] Always,
#[allow(missing_docs)] Asneeded,
Unknown(String),
}
impl std::convert::From<&str> for QuoteFields {
fn from(s: &str) -> Self {
match s {
"ALWAYS" => QuoteFields::Always,
"ASNEEDED" => QuoteFields::Asneeded,
other => QuoteFields::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for QuoteFields {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(QuoteFields::from(s))
}
}
impl QuoteFields {
pub fn as_str(&self) -> &str {
match self {
QuoteFields::Always => "ALWAYS",
QuoteFields::Asneeded => "ASNEEDED",
QuoteFields::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ALWAYS", "ASNEEDED"]
}
}
impl AsRef<str> for QuoteFields {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputSerialization {
pub csv: std::option::Option<crate::model::CsvInput>,
pub compression_type: std::option::Option<crate::model::CompressionType>,
pub json: std::option::Option<crate::model::JsonInput>,
pub parquet: std::option::Option<crate::model::ParquetInput>,
}
impl InputSerialization {
pub fn csv(&self) -> std::option::Option<&crate::model::CsvInput> {
self.csv.as_ref()
}
pub fn compression_type(&self) -> std::option::Option<&crate::model::CompressionType> {
self.compression_type.as_ref()
}
pub fn json(&self) -> std::option::Option<&crate::model::JsonInput> {
self.json.as_ref()
}
pub fn parquet(&self) -> std::option::Option<&crate::model::ParquetInput> {
self.parquet.as_ref()
}
}
impl std::fmt::Debug for InputSerialization {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InputSerialization");
formatter.field("csv", &self.csv);
formatter.field("compression_type", &self.compression_type);
formatter.field("json", &self.json);
formatter.field("parquet", &self.parquet);
formatter.finish()
}
}
pub mod input_serialization {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) csv: std::option::Option<crate::model::CsvInput>,
pub(crate) compression_type: std::option::Option<crate::model::CompressionType>,
pub(crate) json: std::option::Option<crate::model::JsonInput>,
pub(crate) parquet: std::option::Option<crate::model::ParquetInput>,
}
impl Builder {
pub fn csv(mut self, input: crate::model::CsvInput) -> Self {
self.csv = Some(input);
self
}
pub fn set_csv(mut self, input: std::option::Option<crate::model::CsvInput>) -> Self {
self.csv = input;
self
}
pub fn compression_type(mut self, input: crate::model::CompressionType) -> Self {
self.compression_type = Some(input);
self
}
pub fn set_compression_type(
mut self,
input: std::option::Option<crate::model::CompressionType>,
) -> Self {
self.compression_type = input;
self
}
pub fn json(mut self, input: crate::model::JsonInput) -> Self {
self.json = Some(input);
self
}
pub fn set_json(mut self, input: std::option::Option<crate::model::JsonInput>) -> Self {
self.json = input;
self
}
pub fn parquet(mut self, input: crate::model::ParquetInput) -> Self {
self.parquet = Some(input);
self
}
pub fn set_parquet(
mut self,
input: std::option::Option<crate::model::ParquetInput>,
) -> Self {
self.parquet = input;
self
}
pub fn build(self) -> crate::model::InputSerialization {
crate::model::InputSerialization {
csv: self.csv,
compression_type: self.compression_type,
json: self.json,
parquet: self.parquet,
}
}
}
}
impl InputSerialization {
pub fn builder() -> crate::model::input_serialization::Builder {
crate::model::input_serialization::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ParquetInput {}
impl std::fmt::Debug for ParquetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ParquetInput");
formatter.finish()
}
}
pub mod parquet_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(self) -> crate::model::ParquetInput {
crate::model::ParquetInput {}
}
}
}
impl ParquetInput {
pub fn builder() -> crate::model::parquet_input::Builder {
crate::model::parquet_input::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JsonInput {
pub r#type: std::option::Option<crate::model::JsonType>,
}
impl JsonInput {
pub fn r#type(&self) -> std::option::Option<&crate::model::JsonType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for JsonInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JsonInput");
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
pub mod json_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::JsonType>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::JsonType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::JsonType>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::JsonInput {
crate::model::JsonInput {
r#type: self.r#type,
}
}
}
}
impl JsonInput {
pub fn builder() -> crate::model::json_input::Builder {
crate::model::json_input::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 JsonType {
#[allow(missing_docs)] Document,
#[allow(missing_docs)] Lines,
Unknown(String),
}
impl std::convert::From<&str> for JsonType {
fn from(s: &str) -> Self {
match s {
"DOCUMENT" => JsonType::Document,
"LINES" => JsonType::Lines,
other => JsonType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JsonType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JsonType::from(s))
}
}
impl JsonType {
pub fn as_str(&self) -> &str {
match self {
JsonType::Document => "DOCUMENT",
JsonType::Lines => "LINES",
JsonType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DOCUMENT", "LINES"]
}
}
impl AsRef<str> for JsonType {
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 CompressionType {
#[allow(missing_docs)] Bzip2,
#[allow(missing_docs)] Gzip,
#[allow(missing_docs)] None,
Unknown(String),
}
impl std::convert::From<&str> for CompressionType {
fn from(s: &str) -> Self {
match s {
"BZIP2" => CompressionType::Bzip2,
"GZIP" => CompressionType::Gzip,
"NONE" => CompressionType::None,
other => CompressionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CompressionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CompressionType::from(s))
}
}
impl CompressionType {
pub fn as_str(&self) -> &str {
match self {
CompressionType::Bzip2 => "BZIP2",
CompressionType::Gzip => "GZIP",
CompressionType::None => "NONE",
CompressionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BZIP2", "GZIP", "NONE"]
}
}
impl AsRef<str> for CompressionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CsvInput {
pub file_header_info: std::option::Option<crate::model::FileHeaderInfo>,
pub comments: std::option::Option<std::string::String>,
pub quote_escape_character: std::option::Option<std::string::String>,
pub record_delimiter: std::option::Option<std::string::String>,
pub field_delimiter: std::option::Option<std::string::String>,
pub quote_character: std::option::Option<std::string::String>,
pub allow_quoted_record_delimiter: bool,
}
impl CsvInput {
pub fn file_header_info(&self) -> std::option::Option<&crate::model::FileHeaderInfo> {
self.file_header_info.as_ref()
}
pub fn comments(&self) -> std::option::Option<&str> {
self.comments.as_deref()
}
pub fn quote_escape_character(&self) -> std::option::Option<&str> {
self.quote_escape_character.as_deref()
}
pub fn record_delimiter(&self) -> std::option::Option<&str> {
self.record_delimiter.as_deref()
}
pub fn field_delimiter(&self) -> std::option::Option<&str> {
self.field_delimiter.as_deref()
}
pub fn quote_character(&self) -> std::option::Option<&str> {
self.quote_character.as_deref()
}
pub fn allow_quoted_record_delimiter(&self) -> bool {
self.allow_quoted_record_delimiter
}
}
impl std::fmt::Debug for CsvInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CsvInput");
formatter.field("file_header_info", &self.file_header_info);
formatter.field("comments", &self.comments);
formatter.field("quote_escape_character", &self.quote_escape_character);
formatter.field("record_delimiter", &self.record_delimiter);
formatter.field("field_delimiter", &self.field_delimiter);
formatter.field("quote_character", &self.quote_character);
formatter.field(
"allow_quoted_record_delimiter",
&self.allow_quoted_record_delimiter,
);
formatter.finish()
}
}
pub mod csv_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) file_header_info: std::option::Option<crate::model::FileHeaderInfo>,
pub(crate) comments: std::option::Option<std::string::String>,
pub(crate) quote_escape_character: std::option::Option<std::string::String>,
pub(crate) record_delimiter: std::option::Option<std::string::String>,
pub(crate) field_delimiter: std::option::Option<std::string::String>,
pub(crate) quote_character: std::option::Option<std::string::String>,
pub(crate) allow_quoted_record_delimiter: std::option::Option<bool>,
}
impl Builder {
pub fn file_header_info(mut self, input: crate::model::FileHeaderInfo) -> Self {
self.file_header_info = Some(input);
self
}
pub fn set_file_header_info(
mut self,
input: std::option::Option<crate::model::FileHeaderInfo>,
) -> Self {
self.file_header_info = input;
self
}
pub fn comments(mut self, input: impl Into<std::string::String>) -> Self {
self.comments = Some(input.into());
self
}
pub fn set_comments(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comments = input;
self
}
pub fn quote_escape_character(mut self, input: impl Into<std::string::String>) -> Self {
self.quote_escape_character = Some(input.into());
self
}
pub fn set_quote_escape_character(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.quote_escape_character = input;
self
}
pub fn record_delimiter(mut self, input: impl Into<std::string::String>) -> Self {
self.record_delimiter = Some(input.into());
self
}
pub fn set_record_delimiter(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.record_delimiter = input;
self
}
pub fn field_delimiter(mut self, input: impl Into<std::string::String>) -> Self {
self.field_delimiter = Some(input.into());
self
}
pub fn set_field_delimiter(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.field_delimiter = input;
self
}
pub fn quote_character(mut self, input: impl Into<std::string::String>) -> Self {
self.quote_character = Some(input.into());
self
}
pub fn set_quote_character(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.quote_character = input;
self
}
pub fn allow_quoted_record_delimiter(mut self, input: bool) -> Self {
self.allow_quoted_record_delimiter = Some(input);
self
}
pub fn set_allow_quoted_record_delimiter(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.allow_quoted_record_delimiter = input;
self
}
pub fn build(self) -> crate::model::CsvInput {
crate::model::CsvInput {
file_header_info: self.file_header_info,
comments: self.comments,
quote_escape_character: self.quote_escape_character,
record_delimiter: self.record_delimiter,
field_delimiter: self.field_delimiter,
quote_character: self.quote_character,
allow_quoted_record_delimiter: self
.allow_quoted_record_delimiter
.unwrap_or_default(),
}
}
}
}
impl CsvInput {
pub fn builder() -> crate::model::csv_input::Builder {
crate::model::csv_input::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 FileHeaderInfo {
#[allow(missing_docs)] Ignore,
#[allow(missing_docs)] None,
#[allow(missing_docs)] Use,
Unknown(String),
}
impl std::convert::From<&str> for FileHeaderInfo {
fn from(s: &str) -> Self {
match s {
"IGNORE" => FileHeaderInfo::Ignore,
"NONE" => FileHeaderInfo::None,
"USE" => FileHeaderInfo::Use,
other => FileHeaderInfo::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FileHeaderInfo {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FileHeaderInfo::from(s))
}
}
impl FileHeaderInfo {
pub fn as_str(&self) -> &str {
match self {
FileHeaderInfo::Ignore => "IGNORE",
FileHeaderInfo::None => "NONE",
FileHeaderInfo::Use => "USE",
FileHeaderInfo::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["IGNORE", "NONE", "USE"]
}
}
impl AsRef<str> for FileHeaderInfo {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RequestProgress {
pub enabled: bool,
}
impl RequestProgress {
pub fn enabled(&self) -> bool {
self.enabled
}
}
impl std::fmt::Debug for RequestProgress {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RequestProgress");
formatter.field("enabled", &self.enabled);
formatter.finish()
}
}
pub mod request_progress {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) enabled: std::option::Option<bool>,
}
impl Builder {
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = Some(input);
self
}
pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
pub fn build(self) -> crate::model::RequestProgress {
crate::model::RequestProgress {
enabled: self.enabled.unwrap_or_default(),
}
}
}
}
impl RequestProgress {
pub fn builder() -> crate::model::request_progress::Builder {
crate::model::request_progress::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 ExpressionType {
#[allow(missing_docs)] Sql,
Unknown(String),
}
impl std::convert::From<&str> for ExpressionType {
fn from(s: &str) -> Self {
match s {
"SQL" => ExpressionType::Sql,
other => ExpressionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ExpressionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExpressionType::from(s))
}
}
impl ExpressionType {
pub fn as_str(&self) -> &str {
match self {
ExpressionType::Sql => "SQL",
ExpressionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["SQL"]
}
}
impl AsRef<str> for ExpressionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RestoreRequest {
pub days: i32,
pub glacier_job_parameters: std::option::Option<crate::model::GlacierJobParameters>,
pub r#type: std::option::Option<crate::model::RestoreRequestType>,
pub tier: std::option::Option<crate::model::Tier>,
pub description: std::option::Option<std::string::String>,
pub select_parameters: std::option::Option<crate::model::SelectParameters>,
pub output_location: std::option::Option<crate::model::OutputLocation>,
}
impl RestoreRequest {
pub fn days(&self) -> i32 {
self.days
}
pub fn glacier_job_parameters(
&self,
) -> std::option::Option<&crate::model::GlacierJobParameters> {
self.glacier_job_parameters.as_ref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::RestoreRequestType> {
self.r#type.as_ref()
}
pub fn tier(&self) -> std::option::Option<&crate::model::Tier> {
self.tier.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn select_parameters(&self) -> std::option::Option<&crate::model::SelectParameters> {
self.select_parameters.as_ref()
}
pub fn output_location(&self) -> std::option::Option<&crate::model::OutputLocation> {
self.output_location.as_ref()
}
}
impl std::fmt::Debug for RestoreRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RestoreRequest");
formatter.field("days", &self.days);
formatter.field("glacier_job_parameters", &self.glacier_job_parameters);
formatter.field("r#type", &self.r#type);
formatter.field("tier", &self.tier);
formatter.field("description", &self.description);
formatter.field("select_parameters", &self.select_parameters);
formatter.field("output_location", &self.output_location);
formatter.finish()
}
}
pub mod restore_request {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) days: std::option::Option<i32>,
pub(crate) glacier_job_parameters: std::option::Option<crate::model::GlacierJobParameters>,
pub(crate) r#type: std::option::Option<crate::model::RestoreRequestType>,
pub(crate) tier: std::option::Option<crate::model::Tier>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) select_parameters: std::option::Option<crate::model::SelectParameters>,
pub(crate) output_location: std::option::Option<crate::model::OutputLocation>,
}
impl Builder {
pub fn days(mut self, input: i32) -> Self {
self.days = Some(input);
self
}
pub fn set_days(mut self, input: std::option::Option<i32>) -> Self {
self.days = input;
self
}
pub fn glacier_job_parameters(mut self, input: crate::model::GlacierJobParameters) -> Self {
self.glacier_job_parameters = Some(input);
self
}
pub fn set_glacier_job_parameters(
mut self,
input: std::option::Option<crate::model::GlacierJobParameters>,
) -> Self {
self.glacier_job_parameters = input;
self
}
pub fn r#type(mut self, input: crate::model::RestoreRequestType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::RestoreRequestType>,
) -> Self {
self.r#type = input;
self
}
pub fn tier(mut self, input: crate::model::Tier) -> Self {
self.tier = Some(input);
self
}
pub fn set_tier(mut self, input: std::option::Option<crate::model::Tier>) -> Self {
self.tier = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn select_parameters(mut self, input: crate::model::SelectParameters) -> Self {
self.select_parameters = Some(input);
self
}
pub fn set_select_parameters(
mut self,
input: std::option::Option<crate::model::SelectParameters>,
) -> Self {
self.select_parameters = input;
self
}
pub fn output_location(mut self, input: crate::model::OutputLocation) -> Self {
self.output_location = Some(input);
self
}
pub fn set_output_location(
mut self,
input: std::option::Option<crate::model::OutputLocation>,
) -> Self {
self.output_location = input;
self
}
pub fn build(self) -> crate::model::RestoreRequest {
crate::model::RestoreRequest {
days: self.days.unwrap_or_default(),
glacier_job_parameters: self.glacier_job_parameters,
r#type: self.r#type,
tier: self.tier,
description: self.description,
select_parameters: self.select_parameters,
output_location: self.output_location,
}
}
}
}
impl RestoreRequest {
pub fn builder() -> crate::model::restore_request::Builder {
crate::model::restore_request::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputLocation {
pub s3: std::option::Option<crate::model::S3Location>,
}
impl OutputLocation {
pub fn s3(&self) -> std::option::Option<&crate::model::S3Location> {
self.s3.as_ref()
}
}
impl std::fmt::Debug for OutputLocation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputLocation");
formatter.field("s3", &self.s3);
formatter.finish()
}
}
pub mod output_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3: std::option::Option<crate::model::S3Location>,
}
impl Builder {
pub fn s3(mut self, input: crate::model::S3Location) -> Self {
self.s3 = Some(input);
self
}
pub fn set_s3(mut self, input: std::option::Option<crate::model::S3Location>) -> Self {
self.s3 = input;
self
}
pub fn build(self) -> crate::model::OutputLocation {
crate::model::OutputLocation { s3: self.s3 }
}
}
}
impl OutputLocation {
pub fn builder() -> crate::model::output_location::Builder {
crate::model::output_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Location {
pub bucket_name: std::option::Option<std::string::String>,
pub prefix: std::option::Option<std::string::String>,
pub encryption: std::option::Option<crate::model::Encryption>,
pub canned_acl: std::option::Option<crate::model::ObjectCannedAcl>,
pub access_control_list: std::option::Option<std::vec::Vec<crate::model::Grant>>,
pub tagging: std::option::Option<crate::model::Tagging>,
pub user_metadata: std::option::Option<std::vec::Vec<crate::model::MetadataEntry>>,
pub storage_class: std::option::Option<crate::model::StorageClass>,
}
impl S3Location {
pub fn bucket_name(&self) -> std::option::Option<&str> {
self.bucket_name.as_deref()
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn encryption(&self) -> std::option::Option<&crate::model::Encryption> {
self.encryption.as_ref()
}
pub fn canned_acl(&self) -> std::option::Option<&crate::model::ObjectCannedAcl> {
self.canned_acl.as_ref()
}
pub fn access_control_list(&self) -> std::option::Option<&[crate::model::Grant]> {
self.access_control_list.as_deref()
}
pub fn tagging(&self) -> std::option::Option<&crate::model::Tagging> {
self.tagging.as_ref()
}
pub fn user_metadata(&self) -> std::option::Option<&[crate::model::MetadataEntry]> {
self.user_metadata.as_deref()
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::StorageClass> {
self.storage_class.as_ref()
}
}
impl std::fmt::Debug for S3Location {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3Location");
formatter.field("bucket_name", &self.bucket_name);
formatter.field("prefix", &self.prefix);
formatter.field("encryption", &self.encryption);
formatter.field("canned_acl", &self.canned_acl);
formatter.field("access_control_list", &self.access_control_list);
formatter.field("tagging", &self.tagging);
formatter.field("user_metadata", &self.user_metadata);
formatter.field("storage_class", &self.storage_class);
formatter.finish()
}
}
pub mod s3_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket_name: std::option::Option<std::string::String>,
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) encryption: std::option::Option<crate::model::Encryption>,
pub(crate) canned_acl: std::option::Option<crate::model::ObjectCannedAcl>,
pub(crate) access_control_list: std::option::Option<std::vec::Vec<crate::model::Grant>>,
pub(crate) tagging: std::option::Option<crate::model::Tagging>,
pub(crate) user_metadata: std::option::Option<std::vec::Vec<crate::model::MetadataEntry>>,
pub(crate) storage_class: std::option::Option<crate::model::StorageClass>,
}
impl Builder {
pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_name = Some(input.into());
self
}
pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket_name = 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 encryption(mut self, input: crate::model::Encryption) -> Self {
self.encryption = Some(input);
self
}
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::Encryption>,
) -> Self {
self.encryption = input;
self
}
pub fn canned_acl(mut self, input: crate::model::ObjectCannedAcl) -> Self {
self.canned_acl = Some(input);
self
}
pub fn set_canned_acl(
mut self,
input: std::option::Option<crate::model::ObjectCannedAcl>,
) -> Self {
self.canned_acl = input;
self
}
pub fn access_control_list(mut self, input: impl Into<crate::model::Grant>) -> Self {
let mut v = self.access_control_list.unwrap_or_default();
v.push(input.into());
self.access_control_list = Some(v);
self
}
pub fn set_access_control_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Grant>>,
) -> Self {
self.access_control_list = input;
self
}
pub fn tagging(mut self, input: crate::model::Tagging) -> Self {
self.tagging = Some(input);
self
}
pub fn set_tagging(mut self, input: std::option::Option<crate::model::Tagging>) -> Self {
self.tagging = input;
self
}
pub fn user_metadata(mut self, input: impl Into<crate::model::MetadataEntry>) -> Self {
let mut v = self.user_metadata.unwrap_or_default();
v.push(input.into());
self.user_metadata = Some(v);
self
}
pub fn set_user_metadata(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MetadataEntry>>,
) -> Self {
self.user_metadata = input;
self
}
pub fn storage_class(mut self, input: crate::model::StorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::StorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn build(self) -> crate::model::S3Location {
crate::model::S3Location {
bucket_name: self.bucket_name,
prefix: self.prefix,
encryption: self.encryption,
canned_acl: self.canned_acl,
access_control_list: self.access_control_list,
tagging: self.tagging,
user_metadata: self.user_metadata,
storage_class: self.storage_class,
}
}
}
}
impl S3Location {
pub fn builder() -> crate::model::s3_location::Builder {
crate::model::s3_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetadataEntry {
pub name: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl MetadataEntry {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for MetadataEntry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MetadataEntry");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod metadata_entry {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::MetadataEntry {
crate::model::MetadataEntry {
name: self.name,
value: self.value,
}
}
}
}
impl MetadataEntry {
pub fn builder() -> crate::model::metadata_entry::Builder {
crate::model::metadata_entry::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tagging {
pub tag_set: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Tagging {
pub fn tag_set(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tag_set.as_deref()
}
}
impl std::fmt::Debug for Tagging {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tagging");
formatter.field("tag_set", &self.tag_set);
formatter.finish()
}
}
pub mod tagging {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tag_set: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn tag_set(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tag_set.unwrap_or_default();
v.push(input.into());
self.tag_set = Some(v);
self
}
pub fn set_tag_set(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tag_set = input;
self
}
pub fn build(self) -> crate::model::Tagging {
crate::model::Tagging {
tag_set: self.tag_set,
}
}
}
}
impl Tagging {
pub fn builder() -> crate::model::tagging::Builder {
crate::model::tagging::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
pub key: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl Tag {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for Tag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tag");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod tag {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
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 value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::Tag {
crate::model::Tag {
key: self.key,
value: self.value,
}
}
}
}
impl Tag {
pub fn builder() -> crate::model::tag::Builder {
crate::model::tag::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Grant {
pub grantee: std::option::Option<crate::model::Grantee>,
pub permission: std::option::Option<crate::model::Permission>,
}
impl Grant {
pub fn grantee(&self) -> std::option::Option<&crate::model::Grantee> {
self.grantee.as_ref()
}
pub fn permission(&self) -> std::option::Option<&crate::model::Permission> {
self.permission.as_ref()
}
}
impl std::fmt::Debug for Grant {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Grant");
formatter.field("grantee", &self.grantee);
formatter.field("permission", &self.permission);
formatter.finish()
}
}
pub mod grant {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) grantee: std::option::Option<crate::model::Grantee>,
pub(crate) permission: std::option::Option<crate::model::Permission>,
}
impl Builder {
pub fn grantee(mut self, input: crate::model::Grantee) -> Self {
self.grantee = Some(input);
self
}
pub fn set_grantee(mut self, input: std::option::Option<crate::model::Grantee>) -> Self {
self.grantee = input;
self
}
pub fn permission(mut self, input: crate::model::Permission) -> Self {
self.permission = Some(input);
self
}
pub fn set_permission(
mut self,
input: std::option::Option<crate::model::Permission>,
) -> Self {
self.permission = input;
self
}
pub fn build(self) -> crate::model::Grant {
crate::model::Grant {
grantee: self.grantee,
permission: self.permission,
}
}
}
}
impl Grant {
pub fn builder() -> crate::model::grant::Builder {
crate::model::grant::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 Permission {
#[allow(missing_docs)] FullControl,
#[allow(missing_docs)] Read,
#[allow(missing_docs)] ReadAcp,
#[allow(missing_docs)] Write,
#[allow(missing_docs)] WriteAcp,
Unknown(String),
}
impl std::convert::From<&str> for Permission {
fn from(s: &str) -> Self {
match s {
"FULL_CONTROL" => Permission::FullControl,
"READ" => Permission::Read,
"READ_ACP" => Permission::ReadAcp,
"WRITE" => Permission::Write,
"WRITE_ACP" => Permission::WriteAcp,
other => Permission::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Permission {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Permission::from(s))
}
}
impl Permission {
pub fn as_str(&self) -> &str {
match self {
Permission::FullControl => "FULL_CONTROL",
Permission::Read => "READ",
Permission::ReadAcp => "READ_ACP",
Permission::Write => "WRITE",
Permission::WriteAcp => "WRITE_ACP",
Permission::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FULL_CONTROL", "READ", "READ_ACP", "WRITE", "WRITE_ACP"]
}
}
impl AsRef<str> for Permission {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Grantee {
pub display_name: std::option::Option<std::string::String>,
pub email_address: std::option::Option<std::string::String>,
pub id: std::option::Option<std::string::String>,
pub uri: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::Type>,
}
impl Grantee {
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn email_address(&self) -> std::option::Option<&str> {
self.email_address.as_deref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn uri(&self) -> std::option::Option<&str> {
self.uri.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for Grantee {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Grantee");
formatter.field("display_name", &self.display_name);
formatter.field("email_address", &self.email_address);
formatter.field("id", &self.id);
formatter.field("uri", &self.uri);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
pub mod grantee {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) email_address: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) uri: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.email_address = Some(input.into());
self
}
pub fn set_email_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.email_address = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn uri(mut self, input: impl Into<std::string::String>) -> Self {
self.uri = Some(input.into());
self
}
pub fn set_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.uri = input;
self
}
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::Grantee {
crate::model::Grantee {
display_name: self.display_name,
email_address: self.email_address,
id: self.id,
uri: self.uri,
r#type: self.r#type,
}
}
}
}
impl Grantee {
pub fn builder() -> crate::model::grantee::Builder {
crate::model::grantee::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 Type {
#[allow(missing_docs)] AmazonCustomerByEmail,
#[allow(missing_docs)] CanonicalUser,
#[allow(missing_docs)] Group,
Unknown(String),
}
impl std::convert::From<&str> for Type {
fn from(s: &str) -> Self {
match s {
"AmazonCustomerByEmail" => Type::AmazonCustomerByEmail,
"CanonicalUser" => Type::CanonicalUser,
"Group" => Type::Group,
other => Type::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Type {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Type::from(s))
}
}
impl Type {
pub fn as_str(&self) -> &str {
match self {
Type::AmazonCustomerByEmail => "AmazonCustomerByEmail",
Type::CanonicalUser => "CanonicalUser",
Type::Group => "Group",
Type::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AmazonCustomerByEmail", "CanonicalUser", "Group"]
}
}
impl AsRef<str> for Type {
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 ObjectCannedAcl {
#[allow(missing_docs)] AuthenticatedRead,
#[allow(missing_docs)] AwsExecRead,
#[allow(missing_docs)] BucketOwnerFullControl,
#[allow(missing_docs)] BucketOwnerRead,
#[allow(missing_docs)] Private,
#[allow(missing_docs)] PublicRead,
#[allow(missing_docs)] PublicReadWrite,
Unknown(String),
}
impl std::convert::From<&str> for ObjectCannedAcl {
fn from(s: &str) -> Self {
match s {
"authenticated-read" => ObjectCannedAcl::AuthenticatedRead,
"aws-exec-read" => ObjectCannedAcl::AwsExecRead,
"bucket-owner-full-control" => ObjectCannedAcl::BucketOwnerFullControl,
"bucket-owner-read" => ObjectCannedAcl::BucketOwnerRead,
"private" => ObjectCannedAcl::Private,
"public-read" => ObjectCannedAcl::PublicRead,
"public-read-write" => ObjectCannedAcl::PublicReadWrite,
other => ObjectCannedAcl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectCannedAcl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectCannedAcl::from(s))
}
}
impl ObjectCannedAcl {
pub fn as_str(&self) -> &str {
match self {
ObjectCannedAcl::AuthenticatedRead => "authenticated-read",
ObjectCannedAcl::AwsExecRead => "aws-exec-read",
ObjectCannedAcl::BucketOwnerFullControl => "bucket-owner-full-control",
ObjectCannedAcl::BucketOwnerRead => "bucket-owner-read",
ObjectCannedAcl::Private => "private",
ObjectCannedAcl::PublicRead => "public-read",
ObjectCannedAcl::PublicReadWrite => "public-read-write",
ObjectCannedAcl::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"authenticated-read",
"aws-exec-read",
"bucket-owner-full-control",
"bucket-owner-read",
"private",
"public-read",
"public-read-write",
]
}
}
impl AsRef<str> for ObjectCannedAcl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Encryption {
pub encryption_type: std::option::Option<crate::model::ServerSideEncryption>,
pub kms_key_id: std::option::Option<std::string::String>,
pub kms_context: std::option::Option<std::string::String>,
}
impl Encryption {
pub fn encryption_type(&self) -> std::option::Option<&crate::model::ServerSideEncryption> {
self.encryption_type.as_ref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn kms_context(&self) -> std::option::Option<&str> {
self.kms_context.as_deref()
}
}
impl std::fmt::Debug for Encryption {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Encryption");
formatter.field("encryption_type", &self.encryption_type);
formatter.field("kms_key_id", &"*** Sensitive Data Redacted ***");
formatter.field("kms_context", &self.kms_context);
formatter.finish()
}
}
pub mod encryption {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) encryption_type: std::option::Option<crate::model::ServerSideEncryption>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) kms_context: std::option::Option<std::string::String>,
}
impl Builder {
pub fn encryption_type(mut self, input: crate::model::ServerSideEncryption) -> Self {
self.encryption_type = Some(input);
self
}
pub fn set_encryption_type(
mut self,
input: std::option::Option<crate::model::ServerSideEncryption>,
) -> Self {
self.encryption_type = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn kms_context(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_context = Some(input.into());
self
}
pub fn set_kms_context(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_context = input;
self
}
pub fn build(self) -> crate::model::Encryption {
crate::model::Encryption {
encryption_type: self.encryption_type,
kms_key_id: self.kms_key_id,
kms_context: self.kms_context,
}
}
}
}
impl Encryption {
pub fn builder() -> crate::model::encryption::Builder {
crate::model::encryption::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SelectParameters {
pub input_serialization: std::option::Option<crate::model::InputSerialization>,
pub expression_type: std::option::Option<crate::model::ExpressionType>,
pub expression: std::option::Option<std::string::String>,
pub output_serialization: std::option::Option<crate::model::OutputSerialization>,
}
impl SelectParameters {
pub fn input_serialization(&self) -> std::option::Option<&crate::model::InputSerialization> {
self.input_serialization.as_ref()
}
pub fn expression_type(&self) -> std::option::Option<&crate::model::ExpressionType> {
self.expression_type.as_ref()
}
pub fn expression(&self) -> std::option::Option<&str> {
self.expression.as_deref()
}
pub fn output_serialization(&self) -> std::option::Option<&crate::model::OutputSerialization> {
self.output_serialization.as_ref()
}
}
impl std::fmt::Debug for SelectParameters {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SelectParameters");
formatter.field("input_serialization", &self.input_serialization);
formatter.field("expression_type", &self.expression_type);
formatter.field("expression", &self.expression);
formatter.field("output_serialization", &self.output_serialization);
formatter.finish()
}
}
pub mod select_parameters {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_serialization: std::option::Option<crate::model::InputSerialization>,
pub(crate) expression_type: std::option::Option<crate::model::ExpressionType>,
pub(crate) expression: std::option::Option<std::string::String>,
pub(crate) output_serialization: std::option::Option<crate::model::OutputSerialization>,
}
impl Builder {
pub fn input_serialization(mut self, input: crate::model::InputSerialization) -> Self {
self.input_serialization = Some(input);
self
}
pub fn set_input_serialization(
mut self,
input: std::option::Option<crate::model::InputSerialization>,
) -> Self {
self.input_serialization = input;
self
}
pub fn expression_type(mut self, input: crate::model::ExpressionType) -> Self {
self.expression_type = Some(input);
self
}
pub fn set_expression_type(
mut self,
input: std::option::Option<crate::model::ExpressionType>,
) -> Self {
self.expression_type = input;
self
}
pub fn expression(mut self, input: impl Into<std::string::String>) -> Self {
self.expression = Some(input.into());
self
}
pub fn set_expression(mut self, input: std::option::Option<std::string::String>) -> Self {
self.expression = input;
self
}
pub fn output_serialization(mut self, input: crate::model::OutputSerialization) -> Self {
self.output_serialization = Some(input);
self
}
pub fn set_output_serialization(
mut self,
input: std::option::Option<crate::model::OutputSerialization>,
) -> Self {
self.output_serialization = input;
self
}
pub fn build(self) -> crate::model::SelectParameters {
crate::model::SelectParameters {
input_serialization: self.input_serialization,
expression_type: self.expression_type,
expression: self.expression,
output_serialization: self.output_serialization,
}
}
}
}
impl SelectParameters {
pub fn builder() -> crate::model::select_parameters::Builder {
crate::model::select_parameters::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 Tier {
#[allow(missing_docs)] Bulk,
#[allow(missing_docs)] Expedited,
#[allow(missing_docs)] Standard,
Unknown(String),
}
impl std::convert::From<&str> for Tier {
fn from(s: &str) -> Self {
match s {
"Bulk" => Tier::Bulk,
"Expedited" => Tier::Expedited,
"Standard" => Tier::Standard,
other => Tier::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Tier {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Tier::from(s))
}
}
impl Tier {
pub fn as_str(&self) -> &str {
match self {
Tier::Bulk => "Bulk",
Tier::Expedited => "Expedited",
Tier::Standard => "Standard",
Tier::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Bulk", "Expedited", "Standard"]
}
}
impl AsRef<str> for Tier {
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 RestoreRequestType {
#[allow(missing_docs)] Select,
Unknown(String),
}
impl std::convert::From<&str> for RestoreRequestType {
fn from(s: &str) -> Self {
match s {
"SELECT" => RestoreRequestType::Select,
other => RestoreRequestType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RestoreRequestType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RestoreRequestType::from(s))
}
}
impl RestoreRequestType {
pub fn as_str(&self) -> &str {
match self {
RestoreRequestType::Select => "SELECT",
RestoreRequestType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["SELECT"]
}
}
impl AsRef<str> for RestoreRequestType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GlacierJobParameters {
pub tier: std::option::Option<crate::model::Tier>,
}
impl GlacierJobParameters {
pub fn tier(&self) -> std::option::Option<&crate::model::Tier> {
self.tier.as_ref()
}
}
impl std::fmt::Debug for GlacierJobParameters {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GlacierJobParameters");
formatter.field("tier", &self.tier);
formatter.finish()
}
}
pub mod glacier_job_parameters {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tier: std::option::Option<crate::model::Tier>,
}
impl Builder {
pub fn tier(mut self, input: crate::model::Tier) -> Self {
self.tier = Some(input);
self
}
pub fn set_tier(mut self, input: std::option::Option<crate::model::Tier>) -> Self {
self.tier = input;
self
}
pub fn build(self) -> crate::model::GlacierJobParameters {
crate::model::GlacierJobParameters { tier: self.tier }
}
}
}
impl GlacierJobParameters {
pub fn builder() -> crate::model::glacier_job_parameters::Builder {
crate::model::glacier_job_parameters::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PublicAccessBlockConfiguration {
pub block_public_acls: bool,
pub ignore_public_acls: bool,
pub block_public_policy: bool,
pub restrict_public_buckets: bool,
}
impl PublicAccessBlockConfiguration {
pub fn block_public_acls(&self) -> bool {
self.block_public_acls
}
pub fn ignore_public_acls(&self) -> bool {
self.ignore_public_acls
}
pub fn block_public_policy(&self) -> bool {
self.block_public_policy
}
pub fn restrict_public_buckets(&self) -> bool {
self.restrict_public_buckets
}
}
impl std::fmt::Debug for PublicAccessBlockConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PublicAccessBlockConfiguration");
formatter.field("block_public_acls", &self.block_public_acls);
formatter.field("ignore_public_acls", &self.ignore_public_acls);
formatter.field("block_public_policy", &self.block_public_policy);
formatter.field("restrict_public_buckets", &self.restrict_public_buckets);
formatter.finish()
}
}
pub mod public_access_block_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) block_public_acls: std::option::Option<bool>,
pub(crate) ignore_public_acls: std::option::Option<bool>,
pub(crate) block_public_policy: std::option::Option<bool>,
pub(crate) restrict_public_buckets: std::option::Option<bool>,
}
impl Builder {
pub fn block_public_acls(mut self, input: bool) -> Self {
self.block_public_acls = Some(input);
self
}
pub fn set_block_public_acls(mut self, input: std::option::Option<bool>) -> Self {
self.block_public_acls = input;
self
}
pub fn ignore_public_acls(mut self, input: bool) -> Self {
self.ignore_public_acls = Some(input);
self
}
pub fn set_ignore_public_acls(mut self, input: std::option::Option<bool>) -> Self {
self.ignore_public_acls = input;
self
}
pub fn block_public_policy(mut self, input: bool) -> Self {
self.block_public_policy = Some(input);
self
}
pub fn set_block_public_policy(mut self, input: std::option::Option<bool>) -> Self {
self.block_public_policy = input;
self
}
pub fn restrict_public_buckets(mut self, input: bool) -> Self {
self.restrict_public_buckets = Some(input);
self
}
pub fn set_restrict_public_buckets(mut self, input: std::option::Option<bool>) -> Self {
self.restrict_public_buckets = input;
self
}
pub fn build(self) -> crate::model::PublicAccessBlockConfiguration {
crate::model::PublicAccessBlockConfiguration {
block_public_acls: self.block_public_acls.unwrap_or_default(),
ignore_public_acls: self.ignore_public_acls.unwrap_or_default(),
block_public_policy: self.block_public_policy.unwrap_or_default(),
restrict_public_buckets: self.restrict_public_buckets.unwrap_or_default(),
}
}
}
}
impl PublicAccessBlockConfiguration {
pub fn builder() -> crate::model::public_access_block_configuration::Builder {
crate::model::public_access_block_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectLockRetention {
pub mode: std::option::Option<crate::model::ObjectLockRetentionMode>,
pub retain_until_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl ObjectLockRetention {
pub fn mode(&self) -> std::option::Option<&crate::model::ObjectLockRetentionMode> {
self.mode.as_ref()
}
pub fn retain_until_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.retain_until_date.as_ref()
}
}
impl std::fmt::Debug for ObjectLockRetention {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectLockRetention");
formatter.field("mode", &self.mode);
formatter.field("retain_until_date", &self.retain_until_date);
formatter.finish()
}
}
pub mod object_lock_retention {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mode: std::option::Option<crate::model::ObjectLockRetentionMode>,
pub(crate) retain_until_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn mode(mut self, input: crate::model::ObjectLockRetentionMode) -> Self {
self.mode = Some(input);
self
}
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::ObjectLockRetentionMode>,
) -> Self {
self.mode = input;
self
}
pub fn retain_until_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.retain_until_date = Some(input);
self
}
pub fn set_retain_until_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.retain_until_date = input;
self
}
pub fn build(self) -> crate::model::ObjectLockRetention {
crate::model::ObjectLockRetention {
mode: self.mode,
retain_until_date: self.retain_until_date,
}
}
}
}
impl ObjectLockRetention {
pub fn builder() -> crate::model::object_lock_retention::Builder {
crate::model::object_lock_retention::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 ObjectLockRetentionMode {
#[allow(missing_docs)] Compliance,
#[allow(missing_docs)] Governance,
Unknown(String),
}
impl std::convert::From<&str> for ObjectLockRetentionMode {
fn from(s: &str) -> Self {
match s {
"COMPLIANCE" => ObjectLockRetentionMode::Compliance,
"GOVERNANCE" => ObjectLockRetentionMode::Governance,
other => ObjectLockRetentionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectLockRetentionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectLockRetentionMode::from(s))
}
}
impl ObjectLockRetentionMode {
pub fn as_str(&self) -> &str {
match self {
ObjectLockRetentionMode::Compliance => "COMPLIANCE",
ObjectLockRetentionMode::Governance => "GOVERNANCE",
ObjectLockRetentionMode::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COMPLIANCE", "GOVERNANCE"]
}
}
impl AsRef<str> for ObjectLockRetentionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectLockConfiguration {
pub object_lock_enabled: std::option::Option<crate::model::ObjectLockEnabled>,
pub rule: std::option::Option<crate::model::ObjectLockRule>,
}
impl ObjectLockConfiguration {
pub fn object_lock_enabled(&self) -> std::option::Option<&crate::model::ObjectLockEnabled> {
self.object_lock_enabled.as_ref()
}
pub fn rule(&self) -> std::option::Option<&crate::model::ObjectLockRule> {
self.rule.as_ref()
}
}
impl std::fmt::Debug for ObjectLockConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectLockConfiguration");
formatter.field("object_lock_enabled", &self.object_lock_enabled);
formatter.field("rule", &self.rule);
formatter.finish()
}
}
pub mod object_lock_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) object_lock_enabled: std::option::Option<crate::model::ObjectLockEnabled>,
pub(crate) rule: std::option::Option<crate::model::ObjectLockRule>,
}
impl Builder {
pub fn object_lock_enabled(mut self, input: crate::model::ObjectLockEnabled) -> Self {
self.object_lock_enabled = Some(input);
self
}
pub fn set_object_lock_enabled(
mut self,
input: std::option::Option<crate::model::ObjectLockEnabled>,
) -> Self {
self.object_lock_enabled = input;
self
}
pub fn rule(mut self, input: crate::model::ObjectLockRule) -> Self {
self.rule = Some(input);
self
}
pub fn set_rule(
mut self,
input: std::option::Option<crate::model::ObjectLockRule>,
) -> Self {
self.rule = input;
self
}
pub fn build(self) -> crate::model::ObjectLockConfiguration {
crate::model::ObjectLockConfiguration {
object_lock_enabled: self.object_lock_enabled,
rule: self.rule,
}
}
}
}
impl ObjectLockConfiguration {
pub fn builder() -> crate::model::object_lock_configuration::Builder {
crate::model::object_lock_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectLockRule {
pub default_retention: std::option::Option<crate::model::DefaultRetention>,
}
impl ObjectLockRule {
pub fn default_retention(&self) -> std::option::Option<&crate::model::DefaultRetention> {
self.default_retention.as_ref()
}
}
impl std::fmt::Debug for ObjectLockRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectLockRule");
formatter.field("default_retention", &self.default_retention);
formatter.finish()
}
}
pub mod object_lock_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) default_retention: std::option::Option<crate::model::DefaultRetention>,
}
impl Builder {
pub fn default_retention(mut self, input: crate::model::DefaultRetention) -> Self {
self.default_retention = Some(input);
self
}
pub fn set_default_retention(
mut self,
input: std::option::Option<crate::model::DefaultRetention>,
) -> Self {
self.default_retention = input;
self
}
pub fn build(self) -> crate::model::ObjectLockRule {
crate::model::ObjectLockRule {
default_retention: self.default_retention,
}
}
}
}
impl ObjectLockRule {
pub fn builder() -> crate::model::object_lock_rule::Builder {
crate::model::object_lock_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DefaultRetention {
pub mode: std::option::Option<crate::model::ObjectLockRetentionMode>,
pub days: i32,
pub years: i32,
}
impl DefaultRetention {
pub fn mode(&self) -> std::option::Option<&crate::model::ObjectLockRetentionMode> {
self.mode.as_ref()
}
pub fn days(&self) -> i32 {
self.days
}
pub fn years(&self) -> i32 {
self.years
}
}
impl std::fmt::Debug for DefaultRetention {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DefaultRetention");
formatter.field("mode", &self.mode);
formatter.field("days", &self.days);
formatter.field("years", &self.years);
formatter.finish()
}
}
pub mod default_retention {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mode: std::option::Option<crate::model::ObjectLockRetentionMode>,
pub(crate) days: std::option::Option<i32>,
pub(crate) years: std::option::Option<i32>,
}
impl Builder {
pub fn mode(mut self, input: crate::model::ObjectLockRetentionMode) -> Self {
self.mode = Some(input);
self
}
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::ObjectLockRetentionMode>,
) -> Self {
self.mode = input;
self
}
pub fn days(mut self, input: i32) -> Self {
self.days = Some(input);
self
}
pub fn set_days(mut self, input: std::option::Option<i32>) -> Self {
self.days = input;
self
}
pub fn years(mut self, input: i32) -> Self {
self.years = Some(input);
self
}
pub fn set_years(mut self, input: std::option::Option<i32>) -> Self {
self.years = input;
self
}
pub fn build(self) -> crate::model::DefaultRetention {
crate::model::DefaultRetention {
mode: self.mode,
days: self.days.unwrap_or_default(),
years: self.years.unwrap_or_default(),
}
}
}
}
impl DefaultRetention {
pub fn builder() -> crate::model::default_retention::Builder {
crate::model::default_retention::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 ObjectLockEnabled {
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ObjectLockEnabled {
fn from(s: &str) -> Self {
match s {
"Enabled" => ObjectLockEnabled::Enabled,
other => ObjectLockEnabled::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectLockEnabled {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectLockEnabled::from(s))
}
}
impl ObjectLockEnabled {
pub fn as_str(&self) -> &str {
match self {
ObjectLockEnabled::Enabled => "Enabled",
ObjectLockEnabled::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Enabled"]
}
}
impl AsRef<str> for ObjectLockEnabled {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectLockLegalHold {
pub status: std::option::Option<crate::model::ObjectLockLegalHoldStatus>,
}
impl ObjectLockLegalHold {
pub fn status(&self) -> std::option::Option<&crate::model::ObjectLockLegalHoldStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for ObjectLockLegalHold {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectLockLegalHold");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod object_lock_legal_hold {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::ObjectLockLegalHoldStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::ObjectLockLegalHoldStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ObjectLockLegalHoldStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::ObjectLockLegalHold {
crate::model::ObjectLockLegalHold {
status: self.status,
}
}
}
}
impl ObjectLockLegalHold {
pub fn builder() -> crate::model::object_lock_legal_hold::Builder {
crate::model::object_lock_legal_hold::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccessControlPolicy {
pub grants: std::option::Option<std::vec::Vec<crate::model::Grant>>,
pub owner: std::option::Option<crate::model::Owner>,
}
impl AccessControlPolicy {
pub fn grants(&self) -> std::option::Option<&[crate::model::Grant]> {
self.grants.as_deref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
}
impl std::fmt::Debug for AccessControlPolicy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccessControlPolicy");
formatter.field("grants", &self.grants);
formatter.field("owner", &self.owner);
formatter.finish()
}
}
pub mod access_control_policy {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) grants: std::option::Option<std::vec::Vec<crate::model::Grant>>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
}
impl Builder {
pub fn grants(mut self, input: impl Into<crate::model::Grant>) -> Self {
let mut v = self.grants.unwrap_or_default();
v.push(input.into());
self.grants = Some(v);
self
}
pub fn set_grants(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Grant>>,
) -> Self {
self.grants = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn build(self) -> crate::model::AccessControlPolicy {
crate::model::AccessControlPolicy {
grants: self.grants,
owner: self.owner,
}
}
}
}
impl AccessControlPolicy {
pub fn builder() -> crate::model::access_control_policy::Builder {
crate::model::access_control_policy::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Owner {
pub display_name: std::option::Option<std::string::String>,
pub id: std::option::Option<std::string::String>,
}
impl Owner {
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
impl std::fmt::Debug for Owner {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Owner");
formatter.field("display_name", &self.display_name);
formatter.field("id", &self.id);
formatter.finish()
}
}
pub mod owner {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(self) -> crate::model::Owner {
crate::model::Owner {
display_name: self.display_name,
id: self.id,
}
}
}
}
impl Owner {
pub fn builder() -> crate::model::owner::Builder {
crate::model::owner::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WebsiteConfiguration {
pub error_document: std::option::Option<crate::model::ErrorDocument>,
pub index_document: std::option::Option<crate::model::IndexDocument>,
pub redirect_all_requests_to: std::option::Option<crate::model::RedirectAllRequestsTo>,
pub routing_rules: std::option::Option<std::vec::Vec<crate::model::RoutingRule>>,
}
impl WebsiteConfiguration {
pub fn error_document(&self) -> std::option::Option<&crate::model::ErrorDocument> {
self.error_document.as_ref()
}
pub fn index_document(&self) -> std::option::Option<&crate::model::IndexDocument> {
self.index_document.as_ref()
}
pub fn redirect_all_requests_to(
&self,
) -> std::option::Option<&crate::model::RedirectAllRequestsTo> {
self.redirect_all_requests_to.as_ref()
}
pub fn routing_rules(&self) -> std::option::Option<&[crate::model::RoutingRule]> {
self.routing_rules.as_deref()
}
}
impl std::fmt::Debug for WebsiteConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WebsiteConfiguration");
formatter.field("error_document", &self.error_document);
formatter.field("index_document", &self.index_document);
formatter.field("redirect_all_requests_to", &self.redirect_all_requests_to);
formatter.field("routing_rules", &self.routing_rules);
formatter.finish()
}
}
pub mod website_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_document: std::option::Option<crate::model::ErrorDocument>,
pub(crate) index_document: std::option::Option<crate::model::IndexDocument>,
pub(crate) redirect_all_requests_to:
std::option::Option<crate::model::RedirectAllRequestsTo>,
pub(crate) routing_rules: std::option::Option<std::vec::Vec<crate::model::RoutingRule>>,
}
impl Builder {
pub fn error_document(mut self, input: crate::model::ErrorDocument) -> Self {
self.error_document = Some(input);
self
}
pub fn set_error_document(
mut self,
input: std::option::Option<crate::model::ErrorDocument>,
) -> Self {
self.error_document = input;
self
}
pub fn index_document(mut self, input: crate::model::IndexDocument) -> Self {
self.index_document = Some(input);
self
}
pub fn set_index_document(
mut self,
input: std::option::Option<crate::model::IndexDocument>,
) -> Self {
self.index_document = input;
self
}
pub fn redirect_all_requests_to(
mut self,
input: crate::model::RedirectAllRequestsTo,
) -> Self {
self.redirect_all_requests_to = Some(input);
self
}
pub fn set_redirect_all_requests_to(
mut self,
input: std::option::Option<crate::model::RedirectAllRequestsTo>,
) -> Self {
self.redirect_all_requests_to = input;
self
}
pub fn routing_rules(mut self, input: impl Into<crate::model::RoutingRule>) -> Self {
let mut v = self.routing_rules.unwrap_or_default();
v.push(input.into());
self.routing_rules = Some(v);
self
}
pub fn set_routing_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RoutingRule>>,
) -> Self {
self.routing_rules = input;
self
}
pub fn build(self) -> crate::model::WebsiteConfiguration {
crate::model::WebsiteConfiguration {
error_document: self.error_document,
index_document: self.index_document,
redirect_all_requests_to: self.redirect_all_requests_to,
routing_rules: self.routing_rules,
}
}
}
}
impl WebsiteConfiguration {
pub fn builder() -> crate::model::website_configuration::Builder {
crate::model::website_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RoutingRule {
pub condition: std::option::Option<crate::model::Condition>,
pub redirect: std::option::Option<crate::model::Redirect>,
}
impl RoutingRule {
pub fn condition(&self) -> std::option::Option<&crate::model::Condition> {
self.condition.as_ref()
}
pub fn redirect(&self) -> std::option::Option<&crate::model::Redirect> {
self.redirect.as_ref()
}
}
impl std::fmt::Debug for RoutingRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RoutingRule");
formatter.field("condition", &self.condition);
formatter.field("redirect", &self.redirect);
formatter.finish()
}
}
pub mod routing_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) condition: std::option::Option<crate::model::Condition>,
pub(crate) redirect: std::option::Option<crate::model::Redirect>,
}
impl Builder {
pub fn condition(mut self, input: crate::model::Condition) -> Self {
self.condition = Some(input);
self
}
pub fn set_condition(
mut self,
input: std::option::Option<crate::model::Condition>,
) -> Self {
self.condition = input;
self
}
pub fn redirect(mut self, input: crate::model::Redirect) -> Self {
self.redirect = Some(input);
self
}
pub fn set_redirect(mut self, input: std::option::Option<crate::model::Redirect>) -> Self {
self.redirect = input;
self
}
pub fn build(self) -> crate::model::RoutingRule {
crate::model::RoutingRule {
condition: self.condition,
redirect: self.redirect,
}
}
}
}
impl RoutingRule {
pub fn builder() -> crate::model::routing_rule::Builder {
crate::model::routing_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Redirect {
pub host_name: std::option::Option<std::string::String>,
pub http_redirect_code: std::option::Option<std::string::String>,
pub protocol: std::option::Option<crate::model::Protocol>,
pub replace_key_prefix_with: std::option::Option<std::string::String>,
pub replace_key_with: std::option::Option<std::string::String>,
}
impl Redirect {
pub fn host_name(&self) -> std::option::Option<&str> {
self.host_name.as_deref()
}
pub fn http_redirect_code(&self) -> std::option::Option<&str> {
self.http_redirect_code.as_deref()
}
pub fn protocol(&self) -> std::option::Option<&crate::model::Protocol> {
self.protocol.as_ref()
}
pub fn replace_key_prefix_with(&self) -> std::option::Option<&str> {
self.replace_key_prefix_with.as_deref()
}
pub fn replace_key_with(&self) -> std::option::Option<&str> {
self.replace_key_with.as_deref()
}
}
impl std::fmt::Debug for Redirect {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Redirect");
formatter.field("host_name", &self.host_name);
formatter.field("http_redirect_code", &self.http_redirect_code);
formatter.field("protocol", &self.protocol);
formatter.field("replace_key_prefix_with", &self.replace_key_prefix_with);
formatter.field("replace_key_with", &self.replace_key_with);
formatter.finish()
}
}
pub mod redirect {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) host_name: std::option::Option<std::string::String>,
pub(crate) http_redirect_code: std::option::Option<std::string::String>,
pub(crate) protocol: std::option::Option<crate::model::Protocol>,
pub(crate) replace_key_prefix_with: std::option::Option<std::string::String>,
pub(crate) replace_key_with: std::option::Option<std::string::String>,
}
impl Builder {
pub fn host_name(mut self, input: impl Into<std::string::String>) -> Self {
self.host_name = Some(input.into());
self
}
pub fn set_host_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.host_name = input;
self
}
pub fn http_redirect_code(mut self, input: impl Into<std::string::String>) -> Self {
self.http_redirect_code = Some(input.into());
self
}
pub fn set_http_redirect_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.http_redirect_code = input;
self
}
pub fn protocol(mut self, input: crate::model::Protocol) -> Self {
self.protocol = Some(input);
self
}
pub fn set_protocol(mut self, input: std::option::Option<crate::model::Protocol>) -> Self {
self.protocol = input;
self
}
pub fn replace_key_prefix_with(mut self, input: impl Into<std::string::String>) -> Self {
self.replace_key_prefix_with = Some(input.into());
self
}
pub fn set_replace_key_prefix_with(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replace_key_prefix_with = input;
self
}
pub fn replace_key_with(mut self, input: impl Into<std::string::String>) -> Self {
self.replace_key_with = Some(input.into());
self
}
pub fn set_replace_key_with(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replace_key_with = input;
self
}
pub fn build(self) -> crate::model::Redirect {
crate::model::Redirect {
host_name: self.host_name,
http_redirect_code: self.http_redirect_code,
protocol: self.protocol,
replace_key_prefix_with: self.replace_key_prefix_with,
replace_key_with: self.replace_key_with,
}
}
}
}
impl Redirect {
pub fn builder() -> crate::model::redirect::Builder {
crate::model::redirect::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 Protocol {
#[allow(missing_docs)] Http,
#[allow(missing_docs)] Https,
Unknown(String),
}
impl std::convert::From<&str> for Protocol {
fn from(s: &str) -> Self {
match s {
"http" => Protocol::Http,
"https" => Protocol::Https,
other => Protocol::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Protocol {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Protocol::from(s))
}
}
impl Protocol {
pub fn as_str(&self) -> &str {
match self {
Protocol::Http => "http",
Protocol::Https => "https",
Protocol::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["http", "https"]
}
}
impl AsRef<str> for Protocol {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Condition {
pub http_error_code_returned_equals: std::option::Option<std::string::String>,
pub key_prefix_equals: std::option::Option<std::string::String>,
}
impl Condition {
pub fn http_error_code_returned_equals(&self) -> std::option::Option<&str> {
self.http_error_code_returned_equals.as_deref()
}
pub fn key_prefix_equals(&self) -> std::option::Option<&str> {
self.key_prefix_equals.as_deref()
}
}
impl std::fmt::Debug for Condition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Condition");
formatter.field(
"http_error_code_returned_equals",
&self.http_error_code_returned_equals,
);
formatter.field("key_prefix_equals", &self.key_prefix_equals);
formatter.finish()
}
}
pub mod condition {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) http_error_code_returned_equals: std::option::Option<std::string::String>,
pub(crate) key_prefix_equals: std::option::Option<std::string::String>,
}
impl Builder {
pub fn http_error_code_returned_equals(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.http_error_code_returned_equals = Some(input.into());
self
}
pub fn set_http_error_code_returned_equals(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.http_error_code_returned_equals = input;
self
}
pub fn key_prefix_equals(mut self, input: impl Into<std::string::String>) -> Self {
self.key_prefix_equals = Some(input.into());
self
}
pub fn set_key_prefix_equals(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.key_prefix_equals = input;
self
}
pub fn build(self) -> crate::model::Condition {
crate::model::Condition {
http_error_code_returned_equals: self.http_error_code_returned_equals,
key_prefix_equals: self.key_prefix_equals,
}
}
}
}
impl Condition {
pub fn builder() -> crate::model::condition::Builder {
crate::model::condition::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RedirectAllRequestsTo {
pub host_name: std::option::Option<std::string::String>,
pub protocol: std::option::Option<crate::model::Protocol>,
}
impl RedirectAllRequestsTo {
pub fn host_name(&self) -> std::option::Option<&str> {
self.host_name.as_deref()
}
pub fn protocol(&self) -> std::option::Option<&crate::model::Protocol> {
self.protocol.as_ref()
}
}
impl std::fmt::Debug for RedirectAllRequestsTo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RedirectAllRequestsTo");
formatter.field("host_name", &self.host_name);
formatter.field("protocol", &self.protocol);
formatter.finish()
}
}
pub mod redirect_all_requests_to {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) host_name: std::option::Option<std::string::String>,
pub(crate) protocol: std::option::Option<crate::model::Protocol>,
}
impl Builder {
pub fn host_name(mut self, input: impl Into<std::string::String>) -> Self {
self.host_name = Some(input.into());
self
}
pub fn set_host_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.host_name = input;
self
}
pub fn protocol(mut self, input: crate::model::Protocol) -> Self {
self.protocol = Some(input);
self
}
pub fn set_protocol(mut self, input: std::option::Option<crate::model::Protocol>) -> Self {
self.protocol = input;
self
}
pub fn build(self) -> crate::model::RedirectAllRequestsTo {
crate::model::RedirectAllRequestsTo {
host_name: self.host_name,
protocol: self.protocol,
}
}
}
}
impl RedirectAllRequestsTo {
pub fn builder() -> crate::model::redirect_all_requests_to::Builder {
crate::model::redirect_all_requests_to::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IndexDocument {
pub suffix: std::option::Option<std::string::String>,
}
impl IndexDocument {
pub fn suffix(&self) -> std::option::Option<&str> {
self.suffix.as_deref()
}
}
impl std::fmt::Debug for IndexDocument {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IndexDocument");
formatter.field("suffix", &self.suffix);
formatter.finish()
}
}
pub mod index_document {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) suffix: std::option::Option<std::string::String>,
}
impl Builder {
pub fn suffix(mut self, input: impl Into<std::string::String>) -> Self {
self.suffix = Some(input.into());
self
}
pub fn set_suffix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.suffix = input;
self
}
pub fn build(self) -> crate::model::IndexDocument {
crate::model::IndexDocument {
suffix: self.suffix,
}
}
}
}
impl IndexDocument {
pub fn builder() -> crate::model::index_document::Builder {
crate::model::index_document::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ErrorDocument {
pub key: std::option::Option<std::string::String>,
}
impl ErrorDocument {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
}
impl std::fmt::Debug for ErrorDocument {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ErrorDocument");
formatter.field("key", &self.key);
formatter.finish()
}
}
pub mod error_document {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
}
impl Builder {
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 build(self) -> crate::model::ErrorDocument {
crate::model::ErrorDocument { key: self.key }
}
}
}
impl ErrorDocument {
pub fn builder() -> crate::model::error_document::Builder {
crate::model::error_document::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VersioningConfiguration {
pub mfa_delete: std::option::Option<crate::model::MfaDelete>,
pub status: std::option::Option<crate::model::BucketVersioningStatus>,
}
impl VersioningConfiguration {
pub fn mfa_delete(&self) -> std::option::Option<&crate::model::MfaDelete> {
self.mfa_delete.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::BucketVersioningStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for VersioningConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VersioningConfiguration");
formatter.field("mfa_delete", &self.mfa_delete);
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod versioning_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mfa_delete: std::option::Option<crate::model::MfaDelete>,
pub(crate) status: std::option::Option<crate::model::BucketVersioningStatus>,
}
impl Builder {
pub fn mfa_delete(mut self, input: crate::model::MfaDelete) -> Self {
self.mfa_delete = Some(input);
self
}
pub fn set_mfa_delete(
mut self,
input: std::option::Option<crate::model::MfaDelete>,
) -> Self {
self.mfa_delete = input;
self
}
pub fn status(mut self, input: crate::model::BucketVersioningStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::BucketVersioningStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::VersioningConfiguration {
crate::model::VersioningConfiguration {
mfa_delete: self.mfa_delete,
status: self.status,
}
}
}
}
impl VersioningConfiguration {
pub fn builder() -> crate::model::versioning_configuration::Builder {
crate::model::versioning_configuration::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 BucketVersioningStatus {
#[allow(missing_docs)] Enabled,
#[allow(missing_docs)] Suspended,
Unknown(String),
}
impl std::convert::From<&str> for BucketVersioningStatus {
fn from(s: &str) -> Self {
match s {
"Enabled" => BucketVersioningStatus::Enabled,
"Suspended" => BucketVersioningStatus::Suspended,
other => BucketVersioningStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BucketVersioningStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BucketVersioningStatus::from(s))
}
}
impl BucketVersioningStatus {
pub fn as_str(&self) -> &str {
match self {
BucketVersioningStatus::Enabled => "Enabled",
BucketVersioningStatus::Suspended => "Suspended",
BucketVersioningStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Enabled", "Suspended"]
}
}
impl AsRef<str> for BucketVersioningStatus {
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 MfaDelete {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for MfaDelete {
fn from(s: &str) -> Self {
match s {
"Disabled" => MfaDelete::Disabled,
"Enabled" => MfaDelete::Enabled,
other => MfaDelete::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MfaDelete {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MfaDelete::from(s))
}
}
impl MfaDelete {
pub fn as_str(&self) -> &str {
match self {
MfaDelete::Disabled => "Disabled",
MfaDelete::Enabled => "Enabled",
MfaDelete::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for MfaDelete {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RequestPaymentConfiguration {
pub payer: std::option::Option<crate::model::Payer>,
}
impl RequestPaymentConfiguration {
pub fn payer(&self) -> std::option::Option<&crate::model::Payer> {
self.payer.as_ref()
}
}
impl std::fmt::Debug for RequestPaymentConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RequestPaymentConfiguration");
formatter.field("payer", &self.payer);
formatter.finish()
}
}
pub mod request_payment_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) payer: std::option::Option<crate::model::Payer>,
}
impl Builder {
pub fn payer(mut self, input: crate::model::Payer) -> Self {
self.payer = Some(input);
self
}
pub fn set_payer(mut self, input: std::option::Option<crate::model::Payer>) -> Self {
self.payer = input;
self
}
pub fn build(self) -> crate::model::RequestPaymentConfiguration {
crate::model::RequestPaymentConfiguration { payer: self.payer }
}
}
}
impl RequestPaymentConfiguration {
pub fn builder() -> crate::model::request_payment_configuration::Builder {
crate::model::request_payment_configuration::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 Payer {
#[allow(missing_docs)] BucketOwner,
#[allow(missing_docs)] Requester,
Unknown(String),
}
impl std::convert::From<&str> for Payer {
fn from(s: &str) -> Self {
match s {
"BucketOwner" => Payer::BucketOwner,
"Requester" => Payer::Requester,
other => Payer::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Payer {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Payer::from(s))
}
}
impl Payer {
pub fn as_str(&self) -> &str {
match self {
Payer::BucketOwner => "BucketOwner",
Payer::Requester => "Requester",
Payer::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BucketOwner", "Requester"]
}
}
impl AsRef<str> for Payer {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicationConfiguration {
pub role: std::option::Option<std::string::String>,
pub rules: std::option::Option<std::vec::Vec<crate::model::ReplicationRule>>,
}
impl ReplicationConfiguration {
pub fn role(&self) -> std::option::Option<&str> {
self.role.as_deref()
}
pub fn rules(&self) -> std::option::Option<&[crate::model::ReplicationRule]> {
self.rules.as_deref()
}
}
impl std::fmt::Debug for ReplicationConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicationConfiguration");
formatter.field("role", &self.role);
formatter.field("rules", &self.rules);
formatter.finish()
}
}
pub mod replication_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) role: std::option::Option<std::string::String>,
pub(crate) rules: std::option::Option<std::vec::Vec<crate::model::ReplicationRule>>,
}
impl Builder {
pub fn role(mut self, input: impl Into<std::string::String>) -> Self {
self.role = Some(input.into());
self
}
pub fn set_role(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role = input;
self
}
pub fn rules(mut self, input: impl Into<crate::model::ReplicationRule>) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input.into());
self.rules = Some(v);
self
}
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReplicationRule>>,
) -> Self {
self.rules = input;
self
}
pub fn build(self) -> crate::model::ReplicationConfiguration {
crate::model::ReplicationConfiguration {
role: self.role,
rules: self.rules,
}
}
}
}
impl ReplicationConfiguration {
pub fn builder() -> crate::model::replication_configuration::Builder {
crate::model::replication_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicationRule {
pub id: std::option::Option<std::string::String>,
pub priority: i32,
pub prefix: std::option::Option<std::string::String>,
pub filter: std::option::Option<crate::model::ReplicationRuleFilter>,
pub status: std::option::Option<crate::model::ReplicationRuleStatus>,
pub source_selection_criteria: std::option::Option<crate::model::SourceSelectionCriteria>,
pub existing_object_replication: std::option::Option<crate::model::ExistingObjectReplication>,
pub destination: std::option::Option<crate::model::Destination>,
pub delete_marker_replication: std::option::Option<crate::model::DeleteMarkerReplication>,
}
impl ReplicationRule {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn priority(&self) -> i32 {
self.priority
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::ReplicationRuleFilter> {
self.filter.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ReplicationRuleStatus> {
self.status.as_ref()
}
pub fn source_selection_criteria(
&self,
) -> std::option::Option<&crate::model::SourceSelectionCriteria> {
self.source_selection_criteria.as_ref()
}
pub fn existing_object_replication(
&self,
) -> std::option::Option<&crate::model::ExistingObjectReplication> {
self.existing_object_replication.as_ref()
}
pub fn destination(&self) -> std::option::Option<&crate::model::Destination> {
self.destination.as_ref()
}
pub fn delete_marker_replication(
&self,
) -> std::option::Option<&crate::model::DeleteMarkerReplication> {
self.delete_marker_replication.as_ref()
}
}
impl std::fmt::Debug for ReplicationRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicationRule");
formatter.field("id", &self.id);
formatter.field("priority", &self.priority);
formatter.field("prefix", &self.prefix);
formatter.field("filter", &self.filter);
formatter.field("status", &self.status);
formatter.field("source_selection_criteria", &self.source_selection_criteria);
formatter.field(
"existing_object_replication",
&self.existing_object_replication,
);
formatter.field("destination", &self.destination);
formatter.field("delete_marker_replication", &self.delete_marker_replication);
formatter.finish()
}
}
pub mod replication_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) priority: std::option::Option<i32>,
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) filter: std::option::Option<crate::model::ReplicationRuleFilter>,
pub(crate) status: std::option::Option<crate::model::ReplicationRuleStatus>,
pub(crate) source_selection_criteria:
std::option::Option<crate::model::SourceSelectionCriteria>,
pub(crate) existing_object_replication:
std::option::Option<crate::model::ExistingObjectReplication>,
pub(crate) destination: std::option::Option<crate::model::Destination>,
pub(crate) delete_marker_replication:
std::option::Option<crate::model::DeleteMarkerReplication>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn priority(mut self, input: i32) -> Self {
self.priority = Some(input);
self
}
pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
self.priority = 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 filter(mut self, input: crate::model::ReplicationRuleFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::ReplicationRuleFilter>,
) -> Self {
self.filter = input;
self
}
pub fn status(mut self, input: crate::model::ReplicationRuleStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ReplicationRuleStatus>,
) -> Self {
self.status = input;
self
}
pub fn source_selection_criteria(
mut self,
input: crate::model::SourceSelectionCriteria,
) -> Self {
self.source_selection_criteria = Some(input);
self
}
pub fn set_source_selection_criteria(
mut self,
input: std::option::Option<crate::model::SourceSelectionCriteria>,
) -> Self {
self.source_selection_criteria = input;
self
}
pub fn existing_object_replication(
mut self,
input: crate::model::ExistingObjectReplication,
) -> Self {
self.existing_object_replication = Some(input);
self
}
pub fn set_existing_object_replication(
mut self,
input: std::option::Option<crate::model::ExistingObjectReplication>,
) -> Self {
self.existing_object_replication = input;
self
}
pub fn destination(mut self, input: crate::model::Destination) -> Self {
self.destination = Some(input);
self
}
pub fn set_destination(
mut self,
input: std::option::Option<crate::model::Destination>,
) -> Self {
self.destination = input;
self
}
pub fn delete_marker_replication(
mut self,
input: crate::model::DeleteMarkerReplication,
) -> Self {
self.delete_marker_replication = Some(input);
self
}
pub fn set_delete_marker_replication(
mut self,
input: std::option::Option<crate::model::DeleteMarkerReplication>,
) -> Self {
self.delete_marker_replication = input;
self
}
pub fn build(self) -> crate::model::ReplicationRule {
crate::model::ReplicationRule {
id: self.id,
priority: self.priority.unwrap_or_default(),
prefix: self.prefix,
filter: self.filter,
status: self.status,
source_selection_criteria: self.source_selection_criteria,
existing_object_replication: self.existing_object_replication,
destination: self.destination,
delete_marker_replication: self.delete_marker_replication,
}
}
}
}
impl ReplicationRule {
pub fn builder() -> crate::model::replication_rule::Builder {
crate::model::replication_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteMarkerReplication {
pub status: std::option::Option<crate::model::DeleteMarkerReplicationStatus>,
}
impl DeleteMarkerReplication {
pub fn status(&self) -> std::option::Option<&crate::model::DeleteMarkerReplicationStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for DeleteMarkerReplication {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteMarkerReplication");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod delete_marker_replication {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::DeleteMarkerReplicationStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::DeleteMarkerReplicationStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::DeleteMarkerReplicationStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::DeleteMarkerReplication {
crate::model::DeleteMarkerReplication {
status: self.status,
}
}
}
}
impl DeleteMarkerReplication {
pub fn builder() -> crate::model::delete_marker_replication::Builder {
crate::model::delete_marker_replication::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 DeleteMarkerReplicationStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for DeleteMarkerReplicationStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => DeleteMarkerReplicationStatus::Disabled,
"Enabled" => DeleteMarkerReplicationStatus::Enabled,
other => DeleteMarkerReplicationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeleteMarkerReplicationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeleteMarkerReplicationStatus::from(s))
}
}
impl DeleteMarkerReplicationStatus {
pub fn as_str(&self) -> &str {
match self {
DeleteMarkerReplicationStatus::Disabled => "Disabled",
DeleteMarkerReplicationStatus::Enabled => "Enabled",
DeleteMarkerReplicationStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for DeleteMarkerReplicationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Destination {
pub bucket: std::option::Option<std::string::String>,
pub account: std::option::Option<std::string::String>,
pub storage_class: std::option::Option<crate::model::StorageClass>,
pub access_control_translation: std::option::Option<crate::model::AccessControlTranslation>,
pub encryption_configuration: std::option::Option<crate::model::EncryptionConfiguration>,
pub replication_time: std::option::Option<crate::model::ReplicationTime>,
pub metrics: std::option::Option<crate::model::Metrics>,
}
impl Destination {
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn account(&self) -> std::option::Option<&str> {
self.account.as_deref()
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::StorageClass> {
self.storage_class.as_ref()
}
pub fn access_control_translation(
&self,
) -> std::option::Option<&crate::model::AccessControlTranslation> {
self.access_control_translation.as_ref()
}
pub fn encryption_configuration(
&self,
) -> std::option::Option<&crate::model::EncryptionConfiguration> {
self.encryption_configuration.as_ref()
}
pub fn replication_time(&self) -> std::option::Option<&crate::model::ReplicationTime> {
self.replication_time.as_ref()
}
pub fn metrics(&self) -> std::option::Option<&crate::model::Metrics> {
self.metrics.as_ref()
}
}
impl std::fmt::Debug for Destination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Destination");
formatter.field("bucket", &self.bucket);
formatter.field("account", &self.account);
formatter.field("storage_class", &self.storage_class);
formatter.field(
"access_control_translation",
&self.access_control_translation,
);
formatter.field("encryption_configuration", &self.encryption_configuration);
formatter.field("replication_time", &self.replication_time);
formatter.field("metrics", &self.metrics);
formatter.finish()
}
}
pub mod destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) account: std::option::Option<std::string::String>,
pub(crate) storage_class: std::option::Option<crate::model::StorageClass>,
pub(crate) access_control_translation:
std::option::Option<crate::model::AccessControlTranslation>,
pub(crate) encryption_configuration:
std::option::Option<crate::model::EncryptionConfiguration>,
pub(crate) replication_time: std::option::Option<crate::model::ReplicationTime>,
pub(crate) metrics: std::option::Option<crate::model::Metrics>,
}
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 account(mut self, input: impl Into<std::string::String>) -> Self {
self.account = Some(input.into());
self
}
pub fn set_account(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account = input;
self
}
pub fn storage_class(mut self, input: crate::model::StorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::StorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn access_control_translation(
mut self,
input: crate::model::AccessControlTranslation,
) -> Self {
self.access_control_translation = Some(input);
self
}
pub fn set_access_control_translation(
mut self,
input: std::option::Option<crate::model::AccessControlTranslation>,
) -> Self {
self.access_control_translation = input;
self
}
pub fn encryption_configuration(
mut self,
input: crate::model::EncryptionConfiguration,
) -> Self {
self.encryption_configuration = Some(input);
self
}
pub fn set_encryption_configuration(
mut self,
input: std::option::Option<crate::model::EncryptionConfiguration>,
) -> Self {
self.encryption_configuration = input;
self
}
pub fn replication_time(mut self, input: crate::model::ReplicationTime) -> Self {
self.replication_time = Some(input);
self
}
pub fn set_replication_time(
mut self,
input: std::option::Option<crate::model::ReplicationTime>,
) -> Self {
self.replication_time = input;
self
}
pub fn metrics(mut self, input: crate::model::Metrics) -> Self {
self.metrics = Some(input);
self
}
pub fn set_metrics(mut self, input: std::option::Option<crate::model::Metrics>) -> Self {
self.metrics = input;
self
}
pub fn build(self) -> crate::model::Destination {
crate::model::Destination {
bucket: self.bucket,
account: self.account,
storage_class: self.storage_class,
access_control_translation: self.access_control_translation,
encryption_configuration: self.encryption_configuration,
replication_time: self.replication_time,
metrics: self.metrics,
}
}
}
}
impl Destination {
pub fn builder() -> crate::model::destination::Builder {
crate::model::destination::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Metrics {
pub status: std::option::Option<crate::model::MetricsStatus>,
pub event_threshold: std::option::Option<crate::model::ReplicationTimeValue>,
}
impl Metrics {
pub fn status(&self) -> std::option::Option<&crate::model::MetricsStatus> {
self.status.as_ref()
}
pub fn event_threshold(&self) -> std::option::Option<&crate::model::ReplicationTimeValue> {
self.event_threshold.as_ref()
}
}
impl std::fmt::Debug for Metrics {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Metrics");
formatter.field("status", &self.status);
formatter.field("event_threshold", &self.event_threshold);
formatter.finish()
}
}
pub mod metrics {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::MetricsStatus>,
pub(crate) event_threshold: std::option::Option<crate::model::ReplicationTimeValue>,
}
impl Builder {
pub fn status(mut self, input: crate::model::MetricsStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::MetricsStatus>,
) -> Self {
self.status = input;
self
}
pub fn event_threshold(mut self, input: crate::model::ReplicationTimeValue) -> Self {
self.event_threshold = Some(input);
self
}
pub fn set_event_threshold(
mut self,
input: std::option::Option<crate::model::ReplicationTimeValue>,
) -> Self {
self.event_threshold = input;
self
}
pub fn build(self) -> crate::model::Metrics {
crate::model::Metrics {
status: self.status,
event_threshold: self.event_threshold,
}
}
}
}
impl Metrics {
pub fn builder() -> crate::model::metrics::Builder {
crate::model::metrics::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicationTimeValue {
pub minutes: i32,
}
impl ReplicationTimeValue {
pub fn minutes(&self) -> i32 {
self.minutes
}
}
impl std::fmt::Debug for ReplicationTimeValue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicationTimeValue");
formatter.field("minutes", &self.minutes);
formatter.finish()
}
}
pub mod replication_time_value {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) minutes: std::option::Option<i32>,
}
impl Builder {
pub fn minutes(mut self, input: i32) -> Self {
self.minutes = Some(input);
self
}
pub fn set_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.minutes = input;
self
}
pub fn build(self) -> crate::model::ReplicationTimeValue {
crate::model::ReplicationTimeValue {
minutes: self.minutes.unwrap_or_default(),
}
}
}
}
impl ReplicationTimeValue {
pub fn builder() -> crate::model::replication_time_value::Builder {
crate::model::replication_time_value::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 MetricsStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for MetricsStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => MetricsStatus::Disabled,
"Enabled" => MetricsStatus::Enabled,
other => MetricsStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MetricsStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MetricsStatus::from(s))
}
}
impl MetricsStatus {
pub fn as_str(&self) -> &str {
match self {
MetricsStatus::Disabled => "Disabled",
MetricsStatus::Enabled => "Enabled",
MetricsStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for MetricsStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicationTime {
pub status: std::option::Option<crate::model::ReplicationTimeStatus>,
pub time: std::option::Option<crate::model::ReplicationTimeValue>,
}
impl ReplicationTime {
pub fn status(&self) -> std::option::Option<&crate::model::ReplicationTimeStatus> {
self.status.as_ref()
}
pub fn time(&self) -> std::option::Option<&crate::model::ReplicationTimeValue> {
self.time.as_ref()
}
}
impl std::fmt::Debug for ReplicationTime {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicationTime");
formatter.field("status", &self.status);
formatter.field("time", &self.time);
formatter.finish()
}
}
pub mod replication_time {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::ReplicationTimeStatus>,
pub(crate) time: std::option::Option<crate::model::ReplicationTimeValue>,
}
impl Builder {
pub fn status(mut self, input: crate::model::ReplicationTimeStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ReplicationTimeStatus>,
) -> Self {
self.status = input;
self
}
pub fn time(mut self, input: crate::model::ReplicationTimeValue) -> Self {
self.time = Some(input);
self
}
pub fn set_time(
mut self,
input: std::option::Option<crate::model::ReplicationTimeValue>,
) -> Self {
self.time = input;
self
}
pub fn build(self) -> crate::model::ReplicationTime {
crate::model::ReplicationTime {
status: self.status,
time: self.time,
}
}
}
}
impl ReplicationTime {
pub fn builder() -> crate::model::replication_time::Builder {
crate::model::replication_time::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 ReplicationTimeStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ReplicationTimeStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => ReplicationTimeStatus::Disabled,
"Enabled" => ReplicationTimeStatus::Enabled,
other => ReplicationTimeStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReplicationTimeStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReplicationTimeStatus::from(s))
}
}
impl ReplicationTimeStatus {
pub fn as_str(&self) -> &str {
match self {
ReplicationTimeStatus::Disabled => "Disabled",
ReplicationTimeStatus::Enabled => "Enabled",
ReplicationTimeStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for ReplicationTimeStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EncryptionConfiguration {
pub replica_kms_key_id: std::option::Option<std::string::String>,
}
impl EncryptionConfiguration {
pub fn replica_kms_key_id(&self) -> std::option::Option<&str> {
self.replica_kms_key_id.as_deref()
}
}
impl std::fmt::Debug for EncryptionConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EncryptionConfiguration");
formatter.field("replica_kms_key_id", &self.replica_kms_key_id);
formatter.finish()
}
}
pub mod encryption_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) replica_kms_key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn replica_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.replica_kms_key_id = Some(input.into());
self
}
pub fn set_replica_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replica_kms_key_id = input;
self
}
pub fn build(self) -> crate::model::EncryptionConfiguration {
crate::model::EncryptionConfiguration {
replica_kms_key_id: self.replica_kms_key_id,
}
}
}
}
impl EncryptionConfiguration {
pub fn builder() -> crate::model::encryption_configuration::Builder {
crate::model::encryption_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccessControlTranslation {
pub owner: std::option::Option<crate::model::OwnerOverride>,
}
impl AccessControlTranslation {
pub fn owner(&self) -> std::option::Option<&crate::model::OwnerOverride> {
self.owner.as_ref()
}
}
impl std::fmt::Debug for AccessControlTranslation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccessControlTranslation");
formatter.field("owner", &self.owner);
formatter.finish()
}
}
pub mod access_control_translation {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::OwnerOverride>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::OwnerOverride) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(
mut self,
input: std::option::Option<crate::model::OwnerOverride>,
) -> Self {
self.owner = input;
self
}
pub fn build(self) -> crate::model::AccessControlTranslation {
crate::model::AccessControlTranslation { owner: self.owner }
}
}
}
impl AccessControlTranslation {
pub fn builder() -> crate::model::access_control_translation::Builder {
crate::model::access_control_translation::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 OwnerOverride {
#[allow(missing_docs)] Destination,
Unknown(String),
}
impl std::convert::From<&str> for OwnerOverride {
fn from(s: &str) -> Self {
match s {
"Destination" => OwnerOverride::Destination,
other => OwnerOverride::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for OwnerOverride {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OwnerOverride::from(s))
}
}
impl OwnerOverride {
pub fn as_str(&self) -> &str {
match self {
OwnerOverride::Destination => "Destination",
OwnerOverride::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Destination"]
}
}
impl AsRef<str> for OwnerOverride {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExistingObjectReplication {
pub status: std::option::Option<crate::model::ExistingObjectReplicationStatus>,
}
impl ExistingObjectReplication {
pub fn status(&self) -> std::option::Option<&crate::model::ExistingObjectReplicationStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for ExistingObjectReplication {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExistingObjectReplication");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod existing_object_replication {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::ExistingObjectReplicationStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::ExistingObjectReplicationStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ExistingObjectReplicationStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::ExistingObjectReplication {
crate::model::ExistingObjectReplication {
status: self.status,
}
}
}
}
impl ExistingObjectReplication {
pub fn builder() -> crate::model::existing_object_replication::Builder {
crate::model::existing_object_replication::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 ExistingObjectReplicationStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ExistingObjectReplicationStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => ExistingObjectReplicationStatus::Disabled,
"Enabled" => ExistingObjectReplicationStatus::Enabled,
other => ExistingObjectReplicationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ExistingObjectReplicationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExistingObjectReplicationStatus::from(s))
}
}
impl ExistingObjectReplicationStatus {
pub fn as_str(&self) -> &str {
match self {
ExistingObjectReplicationStatus::Disabled => "Disabled",
ExistingObjectReplicationStatus::Enabled => "Enabled",
ExistingObjectReplicationStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for ExistingObjectReplicationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SourceSelectionCriteria {
pub sse_kms_encrypted_objects: std::option::Option<crate::model::SseKmsEncryptedObjects>,
pub replica_modifications: std::option::Option<crate::model::ReplicaModifications>,
}
impl SourceSelectionCriteria {
pub fn sse_kms_encrypted_objects(
&self,
) -> std::option::Option<&crate::model::SseKmsEncryptedObjects> {
self.sse_kms_encrypted_objects.as_ref()
}
pub fn replica_modifications(
&self,
) -> std::option::Option<&crate::model::ReplicaModifications> {
self.replica_modifications.as_ref()
}
}
impl std::fmt::Debug for SourceSelectionCriteria {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SourceSelectionCriteria");
formatter.field("sse_kms_encrypted_objects", &self.sse_kms_encrypted_objects);
formatter.field("replica_modifications", &self.replica_modifications);
formatter.finish()
}
}
pub mod source_selection_criteria {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sse_kms_encrypted_objects:
std::option::Option<crate::model::SseKmsEncryptedObjects>,
pub(crate) replica_modifications: std::option::Option<crate::model::ReplicaModifications>,
}
impl Builder {
pub fn sse_kms_encrypted_objects(
mut self,
input: crate::model::SseKmsEncryptedObjects,
) -> Self {
self.sse_kms_encrypted_objects = Some(input);
self
}
pub fn set_sse_kms_encrypted_objects(
mut self,
input: std::option::Option<crate::model::SseKmsEncryptedObjects>,
) -> Self {
self.sse_kms_encrypted_objects = input;
self
}
pub fn replica_modifications(mut self, input: crate::model::ReplicaModifications) -> Self {
self.replica_modifications = Some(input);
self
}
pub fn set_replica_modifications(
mut self,
input: std::option::Option<crate::model::ReplicaModifications>,
) -> Self {
self.replica_modifications = input;
self
}
pub fn build(self) -> crate::model::SourceSelectionCriteria {
crate::model::SourceSelectionCriteria {
sse_kms_encrypted_objects: self.sse_kms_encrypted_objects,
replica_modifications: self.replica_modifications,
}
}
}
}
impl SourceSelectionCriteria {
pub fn builder() -> crate::model::source_selection_criteria::Builder {
crate::model::source_selection_criteria::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicaModifications {
pub status: std::option::Option<crate::model::ReplicaModificationsStatus>,
}
impl ReplicaModifications {
pub fn status(&self) -> std::option::Option<&crate::model::ReplicaModificationsStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for ReplicaModifications {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicaModifications");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod replica_modifications {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::ReplicaModificationsStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::ReplicaModificationsStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ReplicaModificationsStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::ReplicaModifications {
crate::model::ReplicaModifications {
status: self.status,
}
}
}
}
impl ReplicaModifications {
pub fn builder() -> crate::model::replica_modifications::Builder {
crate::model::replica_modifications::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 ReplicaModificationsStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ReplicaModificationsStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => ReplicaModificationsStatus::Disabled,
"Enabled" => ReplicaModificationsStatus::Enabled,
other => ReplicaModificationsStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReplicaModificationsStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReplicaModificationsStatus::from(s))
}
}
impl ReplicaModificationsStatus {
pub fn as_str(&self) -> &str {
match self {
ReplicaModificationsStatus::Disabled => "Disabled",
ReplicaModificationsStatus::Enabled => "Enabled",
ReplicaModificationsStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for ReplicaModificationsStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SseKmsEncryptedObjects {
pub status: std::option::Option<crate::model::SseKmsEncryptedObjectsStatus>,
}
impl SseKmsEncryptedObjects {
pub fn status(&self) -> std::option::Option<&crate::model::SseKmsEncryptedObjectsStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for SseKmsEncryptedObjects {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SseKmsEncryptedObjects");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod sse_kms_encrypted_objects {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::SseKmsEncryptedObjectsStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::SseKmsEncryptedObjectsStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::SseKmsEncryptedObjectsStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::SseKmsEncryptedObjects {
crate::model::SseKmsEncryptedObjects {
status: self.status,
}
}
}
}
impl SseKmsEncryptedObjects {
pub fn builder() -> crate::model::sse_kms_encrypted_objects::Builder {
crate::model::sse_kms_encrypted_objects::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 SseKmsEncryptedObjectsStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for SseKmsEncryptedObjectsStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => SseKmsEncryptedObjectsStatus::Disabled,
"Enabled" => SseKmsEncryptedObjectsStatus::Enabled,
other => SseKmsEncryptedObjectsStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SseKmsEncryptedObjectsStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SseKmsEncryptedObjectsStatus::from(s))
}
}
impl SseKmsEncryptedObjectsStatus {
pub fn as_str(&self) -> &str {
match self {
SseKmsEncryptedObjectsStatus::Disabled => "Disabled",
SseKmsEncryptedObjectsStatus::Enabled => "Enabled",
SseKmsEncryptedObjectsStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for SseKmsEncryptedObjectsStatus {
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 ReplicationRuleStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ReplicationRuleStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => ReplicationRuleStatus::Disabled,
"Enabled" => ReplicationRuleStatus::Enabled,
other => ReplicationRuleStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReplicationRuleStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReplicationRuleStatus::from(s))
}
}
impl ReplicationRuleStatus {
pub fn as_str(&self) -> &str {
match self {
ReplicationRuleStatus::Disabled => "Disabled",
ReplicationRuleStatus::Enabled => "Enabled",
ReplicationRuleStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for ReplicationRuleStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum ReplicationRuleFilter {
And(crate::model::ReplicationRuleAndOperator),
Prefix(std::string::String),
Tag(crate::model::Tag),
#[non_exhaustive]
Unknown,
}
impl ReplicationRuleFilter {
pub fn as_and(&self) -> std::result::Result<&crate::model::ReplicationRuleAndOperator, &Self> {
if let ReplicationRuleFilter::And(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_and(&self) -> bool {
self.as_and().is_ok()
}
pub fn as_prefix(&self) -> std::result::Result<&std::string::String, &Self> {
if let ReplicationRuleFilter::Prefix(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_prefix(&self) -> bool {
self.as_prefix().is_ok()
}
pub fn as_tag(&self) -> std::result::Result<&crate::model::Tag, &Self> {
if let ReplicationRuleFilter::Tag(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_tag(&self) -> bool {
self.as_tag().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReplicationRuleAndOperator {
pub prefix: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ReplicationRuleAndOperator {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for ReplicationRuleAndOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReplicationRuleAndOperator");
formatter.field("prefix", &self.prefix);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod replication_rule_and_operator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::ReplicationRuleAndOperator {
crate::model::ReplicationRuleAndOperator {
prefix: self.prefix,
tags: self.tags,
}
}
}
}
impl ReplicationRuleAndOperator {
pub fn builder() -> crate::model::replication_rule_and_operator::Builder {
crate::model::replication_rule_and_operator::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OwnershipControls {
pub rules: std::option::Option<std::vec::Vec<crate::model::OwnershipControlsRule>>,
}
impl OwnershipControls {
pub fn rules(&self) -> std::option::Option<&[crate::model::OwnershipControlsRule]> {
self.rules.as_deref()
}
}
impl std::fmt::Debug for OwnershipControls {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OwnershipControls");
formatter.field("rules", &self.rules);
formatter.finish()
}
}
pub mod ownership_controls {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) rules: std::option::Option<std::vec::Vec<crate::model::OwnershipControlsRule>>,
}
impl Builder {
pub fn rules(mut self, input: impl Into<crate::model::OwnershipControlsRule>) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input.into());
self.rules = Some(v);
self
}
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OwnershipControlsRule>>,
) -> Self {
self.rules = input;
self
}
pub fn build(self) -> crate::model::OwnershipControls {
crate::model::OwnershipControls { rules: self.rules }
}
}
}
impl OwnershipControls {
pub fn builder() -> crate::model::ownership_controls::Builder {
crate::model::ownership_controls::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OwnershipControlsRule {
pub object_ownership: std::option::Option<crate::model::ObjectOwnership>,
}
impl OwnershipControlsRule {
pub fn object_ownership(&self) -> std::option::Option<&crate::model::ObjectOwnership> {
self.object_ownership.as_ref()
}
}
impl std::fmt::Debug for OwnershipControlsRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OwnershipControlsRule");
formatter.field("object_ownership", &self.object_ownership);
formatter.finish()
}
}
pub mod ownership_controls_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) object_ownership: std::option::Option<crate::model::ObjectOwnership>,
}
impl Builder {
pub fn object_ownership(mut self, input: crate::model::ObjectOwnership) -> Self {
self.object_ownership = Some(input);
self
}
pub fn set_object_ownership(
mut self,
input: std::option::Option<crate::model::ObjectOwnership>,
) -> Self {
self.object_ownership = input;
self
}
pub fn build(self) -> crate::model::OwnershipControlsRule {
crate::model::OwnershipControlsRule {
object_ownership: self.object_ownership,
}
}
}
}
impl OwnershipControlsRule {
pub fn builder() -> crate::model::ownership_controls_rule::Builder {
crate::model::ownership_controls_rule::Builder::default()
}
}
#[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 ObjectOwnership {
#[allow(missing_docs)] BucketOwnerPreferred,
#[allow(missing_docs)] ObjectWriter,
Unknown(String),
}
impl std::convert::From<&str> for ObjectOwnership {
fn from(s: &str) -> Self {
match s {
"BucketOwnerPreferred" => ObjectOwnership::BucketOwnerPreferred,
"ObjectWriter" => ObjectOwnership::ObjectWriter,
other => ObjectOwnership::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectOwnership {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectOwnership::from(s))
}
}
impl ObjectOwnership {
pub fn as_str(&self) -> &str {
match self {
ObjectOwnership::BucketOwnerPreferred => "BucketOwnerPreferred",
ObjectOwnership::ObjectWriter => "ObjectWriter",
ObjectOwnership::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BucketOwnerPreferred", "ObjectWriter"]
}
}
impl AsRef<str> for ObjectOwnership {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotificationConfiguration {
pub topic_configurations: std::option::Option<std::vec::Vec<crate::model::TopicConfiguration>>,
pub queue_configurations: std::option::Option<std::vec::Vec<crate::model::QueueConfiguration>>,
pub lambda_function_configurations:
std::option::Option<std::vec::Vec<crate::model::LambdaFunctionConfiguration>>,
}
impl NotificationConfiguration {
pub fn topic_configurations(&self) -> std::option::Option<&[crate::model::TopicConfiguration]> {
self.topic_configurations.as_deref()
}
pub fn queue_configurations(&self) -> std::option::Option<&[crate::model::QueueConfiguration]> {
self.queue_configurations.as_deref()
}
pub fn lambda_function_configurations(
&self,
) -> std::option::Option<&[crate::model::LambdaFunctionConfiguration]> {
self.lambda_function_configurations.as_deref()
}
}
impl std::fmt::Debug for NotificationConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotificationConfiguration");
formatter.field("topic_configurations", &self.topic_configurations);
formatter.field("queue_configurations", &self.queue_configurations);
formatter.field(
"lambda_function_configurations",
&self.lambda_function_configurations,
);
formatter.finish()
}
}
pub mod notification_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_configurations:
std::option::Option<std::vec::Vec<crate::model::TopicConfiguration>>,
pub(crate) queue_configurations:
std::option::Option<std::vec::Vec<crate::model::QueueConfiguration>>,
pub(crate) lambda_function_configurations:
std::option::Option<std::vec::Vec<crate::model::LambdaFunctionConfiguration>>,
}
impl Builder {
pub fn topic_configurations(
mut self,
input: impl Into<crate::model::TopicConfiguration>,
) -> Self {
let mut v = self.topic_configurations.unwrap_or_default();
v.push(input.into());
self.topic_configurations = Some(v);
self
}
pub fn set_topic_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TopicConfiguration>>,
) -> Self {
self.topic_configurations = input;
self
}
pub fn queue_configurations(
mut self,
input: impl Into<crate::model::QueueConfiguration>,
) -> Self {
let mut v = self.queue_configurations.unwrap_or_default();
v.push(input.into());
self.queue_configurations = Some(v);
self
}
pub fn set_queue_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::QueueConfiguration>>,
) -> Self {
self.queue_configurations = input;
self
}
pub fn lambda_function_configurations(
mut self,
input: impl Into<crate::model::LambdaFunctionConfiguration>,
) -> Self {
let mut v = self.lambda_function_configurations.unwrap_or_default();
v.push(input.into());
self.lambda_function_configurations = Some(v);
self
}
pub fn set_lambda_function_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LambdaFunctionConfiguration>>,
) -> Self {
self.lambda_function_configurations = input;
self
}
pub fn build(self) -> crate::model::NotificationConfiguration {
crate::model::NotificationConfiguration {
topic_configurations: self.topic_configurations,
queue_configurations: self.queue_configurations,
lambda_function_configurations: self.lambda_function_configurations,
}
}
}
}
impl NotificationConfiguration {
pub fn builder() -> crate::model::notification_configuration::Builder {
crate::model::notification_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LambdaFunctionConfiguration {
pub id: std::option::Option<std::string::String>,
pub lambda_function_arn: std::option::Option<std::string::String>,
pub events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl LambdaFunctionConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn lambda_function_arn(&self) -> std::option::Option<&str> {
self.lambda_function_arn.as_deref()
}
pub fn events(&self) -> std::option::Option<&[crate::model::Event]> {
self.events.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::NotificationConfigurationFilter> {
self.filter.as_ref()
}
}
impl std::fmt::Debug for LambdaFunctionConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LambdaFunctionConfiguration");
formatter.field("id", &self.id);
formatter.field("lambda_function_arn", &self.lambda_function_arn);
formatter.field("events", &self.events);
formatter.field("filter", &self.filter);
formatter.finish()
}
}
pub mod lambda_function_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) lambda_function_arn: std::option::Option<std::string::String>,
pub(crate) events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub(crate) filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn lambda_function_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.lambda_function_arn = Some(input.into());
self
}
pub fn set_lambda_function_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.lambda_function_arn = input;
self
}
pub fn events(mut self, input: impl Into<crate::model::Event>) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input.into());
self.events = Some(v);
self
}
pub fn set_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Event>>,
) -> Self {
self.events = input;
self
}
pub fn filter(mut self, input: crate::model::NotificationConfigurationFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::NotificationConfigurationFilter>,
) -> Self {
self.filter = input;
self
}
pub fn build(self) -> crate::model::LambdaFunctionConfiguration {
crate::model::LambdaFunctionConfiguration {
id: self.id,
lambda_function_arn: self.lambda_function_arn,
events: self.events,
filter: self.filter,
}
}
}
}
impl LambdaFunctionConfiguration {
pub fn builder() -> crate::model::lambda_function_configuration::Builder {
crate::model::lambda_function_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotificationConfigurationFilter {
pub key: std::option::Option<crate::model::S3KeyFilter>,
}
impl NotificationConfigurationFilter {
pub fn key(&self) -> std::option::Option<&crate::model::S3KeyFilter> {
self.key.as_ref()
}
}
impl std::fmt::Debug for NotificationConfigurationFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotificationConfigurationFilter");
formatter.field("key", &self.key);
formatter.finish()
}
}
pub mod notification_configuration_filter {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<crate::model::S3KeyFilter>,
}
impl Builder {
pub fn key(mut self, input: crate::model::S3KeyFilter) -> Self {
self.key = Some(input);
self
}
pub fn set_key(mut self, input: std::option::Option<crate::model::S3KeyFilter>) -> Self {
self.key = input;
self
}
pub fn build(self) -> crate::model::NotificationConfigurationFilter {
crate::model::NotificationConfigurationFilter { key: self.key }
}
}
}
impl NotificationConfigurationFilter {
pub fn builder() -> crate::model::notification_configuration_filter::Builder {
crate::model::notification_configuration_filter::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3KeyFilter {
pub filter_rules: std::option::Option<std::vec::Vec<crate::model::FilterRule>>,
}
impl S3KeyFilter {
pub fn filter_rules(&self) -> std::option::Option<&[crate::model::FilterRule]> {
self.filter_rules.as_deref()
}
}
impl std::fmt::Debug for S3KeyFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3KeyFilter");
formatter.field("filter_rules", &self.filter_rules);
formatter.finish()
}
}
pub mod s3_key_filter {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter_rules: std::option::Option<std::vec::Vec<crate::model::FilterRule>>,
}
impl Builder {
pub fn filter_rules(mut self, input: impl Into<crate::model::FilterRule>) -> Self {
let mut v = self.filter_rules.unwrap_or_default();
v.push(input.into());
self.filter_rules = Some(v);
self
}
pub fn set_filter_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::FilterRule>>,
) -> Self {
self.filter_rules = input;
self
}
pub fn build(self) -> crate::model::S3KeyFilter {
crate::model::S3KeyFilter {
filter_rules: self.filter_rules,
}
}
}
}
impl S3KeyFilter {
pub fn builder() -> crate::model::s3_key_filter::Builder {
crate::model::s3_key_filter::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FilterRule {
pub name: std::option::Option<crate::model::FilterRuleName>,
pub value: std::option::Option<std::string::String>,
}
impl FilterRule {
pub fn name(&self) -> std::option::Option<&crate::model::FilterRuleName> {
self.name.as_ref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for FilterRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FilterRule");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod filter_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<crate::model::FilterRuleName>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: crate::model::FilterRuleName) -> Self {
self.name = Some(input);
self
}
pub fn set_name(
mut self,
input: std::option::Option<crate::model::FilterRuleName>,
) -> Self {
self.name = input;
self
}
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::FilterRule {
crate::model::FilterRule {
name: self.name,
value: self.value,
}
}
}
}
impl FilterRule {
pub fn builder() -> crate::model::filter_rule::Builder {
crate::model::filter_rule::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 FilterRuleName {
#[allow(missing_docs)] Prefix,
#[allow(missing_docs)] Suffix,
Unknown(String),
}
impl std::convert::From<&str> for FilterRuleName {
fn from(s: &str) -> Self {
match s {
"prefix" => FilterRuleName::Prefix,
"suffix" => FilterRuleName::Suffix,
other => FilterRuleName::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FilterRuleName {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FilterRuleName::from(s))
}
}
impl FilterRuleName {
pub fn as_str(&self) -> &str {
match self {
FilterRuleName::Prefix => "prefix",
FilterRuleName::Suffix => "suffix",
FilterRuleName::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["prefix", "suffix"]
}
}
impl AsRef<str> for FilterRuleName {
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 struct Event(String);
impl Event {
pub fn as_str(&self) -> &str {
&self.0
}
pub fn values() -> &'static [&'static str] {
&[
"s3:ObjectCreated:*",
"s3:ObjectCreated:CompleteMultipartUpload",
"s3:ObjectCreated:Copy",
"s3:ObjectCreated:Post",
"s3:ObjectCreated:Put",
"s3:ObjectRemoved:*",
"s3:ObjectRemoved:Delete",
"s3:ObjectRemoved:DeleteMarkerCreated",
"s3:ObjectRestore:*",
"s3:ObjectRestore:Completed",
"s3:ObjectRestore:Post",
"s3:ReducedRedundancyLostObject",
"s3:Replication:*",
"s3:Replication:OperationFailedReplication",
"s3:Replication:OperationMissedThreshold",
"s3:Replication:OperationNotTracked",
"s3:Replication:OperationReplicatedAfterThreshold",
]
}
}
impl<T> std::convert::From<T> for Event
where
T: std::convert::AsRef<str>,
{
fn from(s: T) -> Self {
Event(s.as_ref().to_owned())
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueueConfiguration {
pub id: std::option::Option<std::string::String>,
pub queue_arn: std::option::Option<std::string::String>,
pub events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl QueueConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn queue_arn(&self) -> std::option::Option<&str> {
self.queue_arn.as_deref()
}
pub fn events(&self) -> std::option::Option<&[crate::model::Event]> {
self.events.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::NotificationConfigurationFilter> {
self.filter.as_ref()
}
}
impl std::fmt::Debug for QueueConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("QueueConfiguration");
formatter.field("id", &self.id);
formatter.field("queue_arn", &self.queue_arn);
formatter.field("events", &self.events);
formatter.field("filter", &self.filter);
formatter.finish()
}
}
pub mod queue_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) queue_arn: std::option::Option<std::string::String>,
pub(crate) events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub(crate) filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn queue_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.queue_arn = Some(input.into());
self
}
pub fn set_queue_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.queue_arn = input;
self
}
pub fn events(mut self, input: impl Into<crate::model::Event>) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input.into());
self.events = Some(v);
self
}
pub fn set_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Event>>,
) -> Self {
self.events = input;
self
}
pub fn filter(mut self, input: crate::model::NotificationConfigurationFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::NotificationConfigurationFilter>,
) -> Self {
self.filter = input;
self
}
pub fn build(self) -> crate::model::QueueConfiguration {
crate::model::QueueConfiguration {
id: self.id,
queue_arn: self.queue_arn,
events: self.events,
filter: self.filter,
}
}
}
}
impl QueueConfiguration {
pub fn builder() -> crate::model::queue_configuration::Builder {
crate::model::queue_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TopicConfiguration {
pub id: std::option::Option<std::string::String>,
pub topic_arn: std::option::Option<std::string::String>,
pub events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl TopicConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
pub fn events(&self) -> std::option::Option<&[crate::model::Event]> {
self.events.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::NotificationConfigurationFilter> {
self.filter.as_ref()
}
}
impl std::fmt::Debug for TopicConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TopicConfiguration");
formatter.field("id", &self.id);
formatter.field("topic_arn", &self.topic_arn);
formatter.field("events", &self.events);
formatter.field("filter", &self.filter);
formatter.finish()
}
}
pub mod topic_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) events: std::option::Option<std::vec::Vec<crate::model::Event>>,
pub(crate) filter: std::option::Option<crate::model::NotificationConfigurationFilter>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
pub fn events(mut self, input: impl Into<crate::model::Event>) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input.into());
self.events = Some(v);
self
}
pub fn set_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Event>>,
) -> Self {
self.events = input;
self
}
pub fn filter(mut self, input: crate::model::NotificationConfigurationFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::NotificationConfigurationFilter>,
) -> Self {
self.filter = input;
self
}
pub fn build(self) -> crate::model::TopicConfiguration {
crate::model::TopicConfiguration {
id: self.id,
topic_arn: self.topic_arn,
events: self.events,
filter: self.filter,
}
}
}
}
impl TopicConfiguration {
pub fn builder() -> crate::model::topic_configuration::Builder {
crate::model::topic_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetricsConfiguration {
pub id: std::option::Option<std::string::String>,
pub filter: std::option::Option<crate::model::MetricsFilter>,
}
impl MetricsConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::MetricsFilter> {
self.filter.as_ref()
}
}
impl std::fmt::Debug for MetricsConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MetricsConfiguration");
formatter.field("id", &self.id);
formatter.field("filter", &self.filter);
formatter.finish()
}
}
pub mod metrics_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) filter: std::option::Option<crate::model::MetricsFilter>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn filter(mut self, input: crate::model::MetricsFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::MetricsFilter>,
) -> Self {
self.filter = input;
self
}
pub fn build(self) -> crate::model::MetricsConfiguration {
crate::model::MetricsConfiguration {
id: self.id,
filter: self.filter,
}
}
}
}
impl MetricsConfiguration {
pub fn builder() -> crate::model::metrics_configuration::Builder {
crate::model::metrics_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum MetricsFilter {
AccessPointArn(std::string::String),
And(crate::model::MetricsAndOperator),
Prefix(std::string::String),
Tag(crate::model::Tag),
#[non_exhaustive]
Unknown,
}
impl MetricsFilter {
pub fn as_access_point_arn(&self) -> std::result::Result<&std::string::String, &Self> {
if let MetricsFilter::AccessPointArn(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_access_point_arn(&self) -> bool {
self.as_access_point_arn().is_ok()
}
pub fn as_and(&self) -> std::result::Result<&crate::model::MetricsAndOperator, &Self> {
if let MetricsFilter::And(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_and(&self) -> bool {
self.as_and().is_ok()
}
pub fn as_prefix(&self) -> std::result::Result<&std::string::String, &Self> {
if let MetricsFilter::Prefix(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_prefix(&self) -> bool {
self.as_prefix().is_ok()
}
pub fn as_tag(&self) -> std::result::Result<&crate::model::Tag, &Self> {
if let MetricsFilter::Tag(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_tag(&self) -> bool {
self.as_tag().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetricsAndOperator {
pub prefix: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub access_point_arn: std::option::Option<std::string::String>,
}
impl MetricsAndOperator {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn access_point_arn(&self) -> std::option::Option<&str> {
self.access_point_arn.as_deref()
}
}
impl std::fmt::Debug for MetricsAndOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MetricsAndOperator");
formatter.field("prefix", &self.prefix);
formatter.field("tags", &self.tags);
formatter.field("access_point_arn", &self.access_point_arn);
formatter.finish()
}
}
pub mod metrics_and_operator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) access_point_arn: std::option::Option<std::string::String>,
}
impl Builder {
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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn access_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.access_point_arn = Some(input.into());
self
}
pub fn set_access_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.access_point_arn = input;
self
}
pub fn build(self) -> crate::model::MetricsAndOperator {
crate::model::MetricsAndOperator {
prefix: self.prefix,
tags: self.tags,
access_point_arn: self.access_point_arn,
}
}
}
}
impl MetricsAndOperator {
pub fn builder() -> crate::model::metrics_and_operator::Builder {
crate::model::metrics_and_operator::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BucketLoggingStatus {
pub logging_enabled: std::option::Option<crate::model::LoggingEnabled>,
}
impl BucketLoggingStatus {
pub fn logging_enabled(&self) -> std::option::Option<&crate::model::LoggingEnabled> {
self.logging_enabled.as_ref()
}
}
impl std::fmt::Debug for BucketLoggingStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BucketLoggingStatus");
formatter.field("logging_enabled", &self.logging_enabled);
formatter.finish()
}
}
pub mod bucket_logging_status {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) logging_enabled: std::option::Option<crate::model::LoggingEnabled>,
}
impl Builder {
pub fn logging_enabled(mut self, input: crate::model::LoggingEnabled) -> Self {
self.logging_enabled = Some(input);
self
}
pub fn set_logging_enabled(
mut self,
input: std::option::Option<crate::model::LoggingEnabled>,
) -> Self {
self.logging_enabled = input;
self
}
pub fn build(self) -> crate::model::BucketLoggingStatus {
crate::model::BucketLoggingStatus {
logging_enabled: self.logging_enabled,
}
}
}
}
impl BucketLoggingStatus {
pub fn builder() -> crate::model::bucket_logging_status::Builder {
crate::model::bucket_logging_status::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LoggingEnabled {
pub target_bucket: std::option::Option<std::string::String>,
pub target_grants: std::option::Option<std::vec::Vec<crate::model::TargetGrant>>,
pub target_prefix: std::option::Option<std::string::String>,
}
impl LoggingEnabled {
pub fn target_bucket(&self) -> std::option::Option<&str> {
self.target_bucket.as_deref()
}
pub fn target_grants(&self) -> std::option::Option<&[crate::model::TargetGrant]> {
self.target_grants.as_deref()
}
pub fn target_prefix(&self) -> std::option::Option<&str> {
self.target_prefix.as_deref()
}
}
impl std::fmt::Debug for LoggingEnabled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LoggingEnabled");
formatter.field("target_bucket", &self.target_bucket);
formatter.field("target_grants", &self.target_grants);
formatter.field("target_prefix", &self.target_prefix);
formatter.finish()
}
}
pub mod logging_enabled {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) target_bucket: std::option::Option<std::string::String>,
pub(crate) target_grants: std::option::Option<std::vec::Vec<crate::model::TargetGrant>>,
pub(crate) target_prefix: std::option::Option<std::string::String>,
}
impl Builder {
pub fn target_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.target_bucket = Some(input.into());
self
}
pub fn set_target_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_bucket = input;
self
}
pub fn target_grants(mut self, input: impl Into<crate::model::TargetGrant>) -> Self {
let mut v = self.target_grants.unwrap_or_default();
v.push(input.into());
self.target_grants = Some(v);
self
}
pub fn set_target_grants(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TargetGrant>>,
) -> Self {
self.target_grants = input;
self
}
pub fn target_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.target_prefix = Some(input.into());
self
}
pub fn set_target_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_prefix = input;
self
}
pub fn build(self) -> crate::model::LoggingEnabled {
crate::model::LoggingEnabled {
target_bucket: self.target_bucket,
target_grants: self.target_grants,
target_prefix: self.target_prefix,
}
}
}
}
impl LoggingEnabled {
pub fn builder() -> crate::model::logging_enabled::Builder {
crate::model::logging_enabled::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TargetGrant {
pub grantee: std::option::Option<crate::model::Grantee>,
pub permission: std::option::Option<crate::model::BucketLogsPermission>,
}
impl TargetGrant {
pub fn grantee(&self) -> std::option::Option<&crate::model::Grantee> {
self.grantee.as_ref()
}
pub fn permission(&self) -> std::option::Option<&crate::model::BucketLogsPermission> {
self.permission.as_ref()
}
}
impl std::fmt::Debug for TargetGrant {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TargetGrant");
formatter.field("grantee", &self.grantee);
formatter.field("permission", &self.permission);
formatter.finish()
}
}
pub mod target_grant {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) grantee: std::option::Option<crate::model::Grantee>,
pub(crate) permission: std::option::Option<crate::model::BucketLogsPermission>,
}
impl Builder {
pub fn grantee(mut self, input: crate::model::Grantee) -> Self {
self.grantee = Some(input);
self
}
pub fn set_grantee(mut self, input: std::option::Option<crate::model::Grantee>) -> Self {
self.grantee = input;
self
}
pub fn permission(mut self, input: crate::model::BucketLogsPermission) -> Self {
self.permission = Some(input);
self
}
pub fn set_permission(
mut self,
input: std::option::Option<crate::model::BucketLogsPermission>,
) -> Self {
self.permission = input;
self
}
pub fn build(self) -> crate::model::TargetGrant {
crate::model::TargetGrant {
grantee: self.grantee,
permission: self.permission,
}
}
}
}
impl TargetGrant {
pub fn builder() -> crate::model::target_grant::Builder {
crate::model::target_grant::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 BucketLogsPermission {
#[allow(missing_docs)] FullControl,
#[allow(missing_docs)] Read,
#[allow(missing_docs)] Write,
Unknown(String),
}
impl std::convert::From<&str> for BucketLogsPermission {
fn from(s: &str) -> Self {
match s {
"FULL_CONTROL" => BucketLogsPermission::FullControl,
"READ" => BucketLogsPermission::Read,
"WRITE" => BucketLogsPermission::Write,
other => BucketLogsPermission::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BucketLogsPermission {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BucketLogsPermission::from(s))
}
}
impl BucketLogsPermission {
pub fn as_str(&self) -> &str {
match self {
BucketLogsPermission::FullControl => "FULL_CONTROL",
BucketLogsPermission::Read => "READ",
BucketLogsPermission::Write => "WRITE",
BucketLogsPermission::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FULL_CONTROL", "READ", "WRITE"]
}
}
impl AsRef<str> for BucketLogsPermission {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BucketLifecycleConfiguration {
pub rules: std::option::Option<std::vec::Vec<crate::model::LifecycleRule>>,
}
impl BucketLifecycleConfiguration {
pub fn rules(&self) -> std::option::Option<&[crate::model::LifecycleRule]> {
self.rules.as_deref()
}
}
impl std::fmt::Debug for BucketLifecycleConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BucketLifecycleConfiguration");
formatter.field("rules", &self.rules);
formatter.finish()
}
}
pub mod bucket_lifecycle_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) rules: std::option::Option<std::vec::Vec<crate::model::LifecycleRule>>,
}
impl Builder {
pub fn rules(mut self, input: impl Into<crate::model::LifecycleRule>) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input.into());
self.rules = Some(v);
self
}
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LifecycleRule>>,
) -> Self {
self.rules = input;
self
}
pub fn build(self) -> crate::model::BucketLifecycleConfiguration {
crate::model::BucketLifecycleConfiguration { rules: self.rules }
}
}
}
impl BucketLifecycleConfiguration {
pub fn builder() -> crate::model::bucket_lifecycle_configuration::Builder {
crate::model::bucket_lifecycle_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LifecycleRule {
pub expiration: std::option::Option<crate::model::LifecycleExpiration>,
pub id: std::option::Option<std::string::String>,
pub prefix: std::option::Option<std::string::String>,
pub filter: std::option::Option<crate::model::LifecycleRuleFilter>,
pub status: std::option::Option<crate::model::ExpirationStatus>,
pub transitions: std::option::Option<std::vec::Vec<crate::model::Transition>>,
pub noncurrent_version_transitions:
std::option::Option<std::vec::Vec<crate::model::NoncurrentVersionTransition>>,
pub noncurrent_version_expiration:
std::option::Option<crate::model::NoncurrentVersionExpiration>,
pub abort_incomplete_multipart_upload:
std::option::Option<crate::model::AbortIncompleteMultipartUpload>,
}
impl LifecycleRule {
pub fn expiration(&self) -> std::option::Option<&crate::model::LifecycleExpiration> {
self.expiration.as_ref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::LifecycleRuleFilter> {
self.filter.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ExpirationStatus> {
self.status.as_ref()
}
pub fn transitions(&self) -> std::option::Option<&[crate::model::Transition]> {
self.transitions.as_deref()
}
pub fn noncurrent_version_transitions(
&self,
) -> std::option::Option<&[crate::model::NoncurrentVersionTransition]> {
self.noncurrent_version_transitions.as_deref()
}
pub fn noncurrent_version_expiration(
&self,
) -> std::option::Option<&crate::model::NoncurrentVersionExpiration> {
self.noncurrent_version_expiration.as_ref()
}
pub fn abort_incomplete_multipart_upload(
&self,
) -> std::option::Option<&crate::model::AbortIncompleteMultipartUpload> {
self.abort_incomplete_multipart_upload.as_ref()
}
}
impl std::fmt::Debug for LifecycleRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LifecycleRule");
formatter.field("expiration", &self.expiration);
formatter.field("id", &self.id);
formatter.field("prefix", &self.prefix);
formatter.field("filter", &self.filter);
formatter.field("status", &self.status);
formatter.field("transitions", &self.transitions);
formatter.field(
"noncurrent_version_transitions",
&self.noncurrent_version_transitions,
);
formatter.field(
"noncurrent_version_expiration",
&self.noncurrent_version_expiration,
);
formatter.field(
"abort_incomplete_multipart_upload",
&self.abort_incomplete_multipart_upload,
);
formatter.finish()
}
}
pub mod lifecycle_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) expiration: std::option::Option<crate::model::LifecycleExpiration>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) filter: std::option::Option<crate::model::LifecycleRuleFilter>,
pub(crate) status: std::option::Option<crate::model::ExpirationStatus>,
pub(crate) transitions: std::option::Option<std::vec::Vec<crate::model::Transition>>,
pub(crate) noncurrent_version_transitions:
std::option::Option<std::vec::Vec<crate::model::NoncurrentVersionTransition>>,
pub(crate) noncurrent_version_expiration:
std::option::Option<crate::model::NoncurrentVersionExpiration>,
pub(crate) abort_incomplete_multipart_upload:
std::option::Option<crate::model::AbortIncompleteMultipartUpload>,
}
impl Builder {
pub fn expiration(mut self, input: crate::model::LifecycleExpiration) -> Self {
self.expiration = Some(input);
self
}
pub fn set_expiration(
mut self,
input: std::option::Option<crate::model::LifecycleExpiration>,
) -> Self {
self.expiration = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = 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 filter(mut self, input: crate::model::LifecycleRuleFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::LifecycleRuleFilter>,
) -> Self {
self.filter = input;
self
}
pub fn status(mut self, input: crate::model::ExpirationStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ExpirationStatus>,
) -> Self {
self.status = input;
self
}
pub fn transitions(mut self, input: impl Into<crate::model::Transition>) -> Self {
let mut v = self.transitions.unwrap_or_default();
v.push(input.into());
self.transitions = Some(v);
self
}
pub fn set_transitions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Transition>>,
) -> Self {
self.transitions = input;
self
}
pub fn noncurrent_version_transitions(
mut self,
input: impl Into<crate::model::NoncurrentVersionTransition>,
) -> Self {
let mut v = self.noncurrent_version_transitions.unwrap_or_default();
v.push(input.into());
self.noncurrent_version_transitions = Some(v);
self
}
pub fn set_noncurrent_version_transitions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NoncurrentVersionTransition>>,
) -> Self {
self.noncurrent_version_transitions = input;
self
}
pub fn noncurrent_version_expiration(
mut self,
input: crate::model::NoncurrentVersionExpiration,
) -> Self {
self.noncurrent_version_expiration = Some(input);
self
}
pub fn set_noncurrent_version_expiration(
mut self,
input: std::option::Option<crate::model::NoncurrentVersionExpiration>,
) -> Self {
self.noncurrent_version_expiration = input;
self
}
pub fn abort_incomplete_multipart_upload(
mut self,
input: crate::model::AbortIncompleteMultipartUpload,
) -> Self {
self.abort_incomplete_multipart_upload = Some(input);
self
}
pub fn set_abort_incomplete_multipart_upload(
mut self,
input: std::option::Option<crate::model::AbortIncompleteMultipartUpload>,
) -> Self {
self.abort_incomplete_multipart_upload = input;
self
}
pub fn build(self) -> crate::model::LifecycleRule {
crate::model::LifecycleRule {
expiration: self.expiration,
id: self.id,
prefix: self.prefix,
filter: self.filter,
status: self.status,
transitions: self.transitions,
noncurrent_version_transitions: self.noncurrent_version_transitions,
noncurrent_version_expiration: self.noncurrent_version_expiration,
abort_incomplete_multipart_upload: self.abort_incomplete_multipart_upload,
}
}
}
}
impl LifecycleRule {
pub fn builder() -> crate::model::lifecycle_rule::Builder {
crate::model::lifecycle_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AbortIncompleteMultipartUpload {
pub days_after_initiation: i32,
}
impl AbortIncompleteMultipartUpload {
pub fn days_after_initiation(&self) -> i32 {
self.days_after_initiation
}
}
impl std::fmt::Debug for AbortIncompleteMultipartUpload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AbortIncompleteMultipartUpload");
formatter.field("days_after_initiation", &self.days_after_initiation);
formatter.finish()
}
}
pub mod abort_incomplete_multipart_upload {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) days_after_initiation: std::option::Option<i32>,
}
impl Builder {
pub fn days_after_initiation(mut self, input: i32) -> Self {
self.days_after_initiation = Some(input);
self
}
pub fn set_days_after_initiation(mut self, input: std::option::Option<i32>) -> Self {
self.days_after_initiation = input;
self
}
pub fn build(self) -> crate::model::AbortIncompleteMultipartUpload {
crate::model::AbortIncompleteMultipartUpload {
days_after_initiation: self.days_after_initiation.unwrap_or_default(),
}
}
}
}
impl AbortIncompleteMultipartUpload {
pub fn builder() -> crate::model::abort_incomplete_multipart_upload::Builder {
crate::model::abort_incomplete_multipart_upload::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoncurrentVersionExpiration {
pub noncurrent_days: i32,
}
impl NoncurrentVersionExpiration {
pub fn noncurrent_days(&self) -> i32 {
self.noncurrent_days
}
}
impl std::fmt::Debug for NoncurrentVersionExpiration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoncurrentVersionExpiration");
formatter.field("noncurrent_days", &self.noncurrent_days);
formatter.finish()
}
}
pub mod noncurrent_version_expiration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) noncurrent_days: std::option::Option<i32>,
}
impl Builder {
pub fn noncurrent_days(mut self, input: i32) -> Self {
self.noncurrent_days = Some(input);
self
}
pub fn set_noncurrent_days(mut self, input: std::option::Option<i32>) -> Self {
self.noncurrent_days = input;
self
}
pub fn build(self) -> crate::model::NoncurrentVersionExpiration {
crate::model::NoncurrentVersionExpiration {
noncurrent_days: self.noncurrent_days.unwrap_or_default(),
}
}
}
}
impl NoncurrentVersionExpiration {
pub fn builder() -> crate::model::noncurrent_version_expiration::Builder {
crate::model::noncurrent_version_expiration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoncurrentVersionTransition {
pub noncurrent_days: i32,
pub storage_class: std::option::Option<crate::model::TransitionStorageClass>,
}
impl NoncurrentVersionTransition {
pub fn noncurrent_days(&self) -> i32 {
self.noncurrent_days
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::TransitionStorageClass> {
self.storage_class.as_ref()
}
}
impl std::fmt::Debug for NoncurrentVersionTransition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoncurrentVersionTransition");
formatter.field("noncurrent_days", &self.noncurrent_days);
formatter.field("storage_class", &self.storage_class);
formatter.finish()
}
}
pub mod noncurrent_version_transition {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) noncurrent_days: std::option::Option<i32>,
pub(crate) storage_class: std::option::Option<crate::model::TransitionStorageClass>,
}
impl Builder {
pub fn noncurrent_days(mut self, input: i32) -> Self {
self.noncurrent_days = Some(input);
self
}
pub fn set_noncurrent_days(mut self, input: std::option::Option<i32>) -> Self {
self.noncurrent_days = input;
self
}
pub fn storage_class(mut self, input: crate::model::TransitionStorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::TransitionStorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn build(self) -> crate::model::NoncurrentVersionTransition {
crate::model::NoncurrentVersionTransition {
noncurrent_days: self.noncurrent_days.unwrap_or_default(),
storage_class: self.storage_class,
}
}
}
}
impl NoncurrentVersionTransition {
pub fn builder() -> crate::model::noncurrent_version_transition::Builder {
crate::model::noncurrent_version_transition::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 TransitionStorageClass {
#[allow(missing_docs)] DeepArchive,
#[allow(missing_docs)] Glacier,
#[allow(missing_docs)] IntelligentTiering,
#[allow(missing_docs)] OnezoneIa,
#[allow(missing_docs)] StandardIa,
Unknown(String),
}
impl std::convert::From<&str> for TransitionStorageClass {
fn from(s: &str) -> Self {
match s {
"DEEP_ARCHIVE" => TransitionStorageClass::DeepArchive,
"GLACIER" => TransitionStorageClass::Glacier,
"INTELLIGENT_TIERING" => TransitionStorageClass::IntelligentTiering,
"ONEZONE_IA" => TransitionStorageClass::OnezoneIa,
"STANDARD_IA" => TransitionStorageClass::StandardIa,
other => TransitionStorageClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TransitionStorageClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TransitionStorageClass::from(s))
}
}
impl TransitionStorageClass {
pub fn as_str(&self) -> &str {
match self {
TransitionStorageClass::DeepArchive => "DEEP_ARCHIVE",
TransitionStorageClass::Glacier => "GLACIER",
TransitionStorageClass::IntelligentTiering => "INTELLIGENT_TIERING",
TransitionStorageClass::OnezoneIa => "ONEZONE_IA",
TransitionStorageClass::StandardIa => "STANDARD_IA",
TransitionStorageClass::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DEEP_ARCHIVE",
"GLACIER",
"INTELLIGENT_TIERING",
"ONEZONE_IA",
"STANDARD_IA",
]
}
}
impl AsRef<str> for TransitionStorageClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Transition {
pub date: std::option::Option<aws_smithy_types::DateTime>,
pub days: i32,
pub storage_class: std::option::Option<crate::model::TransitionStorageClass>,
}
impl Transition {
pub fn date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.date.as_ref()
}
pub fn days(&self) -> i32 {
self.days
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::TransitionStorageClass> {
self.storage_class.as_ref()
}
}
impl std::fmt::Debug for Transition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Transition");
formatter.field("date", &self.date);
formatter.field("days", &self.days);
formatter.field("storage_class", &self.storage_class);
formatter.finish()
}
}
pub mod transition {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) days: std::option::Option<i32>,
pub(crate) storage_class: std::option::Option<crate::model::TransitionStorageClass>,
}
impl Builder {
pub fn date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.date = Some(input);
self
}
pub fn set_date(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
self.date = input;
self
}
pub fn days(mut self, input: i32) -> Self {
self.days = Some(input);
self
}
pub fn set_days(mut self, input: std::option::Option<i32>) -> Self {
self.days = input;
self
}
pub fn storage_class(mut self, input: crate::model::TransitionStorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::TransitionStorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn build(self) -> crate::model::Transition {
crate::model::Transition {
date: self.date,
days: self.days.unwrap_or_default(),
storage_class: self.storage_class,
}
}
}
}
impl Transition {
pub fn builder() -> crate::model::transition::Builder {
crate::model::transition::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 ExpirationStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for ExpirationStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => ExpirationStatus::Disabled,
"Enabled" => ExpirationStatus::Enabled,
other => ExpirationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ExpirationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExpirationStatus::from(s))
}
}
impl ExpirationStatus {
pub fn as_str(&self) -> &str {
match self {
ExpirationStatus::Disabled => "Disabled",
ExpirationStatus::Enabled => "Enabled",
ExpirationStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for ExpirationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum LifecycleRuleFilter {
And(crate::model::LifecycleRuleAndOperator),
Prefix(std::string::String),
Tag(crate::model::Tag),
#[non_exhaustive]
Unknown,
}
impl LifecycleRuleFilter {
pub fn as_and(&self) -> std::result::Result<&crate::model::LifecycleRuleAndOperator, &Self> {
if let LifecycleRuleFilter::And(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_and(&self) -> bool {
self.as_and().is_ok()
}
pub fn as_prefix(&self) -> std::result::Result<&std::string::String, &Self> {
if let LifecycleRuleFilter::Prefix(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_prefix(&self) -> bool {
self.as_prefix().is_ok()
}
pub fn as_tag(&self) -> std::result::Result<&crate::model::Tag, &Self> {
if let LifecycleRuleFilter::Tag(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_tag(&self) -> bool {
self.as_tag().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LifecycleRuleAndOperator {
pub prefix: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LifecycleRuleAndOperator {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for LifecycleRuleAndOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LifecycleRuleAndOperator");
formatter.field("prefix", &self.prefix);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod lifecycle_rule_and_operator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::LifecycleRuleAndOperator {
crate::model::LifecycleRuleAndOperator {
prefix: self.prefix,
tags: self.tags,
}
}
}
}
impl LifecycleRuleAndOperator {
pub fn builder() -> crate::model::lifecycle_rule_and_operator::Builder {
crate::model::lifecycle_rule_and_operator::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LifecycleExpiration {
pub date: std::option::Option<aws_smithy_types::DateTime>,
pub days: i32,
pub expired_object_delete_marker: bool,
}
impl LifecycleExpiration {
pub fn date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.date.as_ref()
}
pub fn days(&self) -> i32 {
self.days
}
pub fn expired_object_delete_marker(&self) -> bool {
self.expired_object_delete_marker
}
}
impl std::fmt::Debug for LifecycleExpiration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LifecycleExpiration");
formatter.field("date", &self.date);
formatter.field("days", &self.days);
formatter.field(
"expired_object_delete_marker",
&self.expired_object_delete_marker,
);
formatter.finish()
}
}
pub mod lifecycle_expiration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) days: std::option::Option<i32>,
pub(crate) expired_object_delete_marker: std::option::Option<bool>,
}
impl Builder {
pub fn date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.date = Some(input);
self
}
pub fn set_date(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
self.date = input;
self
}
pub fn days(mut self, input: i32) -> Self {
self.days = Some(input);
self
}
pub fn set_days(mut self, input: std::option::Option<i32>) -> Self {
self.days = input;
self
}
pub fn expired_object_delete_marker(mut self, input: bool) -> Self {
self.expired_object_delete_marker = Some(input);
self
}
pub fn set_expired_object_delete_marker(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.expired_object_delete_marker = input;
self
}
pub fn build(self) -> crate::model::LifecycleExpiration {
crate::model::LifecycleExpiration {
date: self.date,
days: self.days.unwrap_or_default(),
expired_object_delete_marker: self.expired_object_delete_marker.unwrap_or_default(),
}
}
}
}
impl LifecycleExpiration {
pub fn builder() -> crate::model::lifecycle_expiration::Builder {
crate::model::lifecycle_expiration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventoryConfiguration {
pub destination: std::option::Option<crate::model::InventoryDestination>,
pub is_enabled: bool,
pub filter: std::option::Option<crate::model::InventoryFilter>,
pub id: std::option::Option<std::string::String>,
pub included_object_versions:
std::option::Option<crate::model::InventoryIncludedObjectVersions>,
pub optional_fields: std::option::Option<std::vec::Vec<crate::model::InventoryOptionalField>>,
pub schedule: std::option::Option<crate::model::InventorySchedule>,
}
impl InventoryConfiguration {
pub fn destination(&self) -> std::option::Option<&crate::model::InventoryDestination> {
self.destination.as_ref()
}
pub fn is_enabled(&self) -> bool {
self.is_enabled
}
pub fn filter(&self) -> std::option::Option<&crate::model::InventoryFilter> {
self.filter.as_ref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn included_object_versions(
&self,
) -> std::option::Option<&crate::model::InventoryIncludedObjectVersions> {
self.included_object_versions.as_ref()
}
pub fn optional_fields(&self) -> std::option::Option<&[crate::model::InventoryOptionalField]> {
self.optional_fields.as_deref()
}
pub fn schedule(&self) -> std::option::Option<&crate::model::InventorySchedule> {
self.schedule.as_ref()
}
}
impl std::fmt::Debug for InventoryConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventoryConfiguration");
formatter.field("destination", &self.destination);
formatter.field("is_enabled", &self.is_enabled);
formatter.field("filter", &self.filter);
formatter.field("id", &self.id);
formatter.field("included_object_versions", &self.included_object_versions);
formatter.field("optional_fields", &self.optional_fields);
formatter.field("schedule", &self.schedule);
formatter.finish()
}
}
pub mod inventory_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination: std::option::Option<crate::model::InventoryDestination>,
pub(crate) is_enabled: std::option::Option<bool>,
pub(crate) filter: std::option::Option<crate::model::InventoryFilter>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) included_object_versions:
std::option::Option<crate::model::InventoryIncludedObjectVersions>,
pub(crate) optional_fields:
std::option::Option<std::vec::Vec<crate::model::InventoryOptionalField>>,
pub(crate) schedule: std::option::Option<crate::model::InventorySchedule>,
}
impl Builder {
pub fn destination(mut self, input: crate::model::InventoryDestination) -> Self {
self.destination = Some(input);
self
}
pub fn set_destination(
mut self,
input: std::option::Option<crate::model::InventoryDestination>,
) -> Self {
self.destination = input;
self
}
pub fn is_enabled(mut self, input: bool) -> Self {
self.is_enabled = Some(input);
self
}
pub fn set_is_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.is_enabled = input;
self
}
pub fn filter(mut self, input: crate::model::InventoryFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::InventoryFilter>,
) -> Self {
self.filter = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn included_object_versions(
mut self,
input: crate::model::InventoryIncludedObjectVersions,
) -> Self {
self.included_object_versions = Some(input);
self
}
pub fn set_included_object_versions(
mut self,
input: std::option::Option<crate::model::InventoryIncludedObjectVersions>,
) -> Self {
self.included_object_versions = input;
self
}
pub fn optional_fields(
mut self,
input: impl Into<crate::model::InventoryOptionalField>,
) -> Self {
let mut v = self.optional_fields.unwrap_or_default();
v.push(input.into());
self.optional_fields = Some(v);
self
}
pub fn set_optional_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InventoryOptionalField>>,
) -> Self {
self.optional_fields = input;
self
}
pub fn schedule(mut self, input: crate::model::InventorySchedule) -> Self {
self.schedule = Some(input);
self
}
pub fn set_schedule(
mut self,
input: std::option::Option<crate::model::InventorySchedule>,
) -> Self {
self.schedule = input;
self
}
pub fn build(self) -> crate::model::InventoryConfiguration {
crate::model::InventoryConfiguration {
destination: self.destination,
is_enabled: self.is_enabled.unwrap_or_default(),
filter: self.filter,
id: self.id,
included_object_versions: self.included_object_versions,
optional_fields: self.optional_fields,
schedule: self.schedule,
}
}
}
}
impl InventoryConfiguration {
pub fn builder() -> crate::model::inventory_configuration::Builder {
crate::model::inventory_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventorySchedule {
pub frequency: std::option::Option<crate::model::InventoryFrequency>,
}
impl InventorySchedule {
pub fn frequency(&self) -> std::option::Option<&crate::model::InventoryFrequency> {
self.frequency.as_ref()
}
}
impl std::fmt::Debug for InventorySchedule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventorySchedule");
formatter.field("frequency", &self.frequency);
formatter.finish()
}
}
pub mod inventory_schedule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) frequency: std::option::Option<crate::model::InventoryFrequency>,
}
impl Builder {
pub fn frequency(mut self, input: crate::model::InventoryFrequency) -> Self {
self.frequency = Some(input);
self
}
pub fn set_frequency(
mut self,
input: std::option::Option<crate::model::InventoryFrequency>,
) -> Self {
self.frequency = input;
self
}
pub fn build(self) -> crate::model::InventorySchedule {
crate::model::InventorySchedule {
frequency: self.frequency,
}
}
}
}
impl InventorySchedule {
pub fn builder() -> crate::model::inventory_schedule::Builder {
crate::model::inventory_schedule::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 InventoryFrequency {
#[allow(missing_docs)] Daily,
#[allow(missing_docs)] Weekly,
Unknown(String),
}
impl std::convert::From<&str> for InventoryFrequency {
fn from(s: &str) -> Self {
match s {
"Daily" => InventoryFrequency::Daily,
"Weekly" => InventoryFrequency::Weekly,
other => InventoryFrequency::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InventoryFrequency {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InventoryFrequency::from(s))
}
}
impl InventoryFrequency {
pub fn as_str(&self) -> &str {
match self {
InventoryFrequency::Daily => "Daily",
InventoryFrequency::Weekly => "Weekly",
InventoryFrequency::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Daily", "Weekly"]
}
}
impl AsRef<str> for InventoryFrequency {
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 InventoryOptionalField {
#[allow(missing_docs)] BucketKeyStatus,
#[allow(missing_docs)] ETag,
#[allow(missing_docs)] EncryptionStatus,
#[allow(missing_docs)] IntelligentTieringAccessTier,
#[allow(missing_docs)] IsMultipartUploaded,
#[allow(missing_docs)] LastModifiedDate,
#[allow(missing_docs)] ObjectLockLegalHoldStatus,
#[allow(missing_docs)] ObjectLockMode,
#[allow(missing_docs)] ObjectLockRetainUntilDate,
#[allow(missing_docs)] ReplicationStatus,
#[allow(missing_docs)] Size,
#[allow(missing_docs)] StorageClass,
Unknown(String),
}
impl std::convert::From<&str> for InventoryOptionalField {
fn from(s: &str) -> Self {
match s {
"BucketKeyStatus" => InventoryOptionalField::BucketKeyStatus,
"ETag" => InventoryOptionalField::ETag,
"EncryptionStatus" => InventoryOptionalField::EncryptionStatus,
"IntelligentTieringAccessTier" => InventoryOptionalField::IntelligentTieringAccessTier,
"IsMultipartUploaded" => InventoryOptionalField::IsMultipartUploaded,
"LastModifiedDate" => InventoryOptionalField::LastModifiedDate,
"ObjectLockLegalHoldStatus" => InventoryOptionalField::ObjectLockLegalHoldStatus,
"ObjectLockMode" => InventoryOptionalField::ObjectLockMode,
"ObjectLockRetainUntilDate" => InventoryOptionalField::ObjectLockRetainUntilDate,
"ReplicationStatus" => InventoryOptionalField::ReplicationStatus,
"Size" => InventoryOptionalField::Size,
"StorageClass" => InventoryOptionalField::StorageClass,
other => InventoryOptionalField::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InventoryOptionalField {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InventoryOptionalField::from(s))
}
}
impl InventoryOptionalField {
pub fn as_str(&self) -> &str {
match self {
InventoryOptionalField::BucketKeyStatus => "BucketKeyStatus",
InventoryOptionalField::ETag => "ETag",
InventoryOptionalField::EncryptionStatus => "EncryptionStatus",
InventoryOptionalField::IntelligentTieringAccessTier => "IntelligentTieringAccessTier",
InventoryOptionalField::IsMultipartUploaded => "IsMultipartUploaded",
InventoryOptionalField::LastModifiedDate => "LastModifiedDate",
InventoryOptionalField::ObjectLockLegalHoldStatus => "ObjectLockLegalHoldStatus",
InventoryOptionalField::ObjectLockMode => "ObjectLockMode",
InventoryOptionalField::ObjectLockRetainUntilDate => "ObjectLockRetainUntilDate",
InventoryOptionalField::ReplicationStatus => "ReplicationStatus",
InventoryOptionalField::Size => "Size",
InventoryOptionalField::StorageClass => "StorageClass",
InventoryOptionalField::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"BucketKeyStatus",
"ETag",
"EncryptionStatus",
"IntelligentTieringAccessTier",
"IsMultipartUploaded",
"LastModifiedDate",
"ObjectLockLegalHoldStatus",
"ObjectLockMode",
"ObjectLockRetainUntilDate",
"ReplicationStatus",
"Size",
"StorageClass",
]
}
}
impl AsRef<str> for InventoryOptionalField {
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 InventoryIncludedObjectVersions {
#[allow(missing_docs)] All,
#[allow(missing_docs)] Current,
Unknown(String),
}
impl std::convert::From<&str> for InventoryIncludedObjectVersions {
fn from(s: &str) -> Self {
match s {
"All" => InventoryIncludedObjectVersions::All,
"Current" => InventoryIncludedObjectVersions::Current,
other => InventoryIncludedObjectVersions::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InventoryIncludedObjectVersions {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InventoryIncludedObjectVersions::from(s))
}
}
impl InventoryIncludedObjectVersions {
pub fn as_str(&self) -> &str {
match self {
InventoryIncludedObjectVersions::All => "All",
InventoryIncludedObjectVersions::Current => "Current",
InventoryIncludedObjectVersions::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["All", "Current"]
}
}
impl AsRef<str> for InventoryIncludedObjectVersions {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventoryFilter {
pub prefix: std::option::Option<std::string::String>,
}
impl InventoryFilter {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
}
impl std::fmt::Debug for InventoryFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventoryFilter");
formatter.field("prefix", &self.prefix);
formatter.finish()
}
}
pub mod inventory_filter {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
}
impl Builder {
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::InventoryFilter {
crate::model::InventoryFilter {
prefix: self.prefix,
}
}
}
}
impl InventoryFilter {
pub fn builder() -> crate::model::inventory_filter::Builder {
crate::model::inventory_filter::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventoryDestination {
pub s3_bucket_destination: std::option::Option<crate::model::InventoryS3BucketDestination>,
}
impl InventoryDestination {
pub fn s3_bucket_destination(
&self,
) -> std::option::Option<&crate::model::InventoryS3BucketDestination> {
self.s3_bucket_destination.as_ref()
}
}
impl std::fmt::Debug for InventoryDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventoryDestination");
formatter.field("s3_bucket_destination", &self.s3_bucket_destination);
formatter.finish()
}
}
pub mod inventory_destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_bucket_destination:
std::option::Option<crate::model::InventoryS3BucketDestination>,
}
impl Builder {
pub fn s3_bucket_destination(
mut self,
input: crate::model::InventoryS3BucketDestination,
) -> Self {
self.s3_bucket_destination = Some(input);
self
}
pub fn set_s3_bucket_destination(
mut self,
input: std::option::Option<crate::model::InventoryS3BucketDestination>,
) -> Self {
self.s3_bucket_destination = input;
self
}
pub fn build(self) -> crate::model::InventoryDestination {
crate::model::InventoryDestination {
s3_bucket_destination: self.s3_bucket_destination,
}
}
}
}
impl InventoryDestination {
pub fn builder() -> crate::model::inventory_destination::Builder {
crate::model::inventory_destination::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventoryS3BucketDestination {
pub account_id: std::option::Option<std::string::String>,
pub bucket: std::option::Option<std::string::String>,
pub format: std::option::Option<crate::model::InventoryFormat>,
pub prefix: std::option::Option<std::string::String>,
pub encryption: std::option::Option<crate::model::InventoryEncryption>,
}
impl InventoryS3BucketDestination {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn format(&self) -> std::option::Option<&crate::model::InventoryFormat> {
self.format.as_ref()
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn encryption(&self) -> std::option::Option<&crate::model::InventoryEncryption> {
self.encryption.as_ref()
}
}
impl std::fmt::Debug for InventoryS3BucketDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventoryS3BucketDestination");
formatter.field("account_id", &self.account_id);
formatter.field("bucket", &self.bucket);
formatter.field("format", &self.format);
formatter.field("prefix", &self.prefix);
formatter.field("encryption", &self.encryption);
formatter.finish()
}
}
pub mod inventory_s3_bucket_destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) format: std::option::Option<crate::model::InventoryFormat>,
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) encryption: std::option::Option<crate::model::InventoryEncryption>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
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 format(mut self, input: crate::model::InventoryFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::InventoryFormat>,
) -> Self {
self.format = 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 encryption(mut self, input: crate::model::InventoryEncryption) -> Self {
self.encryption = Some(input);
self
}
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::InventoryEncryption>,
) -> Self {
self.encryption = input;
self
}
pub fn build(self) -> crate::model::InventoryS3BucketDestination {
crate::model::InventoryS3BucketDestination {
account_id: self.account_id,
bucket: self.bucket,
format: self.format,
prefix: self.prefix,
encryption: self.encryption,
}
}
}
}
impl InventoryS3BucketDestination {
pub fn builder() -> crate::model::inventory_s3_bucket_destination::Builder {
crate::model::inventory_s3_bucket_destination::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InventoryEncryption {
pub sses3: std::option::Option<crate::model::Sses3>,
pub ssekms: std::option::Option<crate::model::Ssekms>,
}
impl InventoryEncryption {
pub fn sses3(&self) -> std::option::Option<&crate::model::Sses3> {
self.sses3.as_ref()
}
pub fn ssekms(&self) -> std::option::Option<&crate::model::Ssekms> {
self.ssekms.as_ref()
}
}
impl std::fmt::Debug for InventoryEncryption {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InventoryEncryption");
formatter.field("sses3", &self.sses3);
formatter.field("ssekms", &self.ssekms);
formatter.finish()
}
}
pub mod inventory_encryption {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sses3: std::option::Option<crate::model::Sses3>,
pub(crate) ssekms: std::option::Option<crate::model::Ssekms>,
}
impl Builder {
pub fn sses3(mut self, input: crate::model::Sses3) -> Self {
self.sses3 = Some(input);
self
}
pub fn set_sses3(mut self, input: std::option::Option<crate::model::Sses3>) -> Self {
self.sses3 = input;
self
}
pub fn ssekms(mut self, input: crate::model::Ssekms) -> Self {
self.ssekms = Some(input);
self
}
pub fn set_ssekms(mut self, input: std::option::Option<crate::model::Ssekms>) -> Self {
self.ssekms = input;
self
}
pub fn build(self) -> crate::model::InventoryEncryption {
crate::model::InventoryEncryption {
sses3: self.sses3,
ssekms: self.ssekms,
}
}
}
}
impl InventoryEncryption {
pub fn builder() -> crate::model::inventory_encryption::Builder {
crate::model::inventory_encryption::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Ssekms {
pub key_id: std::option::Option<std::string::String>,
}
impl Ssekms {
pub fn key_id(&self) -> std::option::Option<&str> {
self.key_id.as_deref()
}
}
impl std::fmt::Debug for Ssekms {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Ssekms");
formatter.field("key_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod ssekms {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.key_id = Some(input.into());
self
}
pub fn set_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key_id = input;
self
}
pub fn build(self) -> crate::model::Ssekms {
crate::model::Ssekms {
key_id: self.key_id,
}
}
}
}
impl Ssekms {
pub fn builder() -> crate::model::ssekms::Builder {
crate::model::ssekms::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Sses3 {}
impl std::fmt::Debug for Sses3 {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Sses3");
formatter.finish()
}
}
pub mod sses3 {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(self) -> crate::model::Sses3 {
crate::model::Sses3 {}
}
}
}
impl Sses3 {
pub fn builder() -> crate::model::sses3::Builder {
crate::model::sses3::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 InventoryFormat {
#[allow(missing_docs)] Csv,
#[allow(missing_docs)] Orc,
#[allow(missing_docs)] Parquet,
Unknown(String),
}
impl std::convert::From<&str> for InventoryFormat {
fn from(s: &str) -> Self {
match s {
"CSV" => InventoryFormat::Csv,
"ORC" => InventoryFormat::Orc,
"Parquet" => InventoryFormat::Parquet,
other => InventoryFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InventoryFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InventoryFormat::from(s))
}
}
impl InventoryFormat {
pub fn as_str(&self) -> &str {
match self {
InventoryFormat::Csv => "CSV",
InventoryFormat::Orc => "ORC",
InventoryFormat::Parquet => "Parquet",
InventoryFormat::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CSV", "ORC", "Parquet"]
}
}
impl AsRef<str> for InventoryFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IntelligentTieringConfiguration {
pub id: std::option::Option<std::string::String>,
pub filter: std::option::Option<crate::model::IntelligentTieringFilter>,
pub status: std::option::Option<crate::model::IntelligentTieringStatus>,
pub tierings: std::option::Option<std::vec::Vec<crate::model::Tiering>>,
}
impl IntelligentTieringConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::IntelligentTieringFilter> {
self.filter.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::IntelligentTieringStatus> {
self.status.as_ref()
}
pub fn tierings(&self) -> std::option::Option<&[crate::model::Tiering]> {
self.tierings.as_deref()
}
}
impl std::fmt::Debug for IntelligentTieringConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IntelligentTieringConfiguration");
formatter.field("id", &self.id);
formatter.field("filter", &self.filter);
formatter.field("status", &self.status);
formatter.field("tierings", &self.tierings);
formatter.finish()
}
}
pub mod intelligent_tiering_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) filter: std::option::Option<crate::model::IntelligentTieringFilter>,
pub(crate) status: std::option::Option<crate::model::IntelligentTieringStatus>,
pub(crate) tierings: std::option::Option<std::vec::Vec<crate::model::Tiering>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn filter(mut self, input: crate::model::IntelligentTieringFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::IntelligentTieringFilter>,
) -> Self {
self.filter = input;
self
}
pub fn status(mut self, input: crate::model::IntelligentTieringStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::IntelligentTieringStatus>,
) -> Self {
self.status = input;
self
}
pub fn tierings(mut self, input: impl Into<crate::model::Tiering>) -> Self {
let mut v = self.tierings.unwrap_or_default();
v.push(input.into());
self.tierings = Some(v);
self
}
pub fn set_tierings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tiering>>,
) -> Self {
self.tierings = input;
self
}
pub fn build(self) -> crate::model::IntelligentTieringConfiguration {
crate::model::IntelligentTieringConfiguration {
id: self.id,
filter: self.filter,
status: self.status,
tierings: self.tierings,
}
}
}
}
impl IntelligentTieringConfiguration {
pub fn builder() -> crate::model::intelligent_tiering_configuration::Builder {
crate::model::intelligent_tiering_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tiering {
pub days: i32,
pub access_tier: std::option::Option<crate::model::IntelligentTieringAccessTier>,
}
impl Tiering {
pub fn days(&self) -> i32 {
self.days
}
pub fn access_tier(&self) -> std::option::Option<&crate::model::IntelligentTieringAccessTier> {
self.access_tier.as_ref()
}
}
impl std::fmt::Debug for Tiering {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tiering");
formatter.field("days", &self.days);
formatter.field("access_tier", &self.access_tier);
formatter.finish()
}
}
pub mod tiering {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) days: std::option::Option<i32>,
pub(crate) access_tier: std::option::Option<crate::model::IntelligentTieringAccessTier>,
}
impl Builder {
pub fn days(mut self, input: i32) -> Self {
self.days = Some(input);
self
}
pub fn set_days(mut self, input: std::option::Option<i32>) -> Self {
self.days = input;
self
}
pub fn access_tier(mut self, input: crate::model::IntelligentTieringAccessTier) -> Self {
self.access_tier = Some(input);
self
}
pub fn set_access_tier(
mut self,
input: std::option::Option<crate::model::IntelligentTieringAccessTier>,
) -> Self {
self.access_tier = input;
self
}
pub fn build(self) -> crate::model::Tiering {
crate::model::Tiering {
days: self.days.unwrap_or_default(),
access_tier: self.access_tier,
}
}
}
}
impl Tiering {
pub fn builder() -> crate::model::tiering::Builder {
crate::model::tiering::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 IntelligentTieringAccessTier {
#[allow(missing_docs)] ArchiveAccess,
#[allow(missing_docs)] DeepArchiveAccess,
Unknown(String),
}
impl std::convert::From<&str> for IntelligentTieringAccessTier {
fn from(s: &str) -> Self {
match s {
"ARCHIVE_ACCESS" => IntelligentTieringAccessTier::ArchiveAccess,
"DEEP_ARCHIVE_ACCESS" => IntelligentTieringAccessTier::DeepArchiveAccess,
other => IntelligentTieringAccessTier::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for IntelligentTieringAccessTier {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(IntelligentTieringAccessTier::from(s))
}
}
impl IntelligentTieringAccessTier {
pub fn as_str(&self) -> &str {
match self {
IntelligentTieringAccessTier::ArchiveAccess => "ARCHIVE_ACCESS",
IntelligentTieringAccessTier::DeepArchiveAccess => "DEEP_ARCHIVE_ACCESS",
IntelligentTieringAccessTier::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ARCHIVE_ACCESS", "DEEP_ARCHIVE_ACCESS"]
}
}
impl AsRef<str> for IntelligentTieringAccessTier {
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 IntelligentTieringStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for IntelligentTieringStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => IntelligentTieringStatus::Disabled,
"Enabled" => IntelligentTieringStatus::Enabled,
other => IntelligentTieringStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for IntelligentTieringStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(IntelligentTieringStatus::from(s))
}
}
impl IntelligentTieringStatus {
pub fn as_str(&self) -> &str {
match self {
IntelligentTieringStatus::Disabled => "Disabled",
IntelligentTieringStatus::Enabled => "Enabled",
IntelligentTieringStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for IntelligentTieringStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IntelligentTieringFilter {
pub prefix: std::option::Option<std::string::String>,
pub tag: std::option::Option<crate::model::Tag>,
pub and: std::option::Option<crate::model::IntelligentTieringAndOperator>,
}
impl IntelligentTieringFilter {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tag(&self) -> std::option::Option<&crate::model::Tag> {
self.tag.as_ref()
}
pub fn and(&self) -> std::option::Option<&crate::model::IntelligentTieringAndOperator> {
self.and.as_ref()
}
}
impl std::fmt::Debug for IntelligentTieringFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IntelligentTieringFilter");
formatter.field("prefix", &self.prefix);
formatter.field("tag", &self.tag);
formatter.field("and", &self.and);
formatter.finish()
}
}
pub mod intelligent_tiering_filter {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tag: std::option::Option<crate::model::Tag>,
pub(crate) and: std::option::Option<crate::model::IntelligentTieringAndOperator>,
}
impl Builder {
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 tag(mut self, input: crate::model::Tag) -> Self {
self.tag = Some(input);
self
}
pub fn set_tag(mut self, input: std::option::Option<crate::model::Tag>) -> Self {
self.tag = input;
self
}
pub fn and(mut self, input: crate::model::IntelligentTieringAndOperator) -> Self {
self.and = Some(input);
self
}
pub fn set_and(
mut self,
input: std::option::Option<crate::model::IntelligentTieringAndOperator>,
) -> Self {
self.and = input;
self
}
pub fn build(self) -> crate::model::IntelligentTieringFilter {
crate::model::IntelligentTieringFilter {
prefix: self.prefix,
tag: self.tag,
and: self.and,
}
}
}
}
impl IntelligentTieringFilter {
pub fn builder() -> crate::model::intelligent_tiering_filter::Builder {
crate::model::intelligent_tiering_filter::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IntelligentTieringAndOperator {
pub prefix: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl IntelligentTieringAndOperator {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for IntelligentTieringAndOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IntelligentTieringAndOperator");
formatter.field("prefix", &self.prefix);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod intelligent_tiering_and_operator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::IntelligentTieringAndOperator {
crate::model::IntelligentTieringAndOperator {
prefix: self.prefix,
tags: self.tags,
}
}
}
}
impl IntelligentTieringAndOperator {
pub fn builder() -> crate::model::intelligent_tiering_and_operator::Builder {
crate::model::intelligent_tiering_and_operator::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServerSideEncryptionConfiguration {
pub rules: std::option::Option<std::vec::Vec<crate::model::ServerSideEncryptionRule>>,
}
impl ServerSideEncryptionConfiguration {
pub fn rules(&self) -> std::option::Option<&[crate::model::ServerSideEncryptionRule]> {
self.rules.as_deref()
}
}
impl std::fmt::Debug for ServerSideEncryptionConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServerSideEncryptionConfiguration");
formatter.field("rules", &self.rules);
formatter.finish()
}
}
pub mod server_side_encryption_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) rules:
std::option::Option<std::vec::Vec<crate::model::ServerSideEncryptionRule>>,
}
impl Builder {
pub fn rules(mut self, input: impl Into<crate::model::ServerSideEncryptionRule>) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input.into());
self.rules = Some(v);
self
}
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ServerSideEncryptionRule>>,
) -> Self {
self.rules = input;
self
}
pub fn build(self) -> crate::model::ServerSideEncryptionConfiguration {
crate::model::ServerSideEncryptionConfiguration { rules: self.rules }
}
}
}
impl ServerSideEncryptionConfiguration {
pub fn builder() -> crate::model::server_side_encryption_configuration::Builder {
crate::model::server_side_encryption_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServerSideEncryptionRule {
pub apply_server_side_encryption_by_default:
std::option::Option<crate::model::ServerSideEncryptionByDefault>,
pub bucket_key_enabled: bool,
}
impl ServerSideEncryptionRule {
pub fn apply_server_side_encryption_by_default(
&self,
) -> std::option::Option<&crate::model::ServerSideEncryptionByDefault> {
self.apply_server_side_encryption_by_default.as_ref()
}
pub fn bucket_key_enabled(&self) -> bool {
self.bucket_key_enabled
}
}
impl std::fmt::Debug for ServerSideEncryptionRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServerSideEncryptionRule");
formatter.field(
"apply_server_side_encryption_by_default",
&self.apply_server_side_encryption_by_default,
);
formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
formatter.finish()
}
}
pub mod server_side_encryption_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) apply_server_side_encryption_by_default:
std::option::Option<crate::model::ServerSideEncryptionByDefault>,
pub(crate) bucket_key_enabled: std::option::Option<bool>,
}
impl Builder {
pub fn apply_server_side_encryption_by_default(
mut self,
input: crate::model::ServerSideEncryptionByDefault,
) -> Self {
self.apply_server_side_encryption_by_default = Some(input);
self
}
pub fn set_apply_server_side_encryption_by_default(
mut self,
input: std::option::Option<crate::model::ServerSideEncryptionByDefault>,
) -> Self {
self.apply_server_side_encryption_by_default = input;
self
}
pub fn bucket_key_enabled(mut self, input: bool) -> Self {
self.bucket_key_enabled = Some(input);
self
}
pub fn set_bucket_key_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.bucket_key_enabled = input;
self
}
pub fn build(self) -> crate::model::ServerSideEncryptionRule {
crate::model::ServerSideEncryptionRule {
apply_server_side_encryption_by_default: self
.apply_server_side_encryption_by_default,
bucket_key_enabled: self.bucket_key_enabled.unwrap_or_default(),
}
}
}
}
impl ServerSideEncryptionRule {
pub fn builder() -> crate::model::server_side_encryption_rule::Builder {
crate::model::server_side_encryption_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServerSideEncryptionByDefault {
pub sse_algorithm: std::option::Option<crate::model::ServerSideEncryption>,
pub kms_master_key_id: std::option::Option<std::string::String>,
}
impl ServerSideEncryptionByDefault {
pub fn sse_algorithm(&self) -> std::option::Option<&crate::model::ServerSideEncryption> {
self.sse_algorithm.as_ref()
}
pub fn kms_master_key_id(&self) -> std::option::Option<&str> {
self.kms_master_key_id.as_deref()
}
}
impl std::fmt::Debug for ServerSideEncryptionByDefault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServerSideEncryptionByDefault");
formatter.field("sse_algorithm", &self.sse_algorithm);
formatter.field("kms_master_key_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod server_side_encryption_by_default {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sse_algorithm: std::option::Option<crate::model::ServerSideEncryption>,
pub(crate) kms_master_key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn sse_algorithm(mut self, input: crate::model::ServerSideEncryption) -> Self {
self.sse_algorithm = Some(input);
self
}
pub fn set_sse_algorithm(
mut self,
input: std::option::Option<crate::model::ServerSideEncryption>,
) -> Self {
self.sse_algorithm = input;
self
}
pub fn kms_master_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_master_key_id = Some(input.into());
self
}
pub fn set_kms_master_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.kms_master_key_id = input;
self
}
pub fn build(self) -> crate::model::ServerSideEncryptionByDefault {
crate::model::ServerSideEncryptionByDefault {
sse_algorithm: self.sse_algorithm,
kms_master_key_id: self.kms_master_key_id,
}
}
}
}
impl ServerSideEncryptionByDefault {
pub fn builder() -> crate::model::server_side_encryption_by_default::Builder {
crate::model::server_side_encryption_by_default::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CorsConfiguration {
pub cors_rules: std::option::Option<std::vec::Vec<crate::model::CorsRule>>,
}
impl CorsConfiguration {
pub fn cors_rules(&self) -> std::option::Option<&[crate::model::CorsRule]> {
self.cors_rules.as_deref()
}
}
impl std::fmt::Debug for CorsConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CorsConfiguration");
formatter.field("cors_rules", &self.cors_rules);
formatter.finish()
}
}
pub mod cors_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) cors_rules: std::option::Option<std::vec::Vec<crate::model::CorsRule>>,
}
impl Builder {
pub fn cors_rules(mut self, input: impl Into<crate::model::CorsRule>) -> Self {
let mut v = self.cors_rules.unwrap_or_default();
v.push(input.into());
self.cors_rules = Some(v);
self
}
pub fn set_cors_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CorsRule>>,
) -> Self {
self.cors_rules = input;
self
}
pub fn build(self) -> crate::model::CorsConfiguration {
crate::model::CorsConfiguration {
cors_rules: self.cors_rules,
}
}
}
}
impl CorsConfiguration {
pub fn builder() -> crate::model::cors_configuration::Builder {
crate::model::cors_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CorsRule {
pub id: std::option::Option<std::string::String>,
pub allowed_headers: std::option::Option<std::vec::Vec<std::string::String>>,
pub allowed_methods: std::option::Option<std::vec::Vec<std::string::String>>,
pub allowed_origins: std::option::Option<std::vec::Vec<std::string::String>>,
pub expose_headers: std::option::Option<std::vec::Vec<std::string::String>>,
pub max_age_seconds: i32,
}
impl CorsRule {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn allowed_headers(&self) -> std::option::Option<&[std::string::String]> {
self.allowed_headers.as_deref()
}
pub fn allowed_methods(&self) -> std::option::Option<&[std::string::String]> {
self.allowed_methods.as_deref()
}
pub fn allowed_origins(&self) -> std::option::Option<&[std::string::String]> {
self.allowed_origins.as_deref()
}
pub fn expose_headers(&self) -> std::option::Option<&[std::string::String]> {
self.expose_headers.as_deref()
}
pub fn max_age_seconds(&self) -> i32 {
self.max_age_seconds
}
}
impl std::fmt::Debug for CorsRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CorsRule");
formatter.field("id", &self.id);
formatter.field("allowed_headers", &self.allowed_headers);
formatter.field("allowed_methods", &self.allowed_methods);
formatter.field("allowed_origins", &self.allowed_origins);
formatter.field("expose_headers", &self.expose_headers);
formatter.field("max_age_seconds", &self.max_age_seconds);
formatter.finish()
}
}
pub mod cors_rule {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) allowed_headers: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) allowed_methods: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) allowed_origins: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) expose_headers: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) max_age_seconds: std::option::Option<i32>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn allowed_headers(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.allowed_headers.unwrap_or_default();
v.push(input.into());
self.allowed_headers = Some(v);
self
}
pub fn set_allowed_headers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.allowed_headers = input;
self
}
pub fn allowed_methods(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.allowed_methods.unwrap_or_default();
v.push(input.into());
self.allowed_methods = Some(v);
self
}
pub fn set_allowed_methods(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.allowed_methods = input;
self
}
pub fn allowed_origins(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.allowed_origins.unwrap_or_default();
v.push(input.into());
self.allowed_origins = Some(v);
self
}
pub fn set_allowed_origins(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.allowed_origins = input;
self
}
pub fn expose_headers(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.expose_headers.unwrap_or_default();
v.push(input.into());
self.expose_headers = Some(v);
self
}
pub fn set_expose_headers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.expose_headers = input;
self
}
pub fn max_age_seconds(mut self, input: i32) -> Self {
self.max_age_seconds = Some(input);
self
}
pub fn set_max_age_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.max_age_seconds = input;
self
}
pub fn build(self) -> crate::model::CorsRule {
crate::model::CorsRule {
id: self.id,
allowed_headers: self.allowed_headers,
allowed_methods: self.allowed_methods,
allowed_origins: self.allowed_origins,
expose_headers: self.expose_headers,
max_age_seconds: self.max_age_seconds.unwrap_or_default(),
}
}
}
}
impl CorsRule {
pub fn builder() -> crate::model::cors_rule::Builder {
crate::model::cors_rule::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AnalyticsConfiguration {
pub id: std::option::Option<std::string::String>,
pub filter: std::option::Option<crate::model::AnalyticsFilter>,
pub storage_class_analysis: std::option::Option<crate::model::StorageClassAnalysis>,
}
impl AnalyticsConfiguration {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn filter(&self) -> std::option::Option<&crate::model::AnalyticsFilter> {
self.filter.as_ref()
}
pub fn storage_class_analysis(
&self,
) -> std::option::Option<&crate::model::StorageClassAnalysis> {
self.storage_class_analysis.as_ref()
}
}
impl std::fmt::Debug for AnalyticsConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AnalyticsConfiguration");
formatter.field("id", &self.id);
formatter.field("filter", &self.filter);
formatter.field("storage_class_analysis", &self.storage_class_analysis);
formatter.finish()
}
}
pub mod analytics_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) filter: std::option::Option<crate::model::AnalyticsFilter>,
pub(crate) storage_class_analysis: std::option::Option<crate::model::StorageClassAnalysis>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn filter(mut self, input: crate::model::AnalyticsFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::AnalyticsFilter>,
) -> Self {
self.filter = input;
self
}
pub fn storage_class_analysis(mut self, input: crate::model::StorageClassAnalysis) -> Self {
self.storage_class_analysis = Some(input);
self
}
pub fn set_storage_class_analysis(
mut self,
input: std::option::Option<crate::model::StorageClassAnalysis>,
) -> Self {
self.storage_class_analysis = input;
self
}
pub fn build(self) -> crate::model::AnalyticsConfiguration {
crate::model::AnalyticsConfiguration {
id: self.id,
filter: self.filter,
storage_class_analysis: self.storage_class_analysis,
}
}
}
}
impl AnalyticsConfiguration {
pub fn builder() -> crate::model::analytics_configuration::Builder {
crate::model::analytics_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StorageClassAnalysis {
pub data_export: std::option::Option<crate::model::StorageClassAnalysisDataExport>,
}
impl StorageClassAnalysis {
pub fn data_export(
&self,
) -> std::option::Option<&crate::model::StorageClassAnalysisDataExport> {
self.data_export.as_ref()
}
}
impl std::fmt::Debug for StorageClassAnalysis {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StorageClassAnalysis");
formatter.field("data_export", &self.data_export);
formatter.finish()
}
}
pub mod storage_class_analysis {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) data_export: std::option::Option<crate::model::StorageClassAnalysisDataExport>,
}
impl Builder {
pub fn data_export(mut self, input: crate::model::StorageClassAnalysisDataExport) -> Self {
self.data_export = Some(input);
self
}
pub fn set_data_export(
mut self,
input: std::option::Option<crate::model::StorageClassAnalysisDataExport>,
) -> Self {
self.data_export = input;
self
}
pub fn build(self) -> crate::model::StorageClassAnalysis {
crate::model::StorageClassAnalysis {
data_export: self.data_export,
}
}
}
}
impl StorageClassAnalysis {
pub fn builder() -> crate::model::storage_class_analysis::Builder {
crate::model::storage_class_analysis::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StorageClassAnalysisDataExport {
pub output_schema_version: std::option::Option<crate::model::StorageClassAnalysisSchemaVersion>,
pub destination: std::option::Option<crate::model::AnalyticsExportDestination>,
}
impl StorageClassAnalysisDataExport {
pub fn output_schema_version(
&self,
) -> std::option::Option<&crate::model::StorageClassAnalysisSchemaVersion> {
self.output_schema_version.as_ref()
}
pub fn destination(&self) -> std::option::Option<&crate::model::AnalyticsExportDestination> {
self.destination.as_ref()
}
}
impl std::fmt::Debug for StorageClassAnalysisDataExport {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StorageClassAnalysisDataExport");
formatter.field("output_schema_version", &self.output_schema_version);
formatter.field("destination", &self.destination);
formatter.finish()
}
}
pub mod storage_class_analysis_data_export {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) output_schema_version:
std::option::Option<crate::model::StorageClassAnalysisSchemaVersion>,
pub(crate) destination: std::option::Option<crate::model::AnalyticsExportDestination>,
}
impl Builder {
pub fn output_schema_version(
mut self,
input: crate::model::StorageClassAnalysisSchemaVersion,
) -> Self {
self.output_schema_version = Some(input);
self
}
pub fn set_output_schema_version(
mut self,
input: std::option::Option<crate::model::StorageClassAnalysisSchemaVersion>,
) -> Self {
self.output_schema_version = input;
self
}
pub fn destination(mut self, input: crate::model::AnalyticsExportDestination) -> Self {
self.destination = Some(input);
self
}
pub fn set_destination(
mut self,
input: std::option::Option<crate::model::AnalyticsExportDestination>,
) -> Self {
self.destination = input;
self
}
pub fn build(self) -> crate::model::StorageClassAnalysisDataExport {
crate::model::StorageClassAnalysisDataExport {
output_schema_version: self.output_schema_version,
destination: self.destination,
}
}
}
}
impl StorageClassAnalysisDataExport {
pub fn builder() -> crate::model::storage_class_analysis_data_export::Builder {
crate::model::storage_class_analysis_data_export::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AnalyticsExportDestination {
pub s3_bucket_destination: std::option::Option<crate::model::AnalyticsS3BucketDestination>,
}
impl AnalyticsExportDestination {
pub fn s3_bucket_destination(
&self,
) -> std::option::Option<&crate::model::AnalyticsS3BucketDestination> {
self.s3_bucket_destination.as_ref()
}
}
impl std::fmt::Debug for AnalyticsExportDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AnalyticsExportDestination");
formatter.field("s3_bucket_destination", &self.s3_bucket_destination);
formatter.finish()
}
}
pub mod analytics_export_destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_bucket_destination:
std::option::Option<crate::model::AnalyticsS3BucketDestination>,
}
impl Builder {
pub fn s3_bucket_destination(
mut self,
input: crate::model::AnalyticsS3BucketDestination,
) -> Self {
self.s3_bucket_destination = Some(input);
self
}
pub fn set_s3_bucket_destination(
mut self,
input: std::option::Option<crate::model::AnalyticsS3BucketDestination>,
) -> Self {
self.s3_bucket_destination = input;
self
}
pub fn build(self) -> crate::model::AnalyticsExportDestination {
crate::model::AnalyticsExportDestination {
s3_bucket_destination: self.s3_bucket_destination,
}
}
}
}
impl AnalyticsExportDestination {
pub fn builder() -> crate::model::analytics_export_destination::Builder {
crate::model::analytics_export_destination::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AnalyticsS3BucketDestination {
pub format: std::option::Option<crate::model::AnalyticsS3ExportFileFormat>,
pub bucket_account_id: std::option::Option<std::string::String>,
pub bucket: std::option::Option<std::string::String>,
pub prefix: std::option::Option<std::string::String>,
}
impl AnalyticsS3BucketDestination {
pub fn format(&self) -> std::option::Option<&crate::model::AnalyticsS3ExportFileFormat> {
self.format.as_ref()
}
pub fn bucket_account_id(&self) -> std::option::Option<&str> {
self.bucket_account_id.as_deref()
}
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
}
impl std::fmt::Debug for AnalyticsS3BucketDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AnalyticsS3BucketDestination");
formatter.field("format", &self.format);
formatter.field("bucket_account_id", &self.bucket_account_id);
formatter.field("bucket", &self.bucket);
formatter.field("prefix", &self.prefix);
formatter.finish()
}
}
pub mod analytics_s3_bucket_destination {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) format: std::option::Option<crate::model::AnalyticsS3ExportFileFormat>,
pub(crate) bucket_account_id: std::option::Option<std::string::String>,
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) prefix: std::option::Option<std::string::String>,
}
impl Builder {
pub fn format(mut self, input: crate::model::AnalyticsS3ExportFileFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::AnalyticsS3ExportFileFormat>,
) -> Self {
self.format = input;
self
}
pub fn bucket_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_account_id = Some(input.into());
self
}
pub fn set_bucket_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.bucket_account_id = input;
self
}
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::AnalyticsS3BucketDestination {
crate::model::AnalyticsS3BucketDestination {
format: self.format,
bucket_account_id: self.bucket_account_id,
bucket: self.bucket,
prefix: self.prefix,
}
}
}
}
impl AnalyticsS3BucketDestination {
pub fn builder() -> crate::model::analytics_s3_bucket_destination::Builder {
crate::model::analytics_s3_bucket_destination::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 AnalyticsS3ExportFileFormat {
#[allow(missing_docs)] Csv,
Unknown(String),
}
impl std::convert::From<&str> for AnalyticsS3ExportFileFormat {
fn from(s: &str) -> Self {
match s {
"CSV" => AnalyticsS3ExportFileFormat::Csv,
other => AnalyticsS3ExportFileFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AnalyticsS3ExportFileFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AnalyticsS3ExportFileFormat::from(s))
}
}
impl AnalyticsS3ExportFileFormat {
pub fn as_str(&self) -> &str {
match self {
AnalyticsS3ExportFileFormat::Csv => "CSV",
AnalyticsS3ExportFileFormat::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CSV"]
}
}
impl AsRef<str> for AnalyticsS3ExportFileFormat {
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 StorageClassAnalysisSchemaVersion {
#[allow(missing_docs)] V1,
Unknown(String),
}
impl std::convert::From<&str> for StorageClassAnalysisSchemaVersion {
fn from(s: &str) -> Self {
match s {
"V_1" => StorageClassAnalysisSchemaVersion::V1,
other => StorageClassAnalysisSchemaVersion::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StorageClassAnalysisSchemaVersion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StorageClassAnalysisSchemaVersion::from(s))
}
}
impl StorageClassAnalysisSchemaVersion {
pub fn as_str(&self) -> &str {
match self {
StorageClassAnalysisSchemaVersion::V1 => "V_1",
StorageClassAnalysisSchemaVersion::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["V_1"]
}
}
impl AsRef<str> for StorageClassAnalysisSchemaVersion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum AnalyticsFilter {
And(crate::model::AnalyticsAndOperator),
Prefix(std::string::String),
Tag(crate::model::Tag),
#[non_exhaustive]
Unknown,
}
impl AnalyticsFilter {
pub fn as_and(&self) -> std::result::Result<&crate::model::AnalyticsAndOperator, &Self> {
if let AnalyticsFilter::And(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_and(&self) -> bool {
self.as_and().is_ok()
}
pub fn as_prefix(&self) -> std::result::Result<&std::string::String, &Self> {
if let AnalyticsFilter::Prefix(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_prefix(&self) -> bool {
self.as_prefix().is_ok()
}
pub fn as_tag(&self) -> std::result::Result<&crate::model::Tag, &Self> {
if let AnalyticsFilter::Tag(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_tag(&self) -> bool {
self.as_tag().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AnalyticsAndOperator {
pub prefix: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl AnalyticsAndOperator {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for AnalyticsAndOperator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AnalyticsAndOperator");
formatter.field("prefix", &self.prefix);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod analytics_and_operator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::AnalyticsAndOperator {
crate::model::AnalyticsAndOperator {
prefix: self.prefix,
tags: self.tags,
}
}
}
}
impl AnalyticsAndOperator {
pub fn builder() -> crate::model::analytics_and_operator::Builder {
crate::model::analytics_and_operator::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 BucketCannedAcl {
#[allow(missing_docs)] AuthenticatedRead,
#[allow(missing_docs)] Private,
#[allow(missing_docs)] PublicRead,
#[allow(missing_docs)] PublicReadWrite,
Unknown(String),
}
impl std::convert::From<&str> for BucketCannedAcl {
fn from(s: &str) -> Self {
match s {
"authenticated-read" => BucketCannedAcl::AuthenticatedRead,
"private" => BucketCannedAcl::Private,
"public-read" => BucketCannedAcl::PublicRead,
"public-read-write" => BucketCannedAcl::PublicReadWrite,
other => BucketCannedAcl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BucketCannedAcl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BucketCannedAcl::from(s))
}
}
impl BucketCannedAcl {
pub fn as_str(&self) -> &str {
match self {
BucketCannedAcl::AuthenticatedRead => "authenticated-read",
BucketCannedAcl::Private => "private",
BucketCannedAcl::PublicRead => "public-read",
BucketCannedAcl::PublicReadWrite => "public-read-write",
BucketCannedAcl::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"authenticated-read",
"private",
"public-read",
"public-read-write",
]
}
}
impl AsRef<str> for BucketCannedAcl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccelerateConfiguration {
pub status: std::option::Option<crate::model::BucketAccelerateStatus>,
}
impl AccelerateConfiguration {
pub fn status(&self) -> std::option::Option<&crate::model::BucketAccelerateStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for AccelerateConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccelerateConfiguration");
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod accelerate_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::BucketAccelerateStatus>,
}
impl Builder {
pub fn status(mut self, input: crate::model::BucketAccelerateStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::BucketAccelerateStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::AccelerateConfiguration {
crate::model::AccelerateConfiguration {
status: self.status,
}
}
}
}
impl AccelerateConfiguration {
pub fn builder() -> crate::model::accelerate_configuration::Builder {
crate::model::accelerate_configuration::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 BucketAccelerateStatus {
#[allow(missing_docs)] Enabled,
#[allow(missing_docs)] Suspended,
Unknown(String),
}
impl std::convert::From<&str> for BucketAccelerateStatus {
fn from(s: &str) -> Self {
match s {
"Enabled" => BucketAccelerateStatus::Enabled,
"Suspended" => BucketAccelerateStatus::Suspended,
other => BucketAccelerateStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BucketAccelerateStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BucketAccelerateStatus::from(s))
}
}
impl BucketAccelerateStatus {
pub fn as_str(&self) -> &str {
match self {
BucketAccelerateStatus::Enabled => "Enabled",
BucketAccelerateStatus::Suspended => "Suspended",
BucketAccelerateStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Enabled", "Suspended"]
}
}
impl AsRef<str> for BucketAccelerateStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Initiator {
pub id: std::option::Option<std::string::String>,
pub display_name: std::option::Option<std::string::String>,
}
impl Initiator {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
}
impl std::fmt::Debug for Initiator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Initiator");
formatter.field("id", &self.id);
formatter.field("display_name", &self.display_name);
formatter.finish()
}
}
pub mod initiator {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn build(self) -> crate::model::Initiator {
crate::model::Initiator {
id: self.id,
display_name: self.display_name,
}
}
}
}
impl Initiator {
pub fn builder() -> crate::model::initiator::Builder {
crate::model::initiator::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Part {
pub part_number: i32,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub e_tag: std::option::Option<std::string::String>,
pub size: i64,
}
impl Part {
pub fn part_number(&self) -> i32 {
self.part_number
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn size(&self) -> i64 {
self.size
}
}
impl std::fmt::Debug for Part {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Part");
formatter.field("part_number", &self.part_number);
formatter.field("last_modified", &self.last_modified);
formatter.field("e_tag", &self.e_tag);
formatter.field("size", &self.size);
formatter.finish()
}
}
pub mod part {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) part_number: std::option::Option<i32>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) size: std::option::Option<i64>,
}
impl Builder {
pub fn part_number(mut self, input: i32) -> Self {
self.part_number = Some(input);
self
}
pub fn set_part_number(mut self, input: std::option::Option<i32>) -> Self {
self.part_number = input;
self
}
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn build(self) -> crate::model::Part {
crate::model::Part {
part_number: self.part_number.unwrap_or_default(),
last_modified: self.last_modified,
e_tag: self.e_tag,
size: self.size.unwrap_or_default(),
}
}
}
}
impl Part {
pub fn builder() -> crate::model::part::Builder {
crate::model::part::Builder::default()
}
}
#[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 EncodingType {
#[allow(missing_docs)] Url,
Unknown(String),
}
impl std::convert::From<&str> for EncodingType {
fn from(s: &str) -> Self {
match s {
"url" => EncodingType::Url,
other => EncodingType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EncodingType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EncodingType::from(s))
}
}
impl EncodingType {
pub fn as_str(&self) -> &str {
match self {
EncodingType::Url => "url",
EncodingType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["url"]
}
}
impl AsRef<str> for EncodingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CommonPrefix {
pub prefix: std::option::Option<std::string::String>,
}
impl CommonPrefix {
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
}
impl std::fmt::Debug for CommonPrefix {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CommonPrefix");
formatter.field("prefix", &self.prefix);
formatter.finish()
}
}
pub mod common_prefix {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) prefix: std::option::Option<std::string::String>,
}
impl Builder {
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::CommonPrefix {
crate::model::CommonPrefix {
prefix: self.prefix,
}
}
}
}
impl CommonPrefix {
pub fn builder() -> crate::model::common_prefix::Builder {
crate::model::common_prefix::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteMarkerEntry {
pub owner: std::option::Option<crate::model::Owner>,
pub key: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
pub is_latest: bool,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl DeleteMarkerEntry {
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
pub fn is_latest(&self) -> bool {
self.is_latest
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
}
impl std::fmt::Debug for DeleteMarkerEntry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteMarkerEntry");
formatter.field("owner", &self.owner);
formatter.field("key", &self.key);
formatter.field("version_id", &self.version_id);
formatter.field("is_latest", &self.is_latest);
formatter.field("last_modified", &self.last_modified);
formatter.finish()
}
}
pub mod delete_marker_entry {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::Owner>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) is_latest: std::option::Option<bool>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = 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 version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn is_latest(mut self, input: bool) -> Self {
self.is_latest = Some(input);
self
}
pub fn set_is_latest(mut self, input: std::option::Option<bool>) -> Self {
self.is_latest = input;
self
}
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn build(self) -> crate::model::DeleteMarkerEntry {
crate::model::DeleteMarkerEntry {
owner: self.owner,
key: self.key,
version_id: self.version_id,
is_latest: self.is_latest.unwrap_or_default(),
last_modified: self.last_modified,
}
}
}
}
impl DeleteMarkerEntry {
pub fn builder() -> crate::model::delete_marker_entry::Builder {
crate::model::delete_marker_entry::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectVersion {
pub e_tag: std::option::Option<std::string::String>,
pub size: i64,
pub storage_class: std::option::Option<crate::model::ObjectVersionStorageClass>,
pub key: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
pub is_latest: bool,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub owner: std::option::Option<crate::model::Owner>,
}
impl ObjectVersion {
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn size(&self) -> i64 {
self.size
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::ObjectVersionStorageClass> {
self.storage_class.as_ref()
}
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
pub fn is_latest(&self) -> bool {
self.is_latest
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
}
impl std::fmt::Debug for ObjectVersion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectVersion");
formatter.field("e_tag", &self.e_tag);
formatter.field("size", &self.size);
formatter.field("storage_class", &self.storage_class);
formatter.field("key", &self.key);
formatter.field("version_id", &self.version_id);
formatter.field("is_latest", &self.is_latest);
formatter.field("last_modified", &self.last_modified);
formatter.field("owner", &self.owner);
formatter.finish()
}
}
pub mod object_version {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) size: std::option::Option<i64>,
pub(crate) storage_class: std::option::Option<crate::model::ObjectVersionStorageClass>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) is_latest: std::option::Option<bool>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
}
impl Builder {
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn storage_class(mut self, input: crate::model::ObjectVersionStorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::ObjectVersionStorageClass>,
) -> Self {
self.storage_class = 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 version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn is_latest(mut self, input: bool) -> Self {
self.is_latest = Some(input);
self
}
pub fn set_is_latest(mut self, input: std::option::Option<bool>) -> Self {
self.is_latest = input;
self
}
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn build(self) -> crate::model::ObjectVersion {
crate::model::ObjectVersion {
e_tag: self.e_tag,
size: self.size.unwrap_or_default(),
storage_class: self.storage_class,
key: self.key,
version_id: self.version_id,
is_latest: self.is_latest.unwrap_or_default(),
last_modified: self.last_modified,
owner: self.owner,
}
}
}
}
impl ObjectVersion {
pub fn builder() -> crate::model::object_version::Builder {
crate::model::object_version::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 ObjectVersionStorageClass {
#[allow(missing_docs)] Standard,
Unknown(String),
}
impl std::convert::From<&str> for ObjectVersionStorageClass {
fn from(s: &str) -> Self {
match s {
"STANDARD" => ObjectVersionStorageClass::Standard,
other => ObjectVersionStorageClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectVersionStorageClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectVersionStorageClass::from(s))
}
}
impl ObjectVersionStorageClass {
pub fn as_str(&self) -> &str {
match self {
ObjectVersionStorageClass::Standard => "STANDARD",
ObjectVersionStorageClass::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["STANDARD"]
}
}
impl AsRef<str> for ObjectVersionStorageClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Object {
pub key: std::option::Option<std::string::String>,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub e_tag: std::option::Option<std::string::String>,
pub size: i64,
pub storage_class: std::option::Option<crate::model::ObjectStorageClass>,
pub owner: std::option::Option<crate::model::Owner>,
}
impl Object {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn size(&self) -> i64 {
self.size
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::ObjectStorageClass> {
self.storage_class.as_ref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
}
impl std::fmt::Debug for Object {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Object");
formatter.field("key", &self.key);
formatter.field("last_modified", &self.last_modified);
formatter.field("e_tag", &self.e_tag);
formatter.field("size", &self.size);
formatter.field("storage_class", &self.storage_class);
formatter.field("owner", &self.owner);
formatter.finish()
}
}
pub mod object {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) size: std::option::Option<i64>,
pub(crate) storage_class: std::option::Option<crate::model::ObjectStorageClass>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
}
impl Builder {
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 last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn storage_class(mut self, input: crate::model::ObjectStorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::ObjectStorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn build(self) -> crate::model::Object {
crate::model::Object {
key: self.key,
last_modified: self.last_modified,
e_tag: self.e_tag,
size: self.size.unwrap_or_default(),
storage_class: self.storage_class,
owner: self.owner,
}
}
}
}
impl Object {
pub fn builder() -> crate::model::object::Builder {
crate::model::object::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 ObjectStorageClass {
#[allow(missing_docs)] DeepArchive,
#[allow(missing_docs)] Glacier,
#[allow(missing_docs)] IntelligentTiering,
#[allow(missing_docs)] OnezoneIa,
#[allow(missing_docs)] Outposts,
#[allow(missing_docs)] ReducedRedundancy,
#[allow(missing_docs)] Standard,
#[allow(missing_docs)] StandardIa,
Unknown(String),
}
impl std::convert::From<&str> for ObjectStorageClass {
fn from(s: &str) -> Self {
match s {
"DEEP_ARCHIVE" => ObjectStorageClass::DeepArchive,
"GLACIER" => ObjectStorageClass::Glacier,
"INTELLIGENT_TIERING" => ObjectStorageClass::IntelligentTiering,
"ONEZONE_IA" => ObjectStorageClass::OnezoneIa,
"OUTPOSTS" => ObjectStorageClass::Outposts,
"REDUCED_REDUNDANCY" => ObjectStorageClass::ReducedRedundancy,
"STANDARD" => ObjectStorageClass::Standard,
"STANDARD_IA" => ObjectStorageClass::StandardIa,
other => ObjectStorageClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ObjectStorageClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ObjectStorageClass::from(s))
}
}
impl ObjectStorageClass {
pub fn as_str(&self) -> &str {
match self {
ObjectStorageClass::DeepArchive => "DEEP_ARCHIVE",
ObjectStorageClass::Glacier => "GLACIER",
ObjectStorageClass::IntelligentTiering => "INTELLIGENT_TIERING",
ObjectStorageClass::OnezoneIa => "ONEZONE_IA",
ObjectStorageClass::Outposts => "OUTPOSTS",
ObjectStorageClass::ReducedRedundancy => "REDUCED_REDUNDANCY",
ObjectStorageClass::Standard => "STANDARD",
ObjectStorageClass::StandardIa => "STANDARD_IA",
ObjectStorageClass::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DEEP_ARCHIVE",
"GLACIER",
"INTELLIGENT_TIERING",
"ONEZONE_IA",
"OUTPOSTS",
"REDUCED_REDUNDANCY",
"STANDARD",
"STANDARD_IA",
]
}
}
impl AsRef<str> for ObjectStorageClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MultipartUpload {
pub upload_id: std::option::Option<std::string::String>,
pub key: std::option::Option<std::string::String>,
pub initiated: std::option::Option<aws_smithy_types::DateTime>,
pub storage_class: std::option::Option<crate::model::StorageClass>,
pub owner: std::option::Option<crate::model::Owner>,
pub initiator: std::option::Option<crate::model::Initiator>,
}
impl MultipartUpload {
pub fn upload_id(&self) -> std::option::Option<&str> {
self.upload_id.as_deref()
}
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn initiated(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.initiated.as_ref()
}
pub fn storage_class(&self) -> std::option::Option<&crate::model::StorageClass> {
self.storage_class.as_ref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
pub fn initiator(&self) -> std::option::Option<&crate::model::Initiator> {
self.initiator.as_ref()
}
}
impl std::fmt::Debug for MultipartUpload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MultipartUpload");
formatter.field("upload_id", &self.upload_id);
formatter.field("key", &self.key);
formatter.field("initiated", &self.initiated);
formatter.field("storage_class", &self.storage_class);
formatter.field("owner", &self.owner);
formatter.field("initiator", &self.initiator);
formatter.finish()
}
}
pub mod multipart_upload {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) upload_id: std::option::Option<std::string::String>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) initiated: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) storage_class: std::option::Option<crate::model::StorageClass>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
pub(crate) initiator: std::option::Option<crate::model::Initiator>,
}
impl Builder {
pub fn upload_id(mut self, input: impl Into<std::string::String>) -> Self {
self.upload_id = Some(input.into());
self
}
pub fn set_upload_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.upload_id = 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 initiated(mut self, input: aws_smithy_types::DateTime) -> Self {
self.initiated = Some(input);
self
}
pub fn set_initiated(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.initiated = input;
self
}
pub fn storage_class(mut self, input: crate::model::StorageClass) -> Self {
self.storage_class = Some(input);
self
}
pub fn set_storage_class(
mut self,
input: std::option::Option<crate::model::StorageClass>,
) -> Self {
self.storage_class = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn initiator(mut self, input: crate::model::Initiator) -> Self {
self.initiator = Some(input);
self
}
pub fn set_initiator(
mut self,
input: std::option::Option<crate::model::Initiator>,
) -> Self {
self.initiator = input;
self
}
pub fn build(self) -> crate::model::MultipartUpload {
crate::model::MultipartUpload {
upload_id: self.upload_id,
key: self.key,
initiated: self.initiated,
storage_class: self.storage_class,
owner: self.owner,
initiator: self.initiator,
}
}
}
}
impl MultipartUpload {
pub fn builder() -> crate::model::multipart_upload::Builder {
crate::model::multipart_upload::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Bucket {
pub name: std::option::Option<std::string::String>,
pub creation_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Bucket {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn creation_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_date.as_ref()
}
}
impl std::fmt::Debug for Bucket {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Bucket");
formatter.field("name", &self.name);
formatter.field("creation_date", &self.creation_date);
formatter.finish()
}
}
pub mod bucket {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) creation_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn creation_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_date = Some(input);
self
}
pub fn set_creation_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_date = input;
self
}
pub fn build(self) -> crate::model::Bucket {
crate::model::Bucket {
name: self.name,
creation_date: self.creation_date,
}
}
}
}
impl Bucket {
pub fn builder() -> crate::model::bucket::Builder {
crate::model::bucket::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 ArchiveStatus {
#[allow(missing_docs)] ArchiveAccess,
#[allow(missing_docs)] DeepArchiveAccess,
Unknown(String),
}
impl std::convert::From<&str> for ArchiveStatus {
fn from(s: &str) -> Self {
match s {
"ARCHIVE_ACCESS" => ArchiveStatus::ArchiveAccess,
"DEEP_ARCHIVE_ACCESS" => ArchiveStatus::DeepArchiveAccess,
other => ArchiveStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ArchiveStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ArchiveStatus::from(s))
}
}
impl ArchiveStatus {
pub fn as_str(&self) -> &str {
match self {
ArchiveStatus::ArchiveAccess => "ARCHIVE_ACCESS",
ArchiveStatus::DeepArchiveAccess => "DEEP_ARCHIVE_ACCESS",
ArchiveStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ARCHIVE_ACCESS", "DEEP_ARCHIVE_ACCESS"]
}
}
impl AsRef<str> for ArchiveStatus {
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 MfaDeleteStatus {
#[allow(missing_docs)] Disabled,
#[allow(missing_docs)] Enabled,
Unknown(String),
}
impl std::convert::From<&str> for MfaDeleteStatus {
fn from(s: &str) -> Self {
match s {
"Disabled" => MfaDeleteStatus::Disabled,
"Enabled" => MfaDeleteStatus::Enabled,
other => MfaDeleteStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MfaDeleteStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MfaDeleteStatus::from(s))
}
}
impl MfaDeleteStatus {
pub fn as_str(&self) -> &str {
match self {
MfaDeleteStatus::Disabled => "Disabled",
MfaDeleteStatus::Enabled => "Enabled",
MfaDeleteStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Disabled", "Enabled"]
}
}
impl AsRef<str> for MfaDeleteStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PolicyStatus {
pub is_public: bool,
}
impl PolicyStatus {
pub fn is_public(&self) -> bool {
self.is_public
}
}
impl std::fmt::Debug for PolicyStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PolicyStatus");
formatter.field("is_public", &self.is_public);
formatter.finish()
}
}
pub mod policy_status {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) is_public: std::option::Option<bool>,
}
impl Builder {
pub fn is_public(mut self, input: bool) -> Self {
self.is_public = Some(input);
self
}
pub fn set_is_public(mut self, input: std::option::Option<bool>) -> Self {
self.is_public = input;
self
}
pub fn build(self) -> crate::model::PolicyStatus {
crate::model::PolicyStatus {
is_public: self.is_public.unwrap_or_default(),
}
}
}
}
impl PolicyStatus {
pub fn builder() -> crate::model::policy_status::Builder {
crate::model::policy_status::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 BucketLocationConstraint {
#[allow(missing_docs)] Eu,
#[allow(missing_docs)] AfSouth1,
#[allow(missing_docs)] ApEast1,
#[allow(missing_docs)] ApNortheast1,
#[allow(missing_docs)] ApNortheast2,
#[allow(missing_docs)] ApNortheast3,
#[allow(missing_docs)] ApSouth1,
#[allow(missing_docs)] ApSoutheast1,
#[allow(missing_docs)] ApSoutheast2,
#[allow(missing_docs)] CaCentral1,
#[allow(missing_docs)] CnNorth1,
#[allow(missing_docs)] CnNorthwest1,
#[allow(missing_docs)] EuCentral1,
#[allow(missing_docs)] EuNorth1,
#[allow(missing_docs)] EuSouth1,
#[allow(missing_docs)] EuWest1,
#[allow(missing_docs)] EuWest2,
#[allow(missing_docs)] EuWest3,
#[allow(missing_docs)] MeSouth1,
#[allow(missing_docs)] SaEast1,
#[allow(missing_docs)] UsEast2,
#[allow(missing_docs)] UsGovEast1,
#[allow(missing_docs)] UsGovWest1,
#[allow(missing_docs)] UsWest1,
#[allow(missing_docs)] UsWest2,
Unknown(String),
}
impl std::convert::From<&str> for BucketLocationConstraint {
fn from(s: &str) -> Self {
match s {
"EU" => BucketLocationConstraint::Eu,
"af-south-1" => BucketLocationConstraint::AfSouth1,
"ap-east-1" => BucketLocationConstraint::ApEast1,
"ap-northeast-1" => BucketLocationConstraint::ApNortheast1,
"ap-northeast-2" => BucketLocationConstraint::ApNortheast2,
"ap-northeast-3" => BucketLocationConstraint::ApNortheast3,
"ap-south-1" => BucketLocationConstraint::ApSouth1,
"ap-southeast-1" => BucketLocationConstraint::ApSoutheast1,
"ap-southeast-2" => BucketLocationConstraint::ApSoutheast2,
"ca-central-1" => BucketLocationConstraint::CaCentral1,
"cn-north-1" => BucketLocationConstraint::CnNorth1,
"cn-northwest-1" => BucketLocationConstraint::CnNorthwest1,
"eu-central-1" => BucketLocationConstraint::EuCentral1,
"eu-north-1" => BucketLocationConstraint::EuNorth1,
"eu-south-1" => BucketLocationConstraint::EuSouth1,
"eu-west-1" => BucketLocationConstraint::EuWest1,
"eu-west-2" => BucketLocationConstraint::EuWest2,
"eu-west-3" => BucketLocationConstraint::EuWest3,
"me-south-1" => BucketLocationConstraint::MeSouth1,
"sa-east-1" => BucketLocationConstraint::SaEast1,
"us-east-2" => BucketLocationConstraint::UsEast2,
"us-gov-east-1" => BucketLocationConstraint::UsGovEast1,
"us-gov-west-1" => BucketLocationConstraint::UsGovWest1,
"us-west-1" => BucketLocationConstraint::UsWest1,
"us-west-2" => BucketLocationConstraint::UsWest2,
other => BucketLocationConstraint::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BucketLocationConstraint {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BucketLocationConstraint::from(s))
}
}
impl BucketLocationConstraint {
pub fn as_str(&self) -> &str {
match self {
BucketLocationConstraint::Eu => "EU",
BucketLocationConstraint::AfSouth1 => "af-south-1",
BucketLocationConstraint::ApEast1 => "ap-east-1",
BucketLocationConstraint::ApNortheast1 => "ap-northeast-1",
BucketLocationConstraint::ApNortheast2 => "ap-northeast-2",
BucketLocationConstraint::ApNortheast3 => "ap-northeast-3",
BucketLocationConstraint::ApSouth1 => "ap-south-1",
BucketLocationConstraint::ApSoutheast1 => "ap-southeast-1",
BucketLocationConstraint::ApSoutheast2 => "ap-southeast-2",
BucketLocationConstraint::CaCentral1 => "ca-central-1",
BucketLocationConstraint::CnNorth1 => "cn-north-1",
BucketLocationConstraint::CnNorthwest1 => "cn-northwest-1",
BucketLocationConstraint::EuCentral1 => "eu-central-1",
BucketLocationConstraint::EuNorth1 => "eu-north-1",
BucketLocationConstraint::EuSouth1 => "eu-south-1",
BucketLocationConstraint::EuWest1 => "eu-west-1",
BucketLocationConstraint::EuWest2 => "eu-west-2",
BucketLocationConstraint::EuWest3 => "eu-west-3",
BucketLocationConstraint::MeSouth1 => "me-south-1",
BucketLocationConstraint::SaEast1 => "sa-east-1",
BucketLocationConstraint::UsEast2 => "us-east-2",
BucketLocationConstraint::UsGovEast1 => "us-gov-east-1",
BucketLocationConstraint::UsGovWest1 => "us-gov-west-1",
BucketLocationConstraint::UsWest1 => "us-west-1",
BucketLocationConstraint::UsWest2 => "us-west-2",
BucketLocationConstraint::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"EU",
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"cn-north-1",
"cn-northwest-1",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"me-south-1",
"sa-east-1",
"us-east-2",
"us-gov-east-1",
"us-gov-west-1",
"us-west-1",
"us-west-2",
]
}
}
impl AsRef<str> for BucketLocationConstraint {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Error {
pub key: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
pub code: std::option::Option<std::string::String>,
pub message: std::option::Option<std::string::String>,
}
impl Error {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Debug for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Error");
formatter.field("key", &self.key);
formatter.field("version_id", &self.version_id);
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.finish()
}
}
pub mod error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
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 version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::model::Error {
crate::model::Error {
key: self.key,
version_id: self.version_id,
code: self.code,
message: self.message,
}
}
}
}
impl Error {
pub fn builder() -> crate::model::error::Builder {
crate::model::error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeletedObject {
pub key: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
pub delete_marker: bool,
pub delete_marker_version_id: std::option::Option<std::string::String>,
}
impl DeletedObject {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
pub fn delete_marker(&self) -> bool {
self.delete_marker
}
pub fn delete_marker_version_id(&self) -> std::option::Option<&str> {
self.delete_marker_version_id.as_deref()
}
}
impl std::fmt::Debug for DeletedObject {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeletedObject");
formatter.field("key", &self.key);
formatter.field("version_id", &self.version_id);
formatter.field("delete_marker", &self.delete_marker);
formatter.field("delete_marker_version_id", &self.delete_marker_version_id);
formatter.finish()
}
}
pub mod deleted_object {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) delete_marker: std::option::Option<bool>,
pub(crate) delete_marker_version_id: std::option::Option<std::string::String>,
}
impl Builder {
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 version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn delete_marker(mut self, input: bool) -> Self {
self.delete_marker = Some(input);
self
}
pub fn set_delete_marker(mut self, input: std::option::Option<bool>) -> Self {
self.delete_marker = input;
self
}
pub fn delete_marker_version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.delete_marker_version_id = Some(input.into());
self
}
pub fn set_delete_marker_version_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delete_marker_version_id = input;
self
}
pub fn build(self) -> crate::model::DeletedObject {
crate::model::DeletedObject {
key: self.key,
version_id: self.version_id,
delete_marker: self.delete_marker.unwrap_or_default(),
delete_marker_version_id: self.delete_marker_version_id,
}
}
}
}
impl DeletedObject {
pub fn builder() -> crate::model::deleted_object::Builder {
crate::model::deleted_object::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Delete {
pub objects: std::option::Option<std::vec::Vec<crate::model::ObjectIdentifier>>,
pub quiet: bool,
}
impl Delete {
pub fn objects(&self) -> std::option::Option<&[crate::model::ObjectIdentifier]> {
self.objects.as_deref()
}
pub fn quiet(&self) -> bool {
self.quiet
}
}
impl std::fmt::Debug for Delete {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Delete");
formatter.field("objects", &self.objects);
formatter.field("quiet", &self.quiet);
formatter.finish()
}
}
pub mod delete {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) objects: std::option::Option<std::vec::Vec<crate::model::ObjectIdentifier>>,
pub(crate) quiet: std::option::Option<bool>,
}
impl Builder {
pub fn objects(mut self, input: impl Into<crate::model::ObjectIdentifier>) -> Self {
let mut v = self.objects.unwrap_or_default();
v.push(input.into());
self.objects = Some(v);
self
}
pub fn set_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ObjectIdentifier>>,
) -> Self {
self.objects = input;
self
}
pub fn quiet(mut self, input: bool) -> Self {
self.quiet = Some(input);
self
}
pub fn set_quiet(mut self, input: std::option::Option<bool>) -> Self {
self.quiet = input;
self
}
pub fn build(self) -> crate::model::Delete {
crate::model::Delete {
objects: self.objects,
quiet: self.quiet.unwrap_or_default(),
}
}
}
}
impl Delete {
pub fn builder() -> crate::model::delete::Builder {
crate::model::delete::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ObjectIdentifier {
pub key: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
}
impl ObjectIdentifier {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
}
impl std::fmt::Debug for ObjectIdentifier {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ObjectIdentifier");
formatter.field("key", &self.key);
formatter.field("version_id", &self.version_id);
formatter.finish()
}
}
pub mod object_identifier {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
}
impl Builder {
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 version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn build(self) -> crate::model::ObjectIdentifier {
crate::model::ObjectIdentifier {
key: self.key,
version_id: self.version_id,
}
}
}
}
impl ObjectIdentifier {
pub fn builder() -> crate::model::object_identifier::Builder {
crate::model::object_identifier::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBucketConfiguration {
pub location_constraint: std::option::Option<crate::model::BucketLocationConstraint>,
}
impl CreateBucketConfiguration {
pub fn location_constraint(
&self,
) -> std::option::Option<&crate::model::BucketLocationConstraint> {
self.location_constraint.as_ref()
}
}
impl std::fmt::Debug for CreateBucketConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBucketConfiguration");
formatter.field("location_constraint", &self.location_constraint);
formatter.finish()
}
}
pub mod create_bucket_configuration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) location_constraint: std::option::Option<crate::model::BucketLocationConstraint>,
}
impl Builder {
pub fn location_constraint(
mut self,
input: crate::model::BucketLocationConstraint,
) -> Self {
self.location_constraint = Some(input);
self
}
pub fn set_location_constraint(
mut self,
input: std::option::Option<crate::model::BucketLocationConstraint>,
) -> Self {
self.location_constraint = input;
self
}
pub fn build(self) -> crate::model::CreateBucketConfiguration {
crate::model::CreateBucketConfiguration {
location_constraint: self.location_constraint,
}
}
}
}
impl CreateBucketConfiguration {
pub fn builder() -> crate::model::create_bucket_configuration::Builder {
crate::model::create_bucket_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CopyObjectResult {
pub e_tag: std::option::Option<std::string::String>,
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl CopyObjectResult {
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
}
impl std::fmt::Debug for CopyObjectResult {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CopyObjectResult");
formatter.field("e_tag", &self.e_tag);
formatter.field("last_modified", &self.last_modified);
formatter.finish()
}
}
pub mod copy_object_result {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn build(self) -> crate::model::CopyObjectResult {
crate::model::CopyObjectResult {
e_tag: self.e_tag,
last_modified: self.last_modified,
}
}
}
}
impl CopyObjectResult {
pub fn builder() -> crate::model::copy_object_result::Builder {
crate::model::copy_object_result::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 TaggingDirective {
#[allow(missing_docs)] Copy,
#[allow(missing_docs)] Replace,
Unknown(String),
}
impl std::convert::From<&str> for TaggingDirective {
fn from(s: &str) -> Self {
match s {
"COPY" => TaggingDirective::Copy,
"REPLACE" => TaggingDirective::Replace,
other => TaggingDirective::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TaggingDirective {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TaggingDirective::from(s))
}
}
impl TaggingDirective {
pub fn as_str(&self) -> &str {
match self {
TaggingDirective::Copy => "COPY",
TaggingDirective::Replace => "REPLACE",
TaggingDirective::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COPY", "REPLACE"]
}
}
impl AsRef<str> for TaggingDirective {
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 MetadataDirective {
#[allow(missing_docs)] Copy,
#[allow(missing_docs)] Replace,
Unknown(String),
}
impl std::convert::From<&str> for MetadataDirective {
fn from(s: &str) -> Self {
match s {
"COPY" => MetadataDirective::Copy,
"REPLACE" => MetadataDirective::Replace,
other => MetadataDirective::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MetadataDirective {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MetadataDirective::from(s))
}
}
impl MetadataDirective {
pub fn as_str(&self) -> &str {
match self {
MetadataDirective::Copy => "COPY",
MetadataDirective::Replace => "REPLACE",
MetadataDirective::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["COPY", "REPLACE"]
}
}
impl AsRef<str> for MetadataDirective {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CompletedMultipartUpload {
pub parts: std::option::Option<std::vec::Vec<crate::model::CompletedPart>>,
}
impl CompletedMultipartUpload {
pub fn parts(&self) -> std::option::Option<&[crate::model::CompletedPart]> {
self.parts.as_deref()
}
}
impl std::fmt::Debug for CompletedMultipartUpload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CompletedMultipartUpload");
formatter.field("parts", &self.parts);
formatter.finish()
}
}
pub mod completed_multipart_upload {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) parts: std::option::Option<std::vec::Vec<crate::model::CompletedPart>>,
}
impl Builder {
pub fn parts(mut self, input: impl Into<crate::model::CompletedPart>) -> Self {
let mut v = self.parts.unwrap_or_default();
v.push(input.into());
self.parts = Some(v);
self
}
pub fn set_parts(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CompletedPart>>,
) -> Self {
self.parts = input;
self
}
pub fn build(self) -> crate::model::CompletedMultipartUpload {
crate::model::CompletedMultipartUpload { parts: self.parts }
}
}
}
impl CompletedMultipartUpload {
pub fn builder() -> crate::model::completed_multipart_upload::Builder {
crate::model::completed_multipart_upload::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CompletedPart {
pub e_tag: std::option::Option<std::string::String>,
pub part_number: i32,
}
impl CompletedPart {
pub fn e_tag(&self) -> std::option::Option<&str> {
self.e_tag.as_deref()
}
pub fn part_number(&self) -> i32 {
self.part_number
}
}
impl std::fmt::Debug for CompletedPart {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CompletedPart");
formatter.field("e_tag", &self.e_tag);
formatter.field("part_number", &self.part_number);
formatter.finish()
}
}
pub mod completed_part {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) e_tag: std::option::Option<std::string::String>,
pub(crate) part_number: std::option::Option<i32>,
}
impl Builder {
pub fn e_tag(mut self, input: impl Into<std::string::String>) -> Self {
self.e_tag = Some(input.into());
self
}
pub fn set_e_tag(mut self, input: std::option::Option<std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn part_number(mut self, input: i32) -> Self {
self.part_number = Some(input);
self
}
pub fn set_part_number(mut self, input: std::option::Option<i32>) -> Self {
self.part_number = input;
self
}
pub fn build(self) -> crate::model::CompletedPart {
crate::model::CompletedPart {
e_tag: self.e_tag,
part_number: self.part_number.unwrap_or_default(),
}
}
}
}
impl CompletedPart {
pub fn builder() -> crate::model::completed_part::Builder {
crate::model::completed_part::Builder::default()
}
}