1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// The possible types of dialer config parameters
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub enum DialerConfig {
/// Agentless Dialer config
AgentlessDialerConfig(crate::types::AgentlessDialerConfig),
/// Predictive Dialer config
PredictiveDialerConfig(crate::types::PredictiveDialerConfig),
/// Progressive Dialer config
ProgressiveDialerConfig(crate::types::ProgressiveDialerConfig),
/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
/// An unknown enum variant
///
/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
/// To investigate this, consider turning on debug logging to print the raw HTTP response.
#[non_exhaustive]
Unknown,
}
impl DialerConfig {
/// Tries to convert the enum instance into [`AgentlessDialerConfig`](crate::types::DialerConfig::AgentlessDialerConfig), extracting the inner [`AgentlessDialerConfig`](crate::types::AgentlessDialerConfig).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_agentless_dialer_config(&self) -> ::std::result::Result<&crate::types::AgentlessDialerConfig, &Self> {
if let DialerConfig::AgentlessDialerConfig(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`AgentlessDialerConfig`](crate::types::DialerConfig::AgentlessDialerConfig).
pub fn is_agentless_dialer_config(&self) -> bool {
self.as_agentless_dialer_config().is_ok()
}
/// Tries to convert the enum instance into [`PredictiveDialerConfig`](crate::types::DialerConfig::PredictiveDialerConfig), extracting the inner [`PredictiveDialerConfig`](crate::types::PredictiveDialerConfig).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_predictive_dialer_config(&self) -> ::std::result::Result<&crate::types::PredictiveDialerConfig, &Self> {
if let DialerConfig::PredictiveDialerConfig(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`PredictiveDialerConfig`](crate::types::DialerConfig::PredictiveDialerConfig).
pub fn is_predictive_dialer_config(&self) -> bool {
self.as_predictive_dialer_config().is_ok()
}
/// Tries to convert the enum instance into [`ProgressiveDialerConfig`](crate::types::DialerConfig::ProgressiveDialerConfig), extracting the inner [`ProgressiveDialerConfig`](crate::types::ProgressiveDialerConfig).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_progressive_dialer_config(&self) -> ::std::result::Result<&crate::types::ProgressiveDialerConfig, &Self> {
if let DialerConfig::ProgressiveDialerConfig(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`ProgressiveDialerConfig`](crate::types::DialerConfig::ProgressiveDialerConfig).
pub fn is_progressive_dialer_config(&self) -> bool {
self.as_progressive_dialer_config().is_ok()
}
/// Returns true if the enum instance is the `Unknown` variant.
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}