#[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()
}
}
#[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 {
"cannotParse" => ValidationExceptionReason::CannotParse,
"fieldValidationFailed" => ValidationExceptionReason::FieldValidationFailed,
"other" => ValidationExceptionReason::Other,
"unknownOperation" => 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 => "cannotParse",
ValidationExceptionReason::FieldValidationFailed => "fieldValidationFailed",
ValidationExceptionReason::Other => "other",
ValidationExceptionReason::UnknownOperation => "unknownOperation",
ValidationExceptionReason::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"cannotParse",
"fieldValidationFailed",
"other",
"unknownOperation",
]
}
}
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 UpdateRoutingControlStateEntry {
#[doc(hidden)]
pub routing_control_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub routing_control_state: std::option::Option<crate::model::RoutingControlState>,
}
impl UpdateRoutingControlStateEntry {
pub fn routing_control_arn(&self) -> std::option::Option<&str> {
self.routing_control_arn.as_deref()
}
pub fn routing_control_state(&self) -> std::option::Option<&crate::model::RoutingControlState> {
self.routing_control_state.as_ref()
}
}
pub mod update_routing_control_state_entry {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) routing_control_arn: std::option::Option<std::string::String>,
pub(crate) routing_control_state: std::option::Option<crate::model::RoutingControlState>,
}
impl Builder {
pub fn routing_control_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.routing_control_arn = Some(input.into());
self
}
pub fn set_routing_control_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.routing_control_arn = input;
self
}
pub fn routing_control_state(mut self, input: crate::model::RoutingControlState) -> Self {
self.routing_control_state = Some(input);
self
}
pub fn set_routing_control_state(
mut self,
input: std::option::Option<crate::model::RoutingControlState>,
) -> Self {
self.routing_control_state = input;
self
}
pub fn build(self) -> crate::model::UpdateRoutingControlStateEntry {
crate::model::UpdateRoutingControlStateEntry {
routing_control_arn: self.routing_control_arn,
routing_control_state: self.routing_control_state,
}
}
}
}
impl UpdateRoutingControlStateEntry {
pub fn builder() -> crate::model::update_routing_control_state_entry::Builder {
crate::model::update_routing_control_state_entry::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 RoutingControlState {
#[allow(missing_docs)] Off,
#[allow(missing_docs)] On,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RoutingControlState {
fn from(s: &str) -> Self {
match s {
"Off" => RoutingControlState::Off,
"On" => RoutingControlState::On,
other => {
RoutingControlState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for RoutingControlState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RoutingControlState::from(s))
}
}
impl RoutingControlState {
pub fn as_str(&self) -> &str {
match self {
RoutingControlState::Off => "Off",
RoutingControlState::On => "On",
RoutingControlState::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["Off", "On"]
}
}
impl AsRef<str> for RoutingControlState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RoutingControl {
#[doc(hidden)]
pub control_panel_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub control_panel_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub routing_control_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub routing_control_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub routing_control_state: std::option::Option<crate::model::RoutingControlState>,
}
impl RoutingControl {
pub fn control_panel_arn(&self) -> std::option::Option<&str> {
self.control_panel_arn.as_deref()
}
pub fn control_panel_name(&self) -> std::option::Option<&str> {
self.control_panel_name.as_deref()
}
pub fn routing_control_arn(&self) -> std::option::Option<&str> {
self.routing_control_arn.as_deref()
}
pub fn routing_control_name(&self) -> std::option::Option<&str> {
self.routing_control_name.as_deref()
}
pub fn routing_control_state(&self) -> std::option::Option<&crate::model::RoutingControlState> {
self.routing_control_state.as_ref()
}
}
pub mod routing_control {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_panel_arn: std::option::Option<std::string::String>,
pub(crate) control_panel_name: std::option::Option<std::string::String>,
pub(crate) routing_control_arn: std::option::Option<std::string::String>,
pub(crate) routing_control_name: std::option::Option<std::string::String>,
pub(crate) routing_control_state: std::option::Option<crate::model::RoutingControlState>,
}
impl Builder {
pub fn control_panel_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.control_panel_arn = Some(input.into());
self
}
pub fn set_control_panel_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_panel_arn = input;
self
}
pub fn control_panel_name(mut self, input: impl Into<std::string::String>) -> Self {
self.control_panel_name = Some(input.into());
self
}
pub fn set_control_panel_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_panel_name = input;
self
}
pub fn routing_control_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.routing_control_arn = Some(input.into());
self
}
pub fn set_routing_control_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.routing_control_arn = input;
self
}
pub fn routing_control_name(mut self, input: impl Into<std::string::String>) -> Self {
self.routing_control_name = Some(input.into());
self
}
pub fn set_routing_control_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.routing_control_name = input;
self
}
pub fn routing_control_state(mut self, input: crate::model::RoutingControlState) -> Self {
self.routing_control_state = Some(input);
self
}
pub fn set_routing_control_state(
mut self,
input: std::option::Option<crate::model::RoutingControlState>,
) -> Self {
self.routing_control_state = input;
self
}
pub fn build(self) -> crate::model::RoutingControl {
crate::model::RoutingControl {
control_panel_arn: self.control_panel_arn,
control_panel_name: self.control_panel_name,
routing_control_arn: self.routing_control_arn,
routing_control_name: self.routing_control_name,
routing_control_state: self.routing_control_state,
}
}
}
}
impl RoutingControl {
pub fn builder() -> crate::model::routing_control::Builder {
crate::model::routing_control::Builder::default()
}
}