#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnabledControlSummary {
#[doc(hidden)]
pub control_identifier: std::option::Option<std::string::String>,
}
impl EnabledControlSummary {
pub fn control_identifier(&self) -> std::option::Option<&str> {
self.control_identifier.as_deref()
}
}
pub mod enabled_control_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn control_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.control_identifier = Some(input.into());
self
}
pub fn set_control_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_identifier = input;
self
}
pub fn build(self) -> crate::model::EnabledControlSummary {
crate::model::EnabledControlSummary {
control_identifier: self.control_identifier,
}
}
}
}
impl EnabledControlSummary {
pub fn builder() -> crate::model::enabled_control_summary::Builder {
crate::model::enabled_control_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ControlOperation {
#[doc(hidden)]
pub operation_type: std::option::Option<crate::model::ControlOperationType>,
#[doc(hidden)]
pub start_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub end_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::ControlOperationStatus>,
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
}
impl ControlOperation {
pub fn operation_type(&self) -> std::option::Option<&crate::model::ControlOperationType> {
self.operation_type.as_ref()
}
pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ControlOperationStatus> {
self.status.as_ref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
}
pub mod control_operation {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) operation_type: std::option::Option<crate::model::ControlOperationType>,
pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) status: std::option::Option<crate::model::ControlOperationStatus>,
pub(crate) status_message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn operation_type(mut self, input: crate::model::ControlOperationType) -> Self {
self.operation_type = Some(input);
self
}
pub fn set_operation_type(
mut self,
input: std::option::Option<crate::model::ControlOperationType>,
) -> Self {
self.operation_type = input;
self
}
pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.start_time = Some(input);
self
}
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.start_time = input;
self
}
pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.end_time = Some(input);
self
}
pub fn set_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.end_time = input;
self
}
pub fn status(mut self, input: crate::model::ControlOperationStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ControlOperationStatus>,
) -> Self {
self.status = 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 build(self) -> crate::model::ControlOperation {
crate::model::ControlOperation {
operation_type: self.operation_type,
start_time: self.start_time,
end_time: self.end_time,
status: self.status,
status_message: self.status_message,
}
}
}
}
impl ControlOperation {
pub fn builder() -> crate::model::control_operation::Builder {
crate::model::control_operation::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 ControlOperationStatus {
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Succeeded,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ControlOperationStatus {
fn from(s: &str) -> Self {
match s {
"FAILED" => ControlOperationStatus::Failed,
"IN_PROGRESS" => ControlOperationStatus::InProgress,
"SUCCEEDED" => ControlOperationStatus::Succeeded,
other => {
ControlOperationStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ControlOperationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ControlOperationStatus::from(s))
}
}
impl ControlOperationStatus {
pub fn as_str(&self) -> &str {
match self {
ControlOperationStatus::Failed => "FAILED",
ControlOperationStatus::InProgress => "IN_PROGRESS",
ControlOperationStatus::Succeeded => "SUCCEEDED",
ControlOperationStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["FAILED", "IN_PROGRESS", "SUCCEEDED"]
}
}
impl AsRef<str> for ControlOperationStatus {
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 ControlOperationType {
#[allow(missing_docs)] DisableControl,
#[allow(missing_docs)] EnableControl,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ControlOperationType {
fn from(s: &str) -> Self {
match s {
"DISABLE_CONTROL" => ControlOperationType::DisableControl,
"ENABLE_CONTROL" => ControlOperationType::EnableControl,
other => {
ControlOperationType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ControlOperationType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ControlOperationType::from(s))
}
}
impl ControlOperationType {
pub fn as_str(&self) -> &str {
match self {
ControlOperationType::DisableControl => "DISABLE_CONTROL",
ControlOperationType::EnableControl => "ENABLE_CONTROL",
ControlOperationType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DISABLE_CONTROL", "ENABLE_CONTROL"]
}
}
impl AsRef<str> for ControlOperationType {
fn as_ref(&self) -> &str {
self.as_str()
}
}