#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProgressEvent {
#[doc(hidden)]
pub type_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operation: std::option::Option<crate::model::Operation>,
#[doc(hidden)]
pub operation_status: std::option::Option<crate::model::OperationStatus>,
#[doc(hidden)]
pub event_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub resource_model: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub error_code: std::option::Option<crate::model::HandlerErrorCode>,
#[doc(hidden)]
pub retry_after: std::option::Option<aws_smithy_types::DateTime>,
}
impl ProgressEvent {
pub fn type_name(&self) -> std::option::Option<&str> {
self.type_name.as_deref()
}
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn request_token(&self) -> std::option::Option<&str> {
self.request_token.as_deref()
}
pub fn operation(&self) -> std::option::Option<&crate::model::Operation> {
self.operation.as_ref()
}
pub fn operation_status(&self) -> std::option::Option<&crate::model::OperationStatus> {
self.operation_status.as_ref()
}
pub fn event_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.event_time.as_ref()
}
pub fn resource_model(&self) -> std::option::Option<&str> {
self.resource_model.as_deref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn error_code(&self) -> std::option::Option<&crate::model::HandlerErrorCode> {
self.error_code.as_ref()
}
pub fn retry_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.retry_after.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("type_name", &self.type_name);
formatter.field("identifier", &self.identifier);
formatter.field("request_token", &self.request_token);
formatter.field("operation", &self.operation);
formatter.field("operation_status", &self.operation_status);
formatter.field("event_time", &self.event_time);
formatter.field("resource_model", &"*** Sensitive Data Redacted ***");
formatter.field("status_message", &self.status_message);
formatter.field("error_code", &self.error_code);
formatter.field("retry_after", &self.retry_after);
formatter.finish()
}
}
pub mod progress_event {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) type_name: std::option::Option<std::string::String>,
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) request_token: std::option::Option<std::string::String>,
pub(crate) operation: std::option::Option<crate::model::Operation>,
pub(crate) operation_status: std::option::Option<crate::model::OperationStatus>,
pub(crate) event_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) resource_model: std::option::Option<std::string::String>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) error_code: std::option::Option<crate::model::HandlerErrorCode>,
pub(crate) retry_after: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn type_name(mut self, input: impl Into<std::string::String>) -> Self {
self.type_name = Some(input.into());
self
}
pub fn set_type_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.type_name = input;
self
}
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.request_token = Some(input.into());
self
}
pub fn set_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.request_token = input;
self
}
pub fn operation(mut self, input: crate::model::Operation) -> Self {
self.operation = Some(input);
self
}
pub fn set_operation(
mut self,
input: std::option::Option<crate::model::Operation>,
) -> Self {
self.operation = input;
self
}
pub fn operation_status(mut self, input: crate::model::OperationStatus) -> Self {
self.operation_status = Some(input);
self
}
pub fn set_operation_status(
mut self,
input: std::option::Option<crate::model::OperationStatus>,
) -> Self {
self.operation_status = input;
self
}
pub fn event_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.event_time = Some(input);
self
}
pub fn set_event_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.event_time = input;
self
}
pub fn resource_model(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_model = Some(input.into());
self
}
pub fn set_resource_model(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_model = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn error_code(mut self, input: crate::model::HandlerErrorCode) -> Self {
self.error_code = Some(input);
self
}
pub fn set_error_code(
mut self,
input: std::option::Option<crate::model::HandlerErrorCode>,
) -> Self {
self.error_code = input;
self
}
pub fn retry_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.retry_after = Some(input);
self
}
pub fn set_retry_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.retry_after = input;
self
}
pub fn build(self) -> crate::model::ProgressEvent {
crate::model::ProgressEvent {
type_name: self.type_name,
identifier: self.identifier,
request_token: self.request_token,
operation: self.operation,
operation_status: self.operation_status,
event_time: self.event_time,
resource_model: self.resource_model,
status_message: self.status_message,
error_code: self.error_code,
retry_after: self.retry_after,
}
}
}
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("type_name", &self.type_name);
formatter.field("identifier", &self.identifier);
formatter.field("request_token", &self.request_token);
formatter.field("operation", &self.operation);
formatter.field("operation_status", &self.operation_status);
formatter.field("event_time", &self.event_time);
formatter.field("resource_model", &"*** Sensitive Data Redacted ***");
formatter.field("status_message", &self.status_message);
formatter.field("error_code", &self.error_code);
formatter.field("retry_after", &self.retry_after);
formatter.finish()
}
}
}
impl ProgressEvent {
pub fn builder() -> crate::model::progress_event::Builder {
crate::model::progress_event::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 HandlerErrorCode {
#[allow(missing_docs)] AccessDenied,
#[allow(missing_docs)] AlreadyExists,
#[allow(missing_docs)] GeneralServiceException,
#[allow(missing_docs)] InternalFailure,
#[allow(missing_docs)] InvalidCredentials,
#[allow(missing_docs)] InvalidRequest,
#[allow(missing_docs)] NetworkFailure,
#[allow(missing_docs)] NotFound,
#[allow(missing_docs)] NotStabilized,
#[allow(missing_docs)] NotUpdatable,
#[allow(missing_docs)] ResourceConflict,
#[allow(missing_docs)] ServiceInternalError,
#[allow(missing_docs)] ServiceLimitExceeded,
#[allow(missing_docs)] ServiceTimeout,
#[allow(missing_docs)] Throttling,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HandlerErrorCode {
fn from(s: &str) -> Self {
match s {
"AccessDenied" => HandlerErrorCode::AccessDenied,
"AlreadyExists" => HandlerErrorCode::AlreadyExists,
"GeneralServiceException" => HandlerErrorCode::GeneralServiceException,
"InternalFailure" => HandlerErrorCode::InternalFailure,
"InvalidCredentials" => HandlerErrorCode::InvalidCredentials,
"InvalidRequest" => HandlerErrorCode::InvalidRequest,
"NetworkFailure" => HandlerErrorCode::NetworkFailure,
"NotFound" => HandlerErrorCode::NotFound,
"NotStabilized" => HandlerErrorCode::NotStabilized,
"NotUpdatable" => HandlerErrorCode::NotUpdatable,
"ResourceConflict" => HandlerErrorCode::ResourceConflict,
"ServiceInternalError" => HandlerErrorCode::ServiceInternalError,
"ServiceLimitExceeded" => HandlerErrorCode::ServiceLimitExceeded,
"ServiceTimeout" => HandlerErrorCode::ServiceTimeout,
"Throttling" => HandlerErrorCode::Throttling,
other => HandlerErrorCode::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for HandlerErrorCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HandlerErrorCode::from(s))
}
}
impl HandlerErrorCode {
pub fn as_str(&self) -> &str {
match self {
HandlerErrorCode::AccessDenied => "AccessDenied",
HandlerErrorCode::AlreadyExists => "AlreadyExists",
HandlerErrorCode::GeneralServiceException => "GeneralServiceException",
HandlerErrorCode::InternalFailure => "InternalFailure",
HandlerErrorCode::InvalidCredentials => "InvalidCredentials",
HandlerErrorCode::InvalidRequest => "InvalidRequest",
HandlerErrorCode::NetworkFailure => "NetworkFailure",
HandlerErrorCode::NotFound => "NotFound",
HandlerErrorCode::NotStabilized => "NotStabilized",
HandlerErrorCode::NotUpdatable => "NotUpdatable",
HandlerErrorCode::ResourceConflict => "ResourceConflict",
HandlerErrorCode::ServiceInternalError => "ServiceInternalError",
HandlerErrorCode::ServiceLimitExceeded => "ServiceLimitExceeded",
HandlerErrorCode::ServiceTimeout => "ServiceTimeout",
HandlerErrorCode::Throttling => "Throttling",
HandlerErrorCode::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"AccessDenied",
"AlreadyExists",
"GeneralServiceException",
"InternalFailure",
"InvalidCredentials",
"InvalidRequest",
"NetworkFailure",
"NotFound",
"NotStabilized",
"NotUpdatable",
"ResourceConflict",
"ServiceInternalError",
"ServiceLimitExceeded",
"ServiceTimeout",
"Throttling",
]
}
}
impl AsRef<str> for HandlerErrorCode {
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 OperationStatus {
#[allow(missing_docs)] CancelComplete,
#[allow(missing_docs)] CancelInProgress,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Success,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OperationStatus {
fn from(s: &str) -> Self {
match s {
"CANCEL_COMPLETE" => OperationStatus::CancelComplete,
"CANCEL_IN_PROGRESS" => OperationStatus::CancelInProgress,
"FAILED" => OperationStatus::Failed,
"IN_PROGRESS" => OperationStatus::InProgress,
"PENDING" => OperationStatus::Pending,
"SUCCESS" => OperationStatus::Success,
other => OperationStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for OperationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OperationStatus::from(s))
}
}
impl OperationStatus {
pub fn as_str(&self) -> &str {
match self {
OperationStatus::CancelComplete => "CANCEL_COMPLETE",
OperationStatus::CancelInProgress => "CANCEL_IN_PROGRESS",
OperationStatus::Failed => "FAILED",
OperationStatus::InProgress => "IN_PROGRESS",
OperationStatus::Pending => "PENDING",
OperationStatus::Success => "SUCCESS",
OperationStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"CANCEL_COMPLETE",
"CANCEL_IN_PROGRESS",
"FAILED",
"IN_PROGRESS",
"PENDING",
"SUCCESS",
]
}
}
impl AsRef<str> for OperationStatus {
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 Operation {
#[allow(missing_docs)] Create,
#[allow(missing_docs)] Delete,
#[allow(missing_docs)] Update,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Operation {
fn from(s: &str) -> Self {
match s {
"CREATE" => Operation::Create,
"DELETE" => Operation::Delete,
"UPDATE" => Operation::Update,
other => Operation::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for Operation {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Operation::from(s))
}
}
impl Operation {
pub fn as_str(&self) -> &str {
match self {
Operation::Create => "CREATE",
Operation::Delete => "DELETE",
Operation::Update => "UPDATE",
Operation::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CREATE", "DELETE", "UPDATE"]
}
}
impl AsRef<str> for Operation {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceDescription {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub properties: std::option::Option<std::string::String>,
}
impl ResourceDescription {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn properties(&self) -> std::option::Option<&str> {
self.properties.as_deref()
}
}
impl std::fmt::Debug for ResourceDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceDescription");
formatter.field("identifier", &self.identifier);
formatter.field("properties", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod resource_description {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) properties: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn properties(mut self, input: impl Into<std::string::String>) -> Self {
self.properties = Some(input.into());
self
}
pub fn set_properties(mut self, input: std::option::Option<std::string::String>) -> Self {
self.properties = input;
self
}
pub fn build(self) -> crate::model::ResourceDescription {
crate::model::ResourceDescription {
identifier: self.identifier,
properties: self.properties,
}
}
}
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("identifier", &self.identifier);
formatter.field("properties", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ResourceDescription {
pub fn builder() -> crate::model::resource_description::Builder {
crate::model::resource_description::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceRequestStatusFilter {
#[doc(hidden)]
pub operations: std::option::Option<std::vec::Vec<crate::model::Operation>>,
#[doc(hidden)]
pub operation_statuses: std::option::Option<std::vec::Vec<crate::model::OperationStatus>>,
}
impl ResourceRequestStatusFilter {
pub fn operations(&self) -> std::option::Option<&[crate::model::Operation]> {
self.operations.as_deref()
}
pub fn operation_statuses(&self) -> std::option::Option<&[crate::model::OperationStatus]> {
self.operation_statuses.as_deref()
}
}
pub mod resource_request_status_filter {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) operations: std::option::Option<std::vec::Vec<crate::model::Operation>>,
pub(crate) operation_statuses:
std::option::Option<std::vec::Vec<crate::model::OperationStatus>>,
}
impl Builder {
pub fn operations(mut self, input: crate::model::Operation) -> Self {
let mut v = self.operations.unwrap_or_default();
v.push(input);
self.operations = Some(v);
self
}
pub fn set_operations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Operation>>,
) -> Self {
self.operations = input;
self
}
pub fn operation_statuses(mut self, input: crate::model::OperationStatus) -> Self {
let mut v = self.operation_statuses.unwrap_or_default();
v.push(input);
self.operation_statuses = Some(v);
self
}
pub fn set_operation_statuses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OperationStatus>>,
) -> Self {
self.operation_statuses = input;
self
}
pub fn build(self) -> crate::model::ResourceRequestStatusFilter {
crate::model::ResourceRequestStatusFilter {
operations: self.operations,
operation_statuses: self.operation_statuses,
}
}
}
}
impl ResourceRequestStatusFilter {
pub fn builder() -> crate::model::resource_request_status_filter::Builder {
crate::model::resource_request_status_filter::Builder::default()
}
}