#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationExceptionField {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationExceptionField {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
pub mod validation_exception_field {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) message: 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 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::ValidationExceptionField {
crate::model::ValidationExceptionField {
name: self.name,
message: self.message,
}
}
}
}
impl ValidationExceptionField {
pub fn builder() -> crate::model::validation_exception_field::Builder {
crate::model::validation_exception_field::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 ValidationExceptionReason {
#[allow(missing_docs)] CannotParse,
#[allow(missing_docs)] FieldValidationFailed,
#[allow(missing_docs)] Other,
#[allow(missing_docs)] UnknownOperation,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ValidationExceptionReason {
fn from(s: &str) -> Self {
match s {
"CANNOT_PARSE" => ValidationExceptionReason::CannotParse,
"FIELD_VALIDATION_FAILED" => ValidationExceptionReason::FieldValidationFailed,
"OTHER" => ValidationExceptionReason::Other,
"UNKNOWN_OPERATION" => ValidationExceptionReason::UnknownOperation,
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::CannotParse => "CANNOT_PARSE",
ValidationExceptionReason::FieldValidationFailed => "FIELD_VALIDATION_FAILED",
ValidationExceptionReason::Other => "OTHER",
ValidationExceptionReason::UnknownOperation => "UNKNOWN_OPERATION",
ValidationExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"CANNOT_PARSE",
"FIELD_VALIDATION_FAILED",
"OTHER",
"UNKNOWN_OPERATION",
]
}
}
impl AsRef<str> for ValidationExceptionReason {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ContactChannelAddress {
#[doc(hidden)]
pub simple_address: std::option::Option<std::string::String>,
}
impl ContactChannelAddress {
pub fn simple_address(&self) -> std::option::Option<&str> {
self.simple_address.as_deref()
}
}
pub mod contact_channel_address {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) simple_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn simple_address(mut self, input: impl Into<std::string::String>) -> Self {
self.simple_address = Some(input.into());
self
}
pub fn set_simple_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.simple_address = input;
self
}
pub fn build(self) -> crate::model::ContactChannelAddress {
crate::model::ContactChannelAddress {
simple_address: self.simple_address,
}
}
}
}
impl ContactChannelAddress {
pub fn builder() -> crate::model::contact_channel_address::Builder {
crate::model::contact_channel_address::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Plan {
#[doc(hidden)]
pub stages: std::option::Option<std::vec::Vec<crate::model::Stage>>,
}
impl Plan {
pub fn stages(&self) -> std::option::Option<&[crate::model::Stage]> {
self.stages.as_deref()
}
}
pub mod plan {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) stages: std::option::Option<std::vec::Vec<crate::model::Stage>>,
}
impl Builder {
pub fn stages(mut self, input: crate::model::Stage) -> Self {
let mut v = self.stages.unwrap_or_default();
v.push(input);
self.stages = Some(v);
self
}
pub fn set_stages(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Stage>>,
) -> Self {
self.stages = input;
self
}
pub fn build(self) -> crate::model::Plan {
crate::model::Plan {
stages: self.stages,
}
}
}
}
impl Plan {
pub fn builder() -> crate::model::plan::Builder {
crate::model::plan::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Stage {
#[doc(hidden)]
pub duration_in_minutes: std::option::Option<i32>,
#[doc(hidden)]
pub targets: std::option::Option<std::vec::Vec<crate::model::Target>>,
}
impl Stage {
pub fn duration_in_minutes(&self) -> std::option::Option<i32> {
self.duration_in_minutes
}
pub fn targets(&self) -> std::option::Option<&[crate::model::Target]> {
self.targets.as_deref()
}
}
pub mod stage {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) duration_in_minutes: std::option::Option<i32>,
pub(crate) targets: std::option::Option<std::vec::Vec<crate::model::Target>>,
}
impl Builder {
pub fn duration_in_minutes(mut self, input: i32) -> Self {
self.duration_in_minutes = Some(input);
self
}
pub fn set_duration_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.duration_in_minutes = input;
self
}
pub fn targets(mut self, input: crate::model::Target) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input);
self.targets = Some(v);
self
}
pub fn set_targets(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Target>>,
) -> Self {
self.targets = input;
self
}
pub fn build(self) -> crate::model::Stage {
crate::model::Stage {
duration_in_minutes: self.duration_in_minutes,
targets: self.targets,
}
}
}
}
impl Stage {
pub fn builder() -> crate::model::stage::Builder {
crate::model::stage::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Target {
#[doc(hidden)]
pub channel_target_info: std::option::Option<crate::model::ChannelTargetInfo>,
#[doc(hidden)]
pub contact_target_info: std::option::Option<crate::model::ContactTargetInfo>,
}
impl Target {
pub fn channel_target_info(&self) -> std::option::Option<&crate::model::ChannelTargetInfo> {
self.channel_target_info.as_ref()
}
pub fn contact_target_info(&self) -> std::option::Option<&crate::model::ContactTargetInfo> {
self.contact_target_info.as_ref()
}
}
pub mod target {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) channel_target_info: std::option::Option<crate::model::ChannelTargetInfo>,
pub(crate) contact_target_info: std::option::Option<crate::model::ContactTargetInfo>,
}
impl Builder {
pub fn channel_target_info(mut self, input: crate::model::ChannelTargetInfo) -> Self {
self.channel_target_info = Some(input);
self
}
pub fn set_channel_target_info(
mut self,
input: std::option::Option<crate::model::ChannelTargetInfo>,
) -> Self {
self.channel_target_info = input;
self
}
pub fn contact_target_info(mut self, input: crate::model::ContactTargetInfo) -> Self {
self.contact_target_info = Some(input);
self
}
pub fn set_contact_target_info(
mut self,
input: std::option::Option<crate::model::ContactTargetInfo>,
) -> Self {
self.contact_target_info = input;
self
}
pub fn build(self) -> crate::model::Target {
crate::model::Target {
channel_target_info: self.channel_target_info,
contact_target_info: self.contact_target_info,
}
}
}
}
impl Target {
pub fn builder() -> crate::model::target::Builder {
crate::model::target::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ContactTargetInfo {
#[doc(hidden)]
pub contact_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub is_essential: std::option::Option<bool>,
}
impl ContactTargetInfo {
pub fn contact_id(&self) -> std::option::Option<&str> {
self.contact_id.as_deref()
}
pub fn is_essential(&self) -> std::option::Option<bool> {
self.is_essential
}
}
pub mod contact_target_info {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_id: std::option::Option<std::string::String>,
pub(crate) is_essential: std::option::Option<bool>,
}
impl Builder {
pub fn contact_id(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_id = Some(input.into());
self
}
pub fn set_contact_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_id = input;
self
}
pub fn is_essential(mut self, input: bool) -> Self {
self.is_essential = Some(input);
self
}
pub fn set_is_essential(mut self, input: std::option::Option<bool>) -> Self {
self.is_essential = input;
self
}
pub fn build(self) -> crate::model::ContactTargetInfo {
crate::model::ContactTargetInfo {
contact_id: self.contact_id,
is_essential: self.is_essential,
}
}
}
}
impl ContactTargetInfo {
pub fn builder() -> crate::model::contact_target_info::Builder {
crate::model::contact_target_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ChannelTargetInfo {
#[doc(hidden)]
pub contact_channel_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_interval_in_minutes: std::option::Option<i32>,
}
impl ChannelTargetInfo {
pub fn contact_channel_id(&self) -> std::option::Option<&str> {
self.contact_channel_id.as_deref()
}
pub fn retry_interval_in_minutes(&self) -> std::option::Option<i32> {
self.retry_interval_in_minutes
}
}
pub mod channel_target_info {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_channel_id: std::option::Option<std::string::String>,
pub(crate) retry_interval_in_minutes: std::option::Option<i32>,
}
impl Builder {
pub fn contact_channel_id(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_channel_id = Some(input.into());
self
}
pub fn set_contact_channel_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.contact_channel_id = input;
self
}
pub fn retry_interval_in_minutes(mut self, input: i32) -> Self {
self.retry_interval_in_minutes = Some(input);
self
}
pub fn set_retry_interval_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.retry_interval_in_minutes = input;
self
}
pub fn build(self) -> crate::model::ChannelTargetInfo {
crate::model::ChannelTargetInfo {
contact_channel_id: self.contact_channel_id,
retry_interval_in_minutes: self.retry_interval_in_minutes,
}
}
}
}
impl ChannelTargetInfo {
pub fn builder() -> crate::model::channel_target_info::Builder {
crate::model::channel_target_info::Builder::default()
}
}
#[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()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Page {
#[doc(hidden)]
pub page_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub engagement_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub contact_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub sender: std::option::Option<std::string::String>,
#[doc(hidden)]
pub incident_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub sent_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub delivery_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub read_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Page {
pub fn page_arn(&self) -> std::option::Option<&str> {
self.page_arn.as_deref()
}
pub fn engagement_arn(&self) -> std::option::Option<&str> {
self.engagement_arn.as_deref()
}
pub fn contact_arn(&self) -> std::option::Option<&str> {
self.contact_arn.as_deref()
}
pub fn sender(&self) -> std::option::Option<&str> {
self.sender.as_deref()
}
pub fn incident_id(&self) -> std::option::Option<&str> {
self.incident_id.as_deref()
}
pub fn sent_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.sent_time.as_ref()
}
pub fn delivery_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.delivery_time.as_ref()
}
pub fn read_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.read_time.as_ref()
}
}
pub mod page {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) page_arn: std::option::Option<std::string::String>,
pub(crate) engagement_arn: std::option::Option<std::string::String>,
pub(crate) contact_arn: std::option::Option<std::string::String>,
pub(crate) sender: std::option::Option<std::string::String>,
pub(crate) incident_id: std::option::Option<std::string::String>,
pub(crate) sent_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) delivery_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) read_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn page_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.page_arn = Some(input.into());
self
}
pub fn set_page_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.page_arn = input;
self
}
pub fn engagement_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.engagement_arn = Some(input.into());
self
}
pub fn set_engagement_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.engagement_arn = input;
self
}
pub fn contact_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_arn = Some(input.into());
self
}
pub fn set_contact_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_arn = input;
self
}
pub fn sender(mut self, input: impl Into<std::string::String>) -> Self {
self.sender = Some(input.into());
self
}
pub fn set_sender(mut self, input: std::option::Option<std::string::String>) -> Self {
self.sender = input;
self
}
pub fn incident_id(mut self, input: impl Into<std::string::String>) -> Self {
self.incident_id = Some(input.into());
self
}
pub fn set_incident_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.incident_id = input;
self
}
pub fn sent_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.sent_time = Some(input);
self
}
pub fn set_sent_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.sent_time = input;
self
}
pub fn delivery_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.delivery_time = Some(input);
self
}
pub fn set_delivery_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.delivery_time = input;
self
}
pub fn read_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.read_time = Some(input);
self
}
pub fn set_read_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.read_time = input;
self
}
pub fn build(self) -> crate::model::Page {
crate::model::Page {
page_arn: self.page_arn,
engagement_arn: self.engagement_arn,
contact_arn: self.contact_arn,
sender: self.sender,
incident_id: self.incident_id,
sent_time: self.sent_time,
delivery_time: self.delivery_time,
read_time: self.read_time,
}
}
}
}
impl Page {
pub fn builder() -> crate::model::page::Builder {
crate::model::page::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Receipt {
#[doc(hidden)]
pub contact_channel_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub receipt_type: std::option::Option<crate::model::ReceiptType>,
#[doc(hidden)]
pub receipt_info: std::option::Option<std::string::String>,
#[doc(hidden)]
pub receipt_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Receipt {
pub fn contact_channel_arn(&self) -> std::option::Option<&str> {
self.contact_channel_arn.as_deref()
}
pub fn receipt_type(&self) -> std::option::Option<&crate::model::ReceiptType> {
self.receipt_type.as_ref()
}
pub fn receipt_info(&self) -> std::option::Option<&str> {
self.receipt_info.as_deref()
}
pub fn receipt_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.receipt_time.as_ref()
}
}
pub mod receipt {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_channel_arn: std::option::Option<std::string::String>,
pub(crate) receipt_type: std::option::Option<crate::model::ReceiptType>,
pub(crate) receipt_info: std::option::Option<std::string::String>,
pub(crate) receipt_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn contact_channel_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_channel_arn = Some(input.into());
self
}
pub fn set_contact_channel_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.contact_channel_arn = input;
self
}
pub fn receipt_type(mut self, input: crate::model::ReceiptType) -> Self {
self.receipt_type = Some(input);
self
}
pub fn set_receipt_type(
mut self,
input: std::option::Option<crate::model::ReceiptType>,
) -> Self {
self.receipt_type = input;
self
}
pub fn receipt_info(mut self, input: impl Into<std::string::String>) -> Self {
self.receipt_info = Some(input.into());
self
}
pub fn set_receipt_info(mut self, input: std::option::Option<std::string::String>) -> Self {
self.receipt_info = input;
self
}
pub fn receipt_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.receipt_time = Some(input);
self
}
pub fn set_receipt_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.receipt_time = input;
self
}
pub fn build(self) -> crate::model::Receipt {
crate::model::Receipt {
contact_channel_arn: self.contact_channel_arn,
receipt_type: self.receipt_type,
receipt_info: self.receipt_info,
receipt_time: self.receipt_time,
}
}
}
}
impl Receipt {
pub fn builder() -> crate::model::receipt::Builder {
crate::model::receipt::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 ReceiptType {
#[allow(missing_docs)] Delivered,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] Read,
#[allow(missing_docs)] Sent,
#[allow(missing_docs)] Stop,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReceiptType {
fn from(s: &str) -> Self {
match s {
"DELIVERED" => ReceiptType::Delivered,
"ERROR" => ReceiptType::Error,
"READ" => ReceiptType::Read,
"SENT" => ReceiptType::Sent,
"STOP" => ReceiptType::Stop,
other => ReceiptType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ReceiptType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReceiptType::from(s))
}
}
impl ReceiptType {
pub fn as_str(&self) -> &str {
match self {
ReceiptType::Delivered => "DELIVERED",
ReceiptType::Error => "ERROR",
ReceiptType::Read => "READ",
ReceiptType::Sent => "SENT",
ReceiptType::Stop => "STOP",
ReceiptType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DELIVERED", "ERROR", "READ", "SENT", "STOP"]
}
}
impl AsRef<str> for ReceiptType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Engagement {
#[doc(hidden)]
pub engagement_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub contact_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub sender: std::option::Option<std::string::String>,
#[doc(hidden)]
pub incident_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub start_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub stop_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Engagement {
pub fn engagement_arn(&self) -> std::option::Option<&str> {
self.engagement_arn.as_deref()
}
pub fn contact_arn(&self) -> std::option::Option<&str> {
self.contact_arn.as_deref()
}
pub fn sender(&self) -> std::option::Option<&str> {
self.sender.as_deref()
}
pub fn incident_id(&self) -> std::option::Option<&str> {
self.incident_id.as_deref()
}
pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
pub fn stop_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.stop_time.as_ref()
}
}
pub mod engagement {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) engagement_arn: std::option::Option<std::string::String>,
pub(crate) contact_arn: std::option::Option<std::string::String>,
pub(crate) sender: std::option::Option<std::string::String>,
pub(crate) incident_id: std::option::Option<std::string::String>,
pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) stop_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn engagement_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.engagement_arn = Some(input.into());
self
}
pub fn set_engagement_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.engagement_arn = input;
self
}
pub fn contact_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_arn = Some(input.into());
self
}
pub fn set_contact_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_arn = input;
self
}
pub fn sender(mut self, input: impl Into<std::string::String>) -> Self {
self.sender = Some(input.into());
self
}
pub fn set_sender(mut self, input: std::option::Option<std::string::String>) -> Self {
self.sender = input;
self
}
pub fn incident_id(mut self, input: impl Into<std::string::String>) -> Self {
self.incident_id = Some(input.into());
self
}
pub fn set_incident_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.incident_id = 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 stop_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.stop_time = Some(input);
self
}
pub fn set_stop_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.stop_time = input;
self
}
pub fn build(self) -> crate::model::Engagement {
crate::model::Engagement {
engagement_arn: self.engagement_arn,
contact_arn: self.contact_arn,
sender: self.sender,
incident_id: self.incident_id,
start_time: self.start_time,
stop_time: self.stop_time,
}
}
}
}
impl Engagement {
pub fn builder() -> crate::model::engagement::Builder {
crate::model::engagement::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TimeRange {
#[doc(hidden)]
pub start_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl TimeRange {
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 mod time_range {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
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 build(self) -> crate::model::TimeRange {
crate::model::TimeRange {
start_time: self.start_time,
end_time: self.end_time,
}
}
}
}
impl TimeRange {
pub fn builder() -> crate::model::time_range::Builder {
crate::model::time_range::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Contact {
#[doc(hidden)]
pub contact_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub alias: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::ContactType>,
}
impl Contact {
pub fn contact_arn(&self) -> std::option::Option<&str> {
self.contact_arn.as_deref()
}
pub fn alias(&self) -> std::option::Option<&str> {
self.alias.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::ContactType> {
self.r#type.as_ref()
}
}
pub mod contact {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_arn: std::option::Option<std::string::String>,
pub(crate) alias: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::ContactType>,
}
impl Builder {
pub fn contact_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_arn = Some(input.into());
self
}
pub fn set_contact_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_arn = input;
self
}
pub fn alias(mut self, input: impl Into<std::string::String>) -> Self {
self.alias = Some(input.into());
self
}
pub fn set_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
self.alias = 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 r#type(mut self, input: crate::model::ContactType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ContactType>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::Contact {
crate::model::Contact {
contact_arn: self.contact_arn,
alias: self.alias,
display_name: self.display_name,
r#type: self.r#type,
}
}
}
}
impl Contact {
pub fn builder() -> crate::model::contact::Builder {
crate::model::contact::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 ContactType {
#[allow(missing_docs)] Escalation,
#[allow(missing_docs)] Personal,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ContactType {
fn from(s: &str) -> Self {
match s {
"ESCALATION" => ContactType::Escalation,
"PERSONAL" => ContactType::Personal,
other => ContactType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ContactType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ContactType::from(s))
}
}
impl ContactType {
pub fn as_str(&self) -> &str {
match self {
ContactType::Escalation => "ESCALATION",
ContactType::Personal => "PERSONAL",
ContactType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ESCALATION", "PERSONAL"]
}
}
impl AsRef<str> for ContactType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ContactChannel {
#[doc(hidden)]
pub contact_channel_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub contact_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::ChannelType>,
#[doc(hidden)]
pub delivery_address: std::option::Option<crate::model::ContactChannelAddress>,
#[doc(hidden)]
pub activation_status: std::option::Option<crate::model::ActivationStatus>,
}
impl ContactChannel {
pub fn contact_channel_arn(&self) -> std::option::Option<&str> {
self.contact_channel_arn.as_deref()
}
pub fn contact_arn(&self) -> std::option::Option<&str> {
self.contact_arn.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::ChannelType> {
self.r#type.as_ref()
}
pub fn delivery_address(&self) -> std::option::Option<&crate::model::ContactChannelAddress> {
self.delivery_address.as_ref()
}
pub fn activation_status(&self) -> std::option::Option<&crate::model::ActivationStatus> {
self.activation_status.as_ref()
}
}
pub mod contact_channel {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_channel_arn: std::option::Option<std::string::String>,
pub(crate) contact_arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::ChannelType>,
pub(crate) delivery_address: std::option::Option<crate::model::ContactChannelAddress>,
pub(crate) activation_status: std::option::Option<crate::model::ActivationStatus>,
}
impl Builder {
pub fn contact_channel_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_channel_arn = Some(input.into());
self
}
pub fn set_contact_channel_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.contact_channel_arn = input;
self
}
pub fn contact_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_arn = Some(input.into());
self
}
pub fn set_contact_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_arn = input;
self
}
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 r#type(mut self, input: crate::model::ChannelType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ChannelType>) -> Self {
self.r#type = input;
self
}
pub fn delivery_address(mut self, input: crate::model::ContactChannelAddress) -> Self {
self.delivery_address = Some(input);
self
}
pub fn set_delivery_address(
mut self,
input: std::option::Option<crate::model::ContactChannelAddress>,
) -> Self {
self.delivery_address = input;
self
}
pub fn activation_status(mut self, input: crate::model::ActivationStatus) -> Self {
self.activation_status = Some(input);
self
}
pub fn set_activation_status(
mut self,
input: std::option::Option<crate::model::ActivationStatus>,
) -> Self {
self.activation_status = input;
self
}
pub fn build(self) -> crate::model::ContactChannel {
crate::model::ContactChannel {
contact_channel_arn: self.contact_channel_arn,
contact_arn: self.contact_arn,
name: self.name,
r#type: self.r#type,
delivery_address: self.delivery_address,
activation_status: self.activation_status,
}
}
}
}
impl ContactChannel {
pub fn builder() -> crate::model::contact_channel::Builder {
crate::model::contact_channel::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 ActivationStatus {
#[allow(missing_docs)] Activated,
#[allow(missing_docs)] NotActivated,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ActivationStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVATED" => ActivationStatus::Activated,
"NOT_ACTIVATED" => ActivationStatus::NotActivated,
other => ActivationStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ActivationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ActivationStatus::from(s))
}
}
impl ActivationStatus {
pub fn as_str(&self) -> &str {
match self {
ActivationStatus::Activated => "ACTIVATED",
ActivationStatus::NotActivated => "NOT_ACTIVATED",
ActivationStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ACTIVATED", "NOT_ACTIVATED"]
}
}
impl AsRef<str> for ActivationStatus {
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 ChannelType {
#[allow(missing_docs)] Email,
#[allow(missing_docs)] Sms,
#[allow(missing_docs)] Voice,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChannelType {
fn from(s: &str) -> Self {
match s {
"EMAIL" => ChannelType::Email,
"SMS" => ChannelType::Sms,
"VOICE" => ChannelType::Voice,
other => ChannelType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ChannelType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ChannelType::from(s))
}
}
impl ChannelType {
pub fn as_str(&self) -> &str {
match self {
ChannelType::Email => "EMAIL",
ChannelType::Sms => "SMS",
ChannelType::Voice => "VOICE",
ChannelType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["EMAIL", "SMS", "VOICE"]
}
}
impl AsRef<str> for ChannelType {
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 AcceptCodeValidation {
#[allow(missing_docs)] Enforce,
#[allow(missing_docs)] Ignore,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AcceptCodeValidation {
fn from(s: &str) -> Self {
match s {
"ENFORCE" => AcceptCodeValidation::Enforce,
"IGNORE" => AcceptCodeValidation::Ignore,
other => {
AcceptCodeValidation::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for AcceptCodeValidation {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AcceptCodeValidation::from(s))
}
}
impl AcceptCodeValidation {
pub fn as_str(&self) -> &str {
match self {
AcceptCodeValidation::Enforce => "ENFORCE",
AcceptCodeValidation::Ignore => "IGNORE",
AcceptCodeValidation::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ENFORCE", "IGNORE"]
}
}
impl AsRef<str> for AcceptCodeValidation {
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 AcceptType {
#[allow(missing_docs)] Delivered,
#[allow(missing_docs)] Read,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AcceptType {
fn from(s: &str) -> Self {
match s {
"DELIVERED" => AcceptType::Delivered,
"READ" => AcceptType::Read,
other => AcceptType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AcceptType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AcceptType::from(s))
}
}
impl AcceptType {
pub fn as_str(&self) -> &str {
match self {
AcceptType::Delivered => "DELIVERED",
AcceptType::Read => "READ",
AcceptType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DELIVERED", "READ"]
}
}
impl AsRef<str> for AcceptType {
fn as_ref(&self) -> &str {
self.as_str()
}
}