#[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 ValidationExceptionReason {
#[allow(missing_docs)] ConflictingBlockUpdate,
#[allow(missing_docs)] InvalidBlock,
#[allow(missing_docs)] InvalidBlockToken,
#[allow(missing_docs)] InvalidContentEncoding,
#[allow(missing_docs)] InvalidCustomerKey,
#[allow(missing_docs)] InvalidDependencyRequest,
#[allow(missing_docs)] InvalidPageToken,
#[allow(missing_docs)] InvalidParameterValue,
#[allow(missing_docs)] InvalidSnapshotId,
#[allow(missing_docs)] InvalidTag,
#[allow(missing_docs)] InvalidVolumeSize,
#[allow(missing_docs)] UnrelatedSnapshots,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ValidationExceptionReason {
fn from(s: &str) -> Self {
match s {
"CONFLICTING_BLOCK_UPDATE" => ValidationExceptionReason::ConflictingBlockUpdate,
"INVALID_BLOCK" => ValidationExceptionReason::InvalidBlock,
"INVALID_BLOCK_TOKEN" => ValidationExceptionReason::InvalidBlockToken,
"INVALID_CONTENT_ENCODING" => ValidationExceptionReason::InvalidContentEncoding,
"INVALID_CUSTOMER_KEY" => ValidationExceptionReason::InvalidCustomerKey,
"INVALID_DEPENDENCY_REQUEST" => ValidationExceptionReason::InvalidDependencyRequest,
"INVALID_PAGE_TOKEN" => ValidationExceptionReason::InvalidPageToken,
"INVALID_PARAMETER_VALUE" => ValidationExceptionReason::InvalidParameterValue,
"INVALID_SNAPSHOT_ID" => ValidationExceptionReason::InvalidSnapshotId,
"INVALID_TAG" => ValidationExceptionReason::InvalidTag,
"INVALID_VOLUME_SIZE" => ValidationExceptionReason::InvalidVolumeSize,
"UNRELATED_SNAPSHOTS" => ValidationExceptionReason::UnrelatedSnapshots,
other => ValidationExceptionReason::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for ValidationExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ValidationExceptionReason::from(s))
}
}
impl ValidationExceptionReason {
pub fn as_str(&self) -> &str {
match self {
ValidationExceptionReason::ConflictingBlockUpdate => "CONFLICTING_BLOCK_UPDATE",
ValidationExceptionReason::InvalidBlock => "INVALID_BLOCK",
ValidationExceptionReason::InvalidBlockToken => "INVALID_BLOCK_TOKEN",
ValidationExceptionReason::InvalidContentEncoding => "INVALID_CONTENT_ENCODING",
ValidationExceptionReason::InvalidCustomerKey => "INVALID_CUSTOMER_KEY",
ValidationExceptionReason::InvalidDependencyRequest => "INVALID_DEPENDENCY_REQUEST",
ValidationExceptionReason::InvalidPageToken => "INVALID_PAGE_TOKEN",
ValidationExceptionReason::InvalidParameterValue => "INVALID_PARAMETER_VALUE",
ValidationExceptionReason::InvalidSnapshotId => "INVALID_SNAPSHOT_ID",
ValidationExceptionReason::InvalidTag => "INVALID_TAG",
ValidationExceptionReason::InvalidVolumeSize => "INVALID_VOLUME_SIZE",
ValidationExceptionReason::UnrelatedSnapshots => "UNRELATED_SNAPSHOTS",
ValidationExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"CONFLICTING_BLOCK_UPDATE",
"INVALID_BLOCK",
"INVALID_BLOCK_TOKEN",
"INVALID_CONTENT_ENCODING",
"INVALID_CUSTOMER_KEY",
"INVALID_DEPENDENCY_REQUEST",
"INVALID_PAGE_TOKEN",
"INVALID_PARAMETER_VALUE",
"INVALID_SNAPSHOT_ID",
"INVALID_TAG",
"INVALID_VOLUME_SIZE",
"UNRELATED_SNAPSHOTS",
]
}
}
impl AsRef<str> for ValidationExceptionReason {
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 ServiceQuotaExceededExceptionReason {
#[allow(missing_docs)] DependencyServiceQuotaExceeded,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ServiceQuotaExceededExceptionReason {
fn from(s: &str) -> Self {
match s {
"DEPENDENCY_SERVICE_QUOTA_EXCEEDED" => {
ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded
}
other => ServiceQuotaExceededExceptionReason::Unknown(
crate::types::UnknownVariantValue(other.to_owned()),
),
}
}
}
impl std::str::FromStr for ServiceQuotaExceededExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ServiceQuotaExceededExceptionReason::from(s))
}
}
impl ServiceQuotaExceededExceptionReason {
pub fn as_str(&self) -> &str {
match self {
ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded => {
"DEPENDENCY_SERVICE_QUOTA_EXCEEDED"
}
ServiceQuotaExceededExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DEPENDENCY_SERVICE_QUOTA_EXCEEDED"]
}
}
impl AsRef<str> for ServiceQuotaExceededExceptionReason {
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 ResourceNotFoundExceptionReason {
#[allow(missing_docs)] DependencyResourceNotFound,
#[allow(missing_docs)] SnapshotNotFound,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResourceNotFoundExceptionReason {
fn from(s: &str) -> Self {
match s {
"DEPENDENCY_RESOURCE_NOT_FOUND" => {
ResourceNotFoundExceptionReason::DependencyResourceNotFound
}
"SNAPSHOT_NOT_FOUND" => ResourceNotFoundExceptionReason::SnapshotNotFound,
other => ResourceNotFoundExceptionReason::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for ResourceNotFoundExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceNotFoundExceptionReason::from(s))
}
}
impl ResourceNotFoundExceptionReason {
pub fn as_str(&self) -> &str {
match self {
ResourceNotFoundExceptionReason::DependencyResourceNotFound => {
"DEPENDENCY_RESOURCE_NOT_FOUND"
}
ResourceNotFoundExceptionReason::SnapshotNotFound => "SNAPSHOT_NOT_FOUND",
ResourceNotFoundExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DEPENDENCY_RESOURCE_NOT_FOUND", "SNAPSHOT_NOT_FOUND"]
}
}
impl AsRef<str> for ResourceNotFoundExceptionReason {
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 RequestThrottledExceptionReason {
#[allow(missing_docs)] AccountThrottled,
#[allow(missing_docs)] DependencyRequestThrottled,
#[allow(missing_docs)] ResourceLevelThrottle,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RequestThrottledExceptionReason {
fn from(s: &str) -> Self {
match s {
"ACCOUNT_THROTTLED" => RequestThrottledExceptionReason::AccountThrottled,
"DEPENDENCY_REQUEST_THROTTLED" => {
RequestThrottledExceptionReason::DependencyRequestThrottled
}
"RESOURCE_LEVEL_THROTTLE" => RequestThrottledExceptionReason::ResourceLevelThrottle,
other => RequestThrottledExceptionReason::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for RequestThrottledExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RequestThrottledExceptionReason::from(s))
}
}
impl RequestThrottledExceptionReason {
pub fn as_str(&self) -> &str {
match self {
RequestThrottledExceptionReason::AccountThrottled => "ACCOUNT_THROTTLED",
RequestThrottledExceptionReason::DependencyRequestThrottled => {
"DEPENDENCY_REQUEST_THROTTLED"
}
RequestThrottledExceptionReason::ResourceLevelThrottle => "RESOURCE_LEVEL_THROTTLE",
RequestThrottledExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"ACCOUNT_THROTTLED",
"DEPENDENCY_REQUEST_THROTTLED",
"RESOURCE_LEVEL_THROTTLE",
]
}
}
impl AsRef<str> for RequestThrottledExceptionReason {
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 AccessDeniedExceptionReason {
#[allow(missing_docs)] DependencyAccessDenied,
#[allow(missing_docs)] UnauthorizedAccount,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AccessDeniedExceptionReason {
fn from(s: &str) -> Self {
match s {
"DEPENDENCY_ACCESS_DENIED" => AccessDeniedExceptionReason::DependencyAccessDenied,
"UNAUTHORIZED_ACCOUNT" => AccessDeniedExceptionReason::UnauthorizedAccount,
other => AccessDeniedExceptionReason::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for AccessDeniedExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AccessDeniedExceptionReason::from(s))
}
}
impl AccessDeniedExceptionReason {
pub fn as_str(&self) -> &str {
match self {
AccessDeniedExceptionReason::DependencyAccessDenied => "DEPENDENCY_ACCESS_DENIED",
AccessDeniedExceptionReason::UnauthorizedAccount => "UNAUTHORIZED_ACCOUNT",
AccessDeniedExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DEPENDENCY_ACCESS_DENIED", "UNAUTHORIZED_ACCOUNT"]
}
}
impl AsRef<str> for AccessDeniedExceptionReason {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Tag {
#[doc(hidden)]
pub key: std::option::Option<std::string::String>,
#[doc(hidden)]
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()
}
}
pub mod tag {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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()
}
}
#[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 Status {
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] Pending,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Status {
fn from(s: &str) -> Self {
match s {
"completed" => Status::Completed,
"error" => Status::Error,
"pending" => Status::Pending,
other => Status::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for Status {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Status::from(s))
}
}
impl Status {
pub fn as_str(&self) -> &str {
match self {
Status::Completed => "completed",
Status::Error => "error",
Status::Pending => "pending",
Status::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["completed", "error", "pending"]
}
}
impl AsRef<str> for Status {
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 ChecksumAlgorithm {
#[allow(missing_docs)] ChecksumAlgorithmSha256,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChecksumAlgorithm {
fn from(s: &str) -> Self {
match s {
"SHA256" => ChecksumAlgorithm::ChecksumAlgorithmSha256,
other => {
ChecksumAlgorithm::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ChecksumAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChecksumAlgorithm::from(s))
}
}
impl ChecksumAlgorithm {
pub fn as_str(&self) -> &str {
match self {
ChecksumAlgorithm::ChecksumAlgorithmSha256 => "SHA256",
ChecksumAlgorithm::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["SHA256"]
}
}
impl AsRef<str> for ChecksumAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Block {
#[doc(hidden)]
pub block_index: std::option::Option<i32>,
#[doc(hidden)]
pub block_token: std::option::Option<std::string::String>,
}
impl Block {
pub fn block_index(&self) -> std::option::Option<i32> {
self.block_index
}
pub fn block_token(&self) -> std::option::Option<&str> {
self.block_token.as_deref()
}
}
pub mod block {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) block_index: std::option::Option<i32>,
pub(crate) block_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn block_index(mut self, input: i32) -> Self {
self.block_index = Some(input);
self
}
pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
self.block_index = input;
self
}
pub fn block_token(mut self, input: impl Into<std::string::String>) -> Self {
self.block_token = Some(input.into());
self
}
pub fn set_block_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.block_token = input;
self
}
pub fn build(self) -> crate::model::Block {
crate::model::Block {
block_index: self.block_index,
block_token: self.block_token,
}
}
}
}
impl Block {
pub fn builder() -> crate::model::block::Builder {
crate::model::block::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ChangedBlock {
#[doc(hidden)]
pub block_index: std::option::Option<i32>,
#[doc(hidden)]
pub first_block_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub second_block_token: std::option::Option<std::string::String>,
}
impl ChangedBlock {
pub fn block_index(&self) -> std::option::Option<i32> {
self.block_index
}
pub fn first_block_token(&self) -> std::option::Option<&str> {
self.first_block_token.as_deref()
}
pub fn second_block_token(&self) -> std::option::Option<&str> {
self.second_block_token.as_deref()
}
}
impl std::fmt::Debug for ChangedBlock {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ChangedBlock");
formatter.field("block_index", &"*** Sensitive Data Redacted ***");
formatter.field("first_block_token", &"*** Sensitive Data Redacted ***");
formatter.field("second_block_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod changed_block {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) block_index: std::option::Option<i32>,
pub(crate) first_block_token: std::option::Option<std::string::String>,
pub(crate) second_block_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn block_index(mut self, input: i32) -> Self {
self.block_index = Some(input);
self
}
pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
self.block_index = input;
self
}
pub fn first_block_token(mut self, input: impl Into<std::string::String>) -> Self {
self.first_block_token = Some(input.into());
self
}
pub fn set_first_block_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.first_block_token = input;
self
}
pub fn second_block_token(mut self, input: impl Into<std::string::String>) -> Self {
self.second_block_token = Some(input.into());
self
}
pub fn set_second_block_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.second_block_token = input;
self
}
pub fn build(self) -> crate::model::ChangedBlock {
crate::model::ChangedBlock {
block_index: self.block_index,
first_block_token: self.first_block_token,
second_block_token: self.second_block_token,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("block_index", &"*** Sensitive Data Redacted ***");
formatter.field("first_block_token", &"*** Sensitive Data Redacted ***");
formatter.field("second_block_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ChangedBlock {
pub fn builder() -> crate::model::changed_block::Builder {
crate::model::changed_block::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 ChecksumAggregationMethod {
#[allow(missing_docs)] ChecksumAggregationLinear,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChecksumAggregationMethod {
fn from(s: &str) -> Self {
match s {
"LINEAR" => ChecksumAggregationMethod::ChecksumAggregationLinear,
other => ChecksumAggregationMethod::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for ChecksumAggregationMethod {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChecksumAggregationMethod::from(s))
}
}
impl ChecksumAggregationMethod {
pub fn as_str(&self) -> &str {
match self {
ChecksumAggregationMethod::ChecksumAggregationLinear => "LINEAR",
ChecksumAggregationMethod::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["LINEAR"]
}
}
impl AsRef<str> for ChecksumAggregationMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}