#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionField {
pub name: std::option::Option<std::string::String>,
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ValidationExceptionField {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationExceptionField");
formatter.field("name", &self.name);
formatter.field("message", &self.message);
formatter.finish()
}
}
pub mod validation_exception_field {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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(String),
}
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(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(s) => s.as_ref(),
}
}
pub 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)]
pub struct Site {
pub site_id: std::option::Option<std::string::String>,
pub site_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub location: std::option::Option<crate::model::Location>,
pub created_at: std::option::Option<aws_smithy_types::Instant>,
pub state: std::option::Option<crate::model::SiteState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for Site {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Site");
formatter.field("site_id", &self.site_id);
formatter.field("site_arn", &self.site_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("description", &self.description);
formatter.field("location", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod site {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) site_id: std::option::Option<std::string::String>,
pub(crate) site_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<crate::model::Location>,
pub(crate) created_at: std::option::Option<aws_smithy_types::Instant>,
pub(crate) state: std::option::Option<crate::model::SiteState>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
self.site_id = Some(input.into());
self
}
pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_id = input;
self
}
pub fn site_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.site_arn = Some(input.into());
self
}
pub fn set_site_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn location(mut self, input: crate::model::Location) -> Self {
self.location = Some(input);
self
}
pub fn set_location(mut self, input: std::option::Option<crate::model::Location>) -> Self {
self.location = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::SiteState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(mut self, input: std::option::Option<crate::model::SiteState>) -> Self {
self.state = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::Site {
crate::model::Site {
site_id: self.site_id,
site_arn: self.site_arn,
global_network_id: self.global_network_id,
description: self.description,
location: self.location,
created_at: self.created_at,
state: self.state,
tags: self.tags,
}
}
}
}
impl Site {
pub fn builder() -> crate::model::site::Builder {
crate::model::site::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
pub key: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for Tag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tag");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod tag {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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()
}
}
#[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 SiteState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for SiteState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => SiteState::Available,
"DELETING" => SiteState::Deleting,
"PENDING" => SiteState::Pending,
"UPDATING" => SiteState::Updating,
other => SiteState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SiteState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SiteState::from(s))
}
}
impl SiteState {
pub fn as_str(&self) -> &str {
match self {
SiteState::Available => "AVAILABLE",
SiteState::Deleting => "DELETING",
SiteState::Pending => "PENDING",
SiteState::Updating => "UPDATING",
SiteState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETING", "PENDING", "UPDATING"]
}
}
impl AsRef<str> for SiteState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Location {
pub address: std::option::Option<std::string::String>,
pub latitude: std::option::Option<std::string::String>,
pub longitude: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for Location {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Location");
formatter.field("address", &self.address);
formatter.field("latitude", &self.latitude);
formatter.field("longitude", &self.longitude);
formatter.finish()
}
}
pub mod location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) address: std::option::Option<std::string::String>,
pub(crate) latitude: std::option::Option<std::string::String>,
pub(crate) longitude: std::option::Option<std::string::String>,
}
impl Builder {
pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
self.address = Some(input.into());
self
}
pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.address = input;
self
}
pub fn latitude(mut self, input: impl Into<std::string::String>) -> Self {
self.latitude = Some(input.into());
self
}
pub fn set_latitude(mut self, input: std::option::Option<std::string::String>) -> Self {
self.latitude = input;
self
}
pub fn longitude(mut self, input: impl Into<std::string::String>) -> Self {
self.longitude = Some(input.into());
self
}
pub fn set_longitude(mut self, input: std::option::Option<std::string::String>) -> Self {
self.longitude = input;
self
}
pub fn build(self) -> crate::model::Location {
crate::model::Location {
address: self.address,
latitude: self.latitude,
longitude: self.longitude,
}
}
}
}
impl Location {
pub fn builder() -> crate::model::location::Builder {
crate::model::location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Link {
pub link_id: std::option::Option<std::string::String>,
pub link_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub site_id: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub r#type: std::option::Option<std::string::String>,
pub bandwidth: std::option::Option<crate::model::Bandwidth>,
pub provider: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::Instant>,
pub state: std::option::Option<crate::model::LinkState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for Link {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Link");
formatter.field("link_id", &self.link_id);
formatter.field("link_arn", &self.link_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("site_id", &self.site_id);
formatter.field("description", &self.description);
formatter.field("r#type", &self.r#type);
formatter.field("bandwidth", &self.bandwidth);
formatter.field("provider", &self.provider);
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod link {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) link_id: std::option::Option<std::string::String>,
pub(crate) link_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) site_id: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<std::string::String>,
pub(crate) bandwidth: std::option::Option<crate::model::Bandwidth>,
pub(crate) provider: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::Instant>,
pub(crate) state: std::option::Option<crate::model::LinkState>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.link_id = Some(input.into());
self
}
pub fn set_link_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_id = input;
self
}
pub fn link_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.link_arn = Some(input.into());
self
}
pub fn set_link_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
self.site_id = Some(input.into());
self
}
pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_id = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
self.r#type = Some(input.into());
self
}
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn bandwidth(mut self, input: crate::model::Bandwidth) -> Self {
self.bandwidth = Some(input);
self
}
pub fn set_bandwidth(
mut self,
input: std::option::Option<crate::model::Bandwidth>,
) -> Self {
self.bandwidth = input;
self
}
pub fn provider(mut self, input: impl Into<std::string::String>) -> Self {
self.provider = Some(input.into());
self
}
pub fn set_provider(mut self, input: std::option::Option<std::string::String>) -> Self {
self.provider = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::LinkState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(mut self, input: std::option::Option<crate::model::LinkState>) -> Self {
self.state = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::Link {
crate::model::Link {
link_id: self.link_id,
link_arn: self.link_arn,
global_network_id: self.global_network_id,
site_id: self.site_id,
description: self.description,
r#type: self.r#type,
bandwidth: self.bandwidth,
provider: self.provider,
created_at: self.created_at,
state: self.state,
tags: self.tags,
}
}
}
}
impl Link {
pub fn builder() -> crate::model::link::Builder {
crate::model::link::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 LinkState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for LinkState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => LinkState::Available,
"DELETING" => LinkState::Deleting,
"PENDING" => LinkState::Pending,
"UPDATING" => LinkState::Updating,
other => LinkState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for LinkState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LinkState::from(s))
}
}
impl LinkState {
pub fn as_str(&self) -> &str {
match self {
LinkState::Available => "AVAILABLE",
LinkState::Deleting => "DELETING",
LinkState::Pending => "PENDING",
LinkState::Updating => "UPDATING",
LinkState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETING", "PENDING", "UPDATING"]
}
}
impl AsRef<str> for LinkState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Bandwidth {
pub upload_speed: std::option::Option<i32>,
pub download_speed: std::option::Option<i32>,
}
impl std::fmt::Debug for Bandwidth {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Bandwidth");
formatter.field("upload_speed", &self.upload_speed);
formatter.field("download_speed", &self.download_speed);
formatter.finish()
}
}
pub mod bandwidth {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) upload_speed: std::option::Option<i32>,
pub(crate) download_speed: std::option::Option<i32>,
}
impl Builder {
pub fn upload_speed(mut self, input: i32) -> Self {
self.upload_speed = Some(input);
self
}
pub fn set_upload_speed(mut self, input: std::option::Option<i32>) -> Self {
self.upload_speed = input;
self
}
pub fn download_speed(mut self, input: i32) -> Self {
self.download_speed = Some(input);
self
}
pub fn set_download_speed(mut self, input: std::option::Option<i32>) -> Self {
self.download_speed = input;
self
}
pub fn build(self) -> crate::model::Bandwidth {
crate::model::Bandwidth {
upload_speed: self.upload_speed,
download_speed: self.download_speed,
}
}
}
}
impl Bandwidth {
pub fn builder() -> crate::model::bandwidth::Builder {
crate::model::bandwidth::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GlobalNetwork {
pub global_network_id: std::option::Option<std::string::String>,
pub global_network_arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::Instant>,
pub state: std::option::Option<crate::model::GlobalNetworkState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for GlobalNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GlobalNetwork");
formatter.field("global_network_id", &self.global_network_id);
formatter.field("global_network_arn", &self.global_network_arn);
formatter.field("description", &self.description);
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod global_network {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) global_network_arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::Instant>,
pub(crate) state: std::option::Option<crate::model::GlobalNetworkState>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn global_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_arn = Some(input.into());
self
}
pub fn set_global_network_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_arn = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::GlobalNetworkState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::GlobalNetworkState>,
) -> Self {
self.state = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::GlobalNetwork {
crate::model::GlobalNetwork {
global_network_id: self.global_network_id,
global_network_arn: self.global_network_arn,
description: self.description,
created_at: self.created_at,
state: self.state,
tags: self.tags,
}
}
}
}
impl GlobalNetwork {
pub fn builder() -> crate::model::global_network::Builder {
crate::model::global_network::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 GlobalNetworkState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for GlobalNetworkState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => GlobalNetworkState::Available,
"DELETING" => GlobalNetworkState::Deleting,
"PENDING" => GlobalNetworkState::Pending,
"UPDATING" => GlobalNetworkState::Updating,
other => GlobalNetworkState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for GlobalNetworkState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(GlobalNetworkState::from(s))
}
}
impl GlobalNetworkState {
pub fn as_str(&self) -> &str {
match self {
GlobalNetworkState::Available => "AVAILABLE",
GlobalNetworkState::Deleting => "DELETING",
GlobalNetworkState::Pending => "PENDING",
GlobalNetworkState::Updating => "UPDATING",
GlobalNetworkState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETING", "PENDING", "UPDATING"]
}
}
impl AsRef<str> for GlobalNetworkState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Device {
pub device_id: std::option::Option<std::string::String>,
pub device_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub aws_location: std::option::Option<crate::model::AwsLocation>,
pub description: std::option::Option<std::string::String>,
pub r#type: std::option::Option<std::string::String>,
pub vendor: std::option::Option<std::string::String>,
pub model: std::option::Option<std::string::String>,
pub serial_number: std::option::Option<std::string::String>,
pub location: std::option::Option<crate::model::Location>,
pub site_id: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::Instant>,
pub state: std::option::Option<crate::model::DeviceState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for Device {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Device");
formatter.field("device_id", &self.device_id);
formatter.field("device_arn", &self.device_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("aws_location", &self.aws_location);
formatter.field("description", &self.description);
formatter.field("r#type", &self.r#type);
formatter.field("vendor", &self.vendor);
formatter.field("model", &self.model);
formatter.field("serial_number", &self.serial_number);
formatter.field("location", &"*** Sensitive Data Redacted ***");
formatter.field("site_id", &self.site_id);
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod device {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) device_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) aws_location: std::option::Option<crate::model::AwsLocation>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<std::string::String>,
pub(crate) vendor: std::option::Option<std::string::String>,
pub(crate) model: std::option::Option<std::string::String>,
pub(crate) serial_number: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<crate::model::Location>,
pub(crate) site_id: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::Instant>,
pub(crate) state: std::option::Option<crate::model::DeviceState>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn device_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.device_arn = Some(input.into());
self
}
pub fn set_device_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn aws_location(mut self, input: crate::model::AwsLocation) -> Self {
self.aws_location = Some(input);
self
}
pub fn set_aws_location(
mut self,
input: std::option::Option<crate::model::AwsLocation>,
) -> Self {
self.aws_location = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
self.r#type = Some(input.into());
self
}
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn vendor(mut self, input: impl Into<std::string::String>) -> Self {
self.vendor = Some(input.into());
self
}
pub fn set_vendor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.vendor = input;
self
}
pub fn model(mut self, input: impl Into<std::string::String>) -> Self {
self.model = Some(input.into());
self
}
pub fn set_model(mut self, input: std::option::Option<std::string::String>) -> Self {
self.model = input;
self
}
pub fn serial_number(mut self, input: impl Into<std::string::String>) -> Self {
self.serial_number = Some(input.into());
self
}
pub fn set_serial_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.serial_number = input;
self
}
pub fn location(mut self, input: crate::model::Location) -> Self {
self.location = Some(input);
self
}
pub fn set_location(mut self, input: std::option::Option<crate::model::Location>) -> Self {
self.location = input;
self
}
pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
self.site_id = Some(input.into());
self
}
pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_id = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::DeviceState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(mut self, input: std::option::Option<crate::model::DeviceState>) -> Self {
self.state = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::Device {
crate::model::Device {
device_id: self.device_id,
device_arn: self.device_arn,
global_network_id: self.global_network_id,
aws_location: self.aws_location,
description: self.description,
r#type: self.r#type,
vendor: self.vendor,
model: self.model,
serial_number: self.serial_number,
location: self.location,
site_id: self.site_id,
created_at: self.created_at,
state: self.state,
tags: self.tags,
}
}
}
}
impl Device {
pub fn builder() -> crate::model::device::Builder {
crate::model::device::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 DeviceState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for DeviceState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => DeviceState::Available,
"DELETING" => DeviceState::Deleting,
"PENDING" => DeviceState::Pending,
"UPDATING" => DeviceState::Updating,
other => DeviceState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeviceState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeviceState::from(s))
}
}
impl DeviceState {
pub fn as_str(&self) -> &str {
match self {
DeviceState::Available => "AVAILABLE",
DeviceState::Deleting => "DELETING",
DeviceState::Pending => "PENDING",
DeviceState::Updating => "UPDATING",
DeviceState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETING", "PENDING", "UPDATING"]
}
}
impl AsRef<str> for DeviceState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AwsLocation {
pub zone: std::option::Option<std::string::String>,
pub subnet_arn: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for AwsLocation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AwsLocation");
formatter.field("zone", &self.zone);
formatter.field("subnet_arn", &self.subnet_arn);
formatter.finish()
}
}
pub mod aws_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) zone: std::option::Option<std::string::String>,
pub(crate) subnet_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn zone(mut self, input: impl Into<std::string::String>) -> Self {
self.zone = Some(input.into());
self
}
pub fn set_zone(mut self, input: std::option::Option<std::string::String>) -> Self {
self.zone = input;
self
}
pub fn subnet_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_arn = Some(input.into());
self
}
pub fn set_subnet_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subnet_arn = input;
self
}
pub fn build(self) -> crate::model::AwsLocation {
crate::model::AwsLocation {
zone: self.zone,
subnet_arn: self.subnet_arn,
}
}
}
}
impl AwsLocation {
pub fn builder() -> crate::model::aws_location::Builder {
crate::model::aws_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Connection {
pub connection_id: std::option::Option<std::string::String>,
pub connection_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
pub connected_device_id: std::option::Option<std::string::String>,
pub link_id: std::option::Option<std::string::String>,
pub connected_link_id: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub created_at: std::option::Option<aws_smithy_types::Instant>,
pub state: std::option::Option<crate::model::ConnectionState>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for Connection {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Connection");
formatter.field("connection_id", &self.connection_id);
formatter.field("connection_arn", &self.connection_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("device_id", &self.device_id);
formatter.field("connected_device_id", &self.connected_device_id);
formatter.field("link_id", &self.link_id);
formatter.field("connected_link_id", &self.connected_link_id);
formatter.field("description", &self.description);
formatter.field("created_at", &self.created_at);
formatter.field("state", &self.state);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod connection {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) connection_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) connected_device_id: std::option::Option<std::string::String>,
pub(crate) link_id: std::option::Option<std::string::String>,
pub(crate) connected_link_id: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::Instant>,
pub(crate) state: std::option::Option<crate::model::ConnectionState>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn connection_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_arn = Some(input.into());
self
}
pub fn set_connection_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn connected_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connected_device_id = Some(input.into());
self
}
pub fn set_connected_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connected_device_id = input;
self
}
pub fn link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.link_id = Some(input.into());
self
}
pub fn set_link_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_id = input;
self
}
pub fn connected_link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connected_link_id = Some(input.into());
self
}
pub fn set_connected_link_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connected_link_id = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_at = Some(input);
self
}
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_at = input;
self
}
pub fn state(mut self, input: crate::model::ConnectionState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::ConnectionState>,
) -> Self {
self.state = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::Connection {
crate::model::Connection {
connection_id: self.connection_id,
connection_arn: self.connection_arn,
global_network_id: self.global_network_id,
device_id: self.device_id,
connected_device_id: self.connected_device_id,
link_id: self.link_id,
connected_link_id: self.connected_link_id,
description: self.description,
created_at: self.created_at,
state: self.state,
tags: self.tags,
}
}
}
}
impl Connection {
pub fn builder() -> crate::model::connection::Builder {
crate::model::connection::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 ConnectionState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Updating,
Unknown(String),
}
impl std::convert::From<&str> for ConnectionState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => ConnectionState::Available,
"DELETING" => ConnectionState::Deleting,
"PENDING" => ConnectionState::Pending,
"UPDATING" => ConnectionState::Updating,
other => ConnectionState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectionState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectionState::from(s))
}
}
impl ConnectionState {
pub fn as_str(&self) -> &str {
match self {
ConnectionState::Available => "AVAILABLE",
ConnectionState::Deleting => "DELETING",
ConnectionState::Pending => "PENDING",
ConnectionState::Updating => "UPDATING",
ConnectionState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETING", "PENDING", "UPDATING"]
}
}
impl AsRef<str> for ConnectionState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TransitGatewayRegistration {
pub global_network_id: std::option::Option<std::string::String>,
pub transit_gateway_arn: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::TransitGatewayRegistrationStateReason>,
}
impl std::fmt::Debug for TransitGatewayRegistration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TransitGatewayRegistration");
formatter.field("global_network_id", &self.global_network_id);
formatter.field("transit_gateway_arn", &self.transit_gateway_arn);
formatter.field("state", &self.state);
formatter.finish()
}
}
pub mod transit_gateway_registration {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) transit_gateway_arn: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::TransitGatewayRegistrationStateReason>,
}
impl Builder {
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn transit_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.transit_gateway_arn = Some(input.into());
self
}
pub fn set_transit_gateway_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_arn = input;
self
}
pub fn state(mut self, input: crate::model::TransitGatewayRegistrationStateReason) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::TransitGatewayRegistrationStateReason>,
) -> Self {
self.state = input;
self
}
pub fn build(self) -> crate::model::TransitGatewayRegistration {
crate::model::TransitGatewayRegistration {
global_network_id: self.global_network_id,
transit_gateway_arn: self.transit_gateway_arn,
state: self.state,
}
}
}
}
impl TransitGatewayRegistration {
pub fn builder() -> crate::model::transit_gateway_registration::Builder {
crate::model::transit_gateway_registration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TransitGatewayRegistrationStateReason {
pub code: std::option::Option<crate::model::TransitGatewayRegistrationState>,
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for TransitGatewayRegistrationStateReason {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TransitGatewayRegistrationStateReason");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.finish()
}
}
pub mod transit_gateway_registration_state_reason {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::TransitGatewayRegistrationState>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn code(mut self, input: crate::model::TransitGatewayRegistrationState) -> Self {
self.code = Some(input);
self
}
pub fn set_code(
mut self,
input: std::option::Option<crate::model::TransitGatewayRegistrationState>,
) -> Self {
self.code = 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::TransitGatewayRegistrationStateReason {
crate::model::TransitGatewayRegistrationStateReason {
code: self.code,
message: self.message,
}
}
}
}
impl TransitGatewayRegistrationStateReason {
pub fn builder() -> crate::model::transit_gateway_registration_state_reason::Builder {
crate::model::transit_gateway_registration_state_reason::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 TransitGatewayRegistrationState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for TransitGatewayRegistrationState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => TransitGatewayRegistrationState::Available,
"DELETED" => TransitGatewayRegistrationState::Deleted,
"DELETING" => TransitGatewayRegistrationState::Deleting,
"FAILED" => TransitGatewayRegistrationState::Failed,
"PENDING" => TransitGatewayRegistrationState::Pending,
other => TransitGatewayRegistrationState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TransitGatewayRegistrationState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TransitGatewayRegistrationState::from(s))
}
}
impl TransitGatewayRegistrationState {
pub fn as_str(&self) -> &str {
match self {
TransitGatewayRegistrationState::Available => "AVAILABLE",
TransitGatewayRegistrationState::Deleted => "DELETED",
TransitGatewayRegistrationState::Deleting => "DELETING",
TransitGatewayRegistrationState::Failed => "FAILED",
TransitGatewayRegistrationState::Pending => "PENDING",
TransitGatewayRegistrationState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETED", "DELETING", "FAILED", "PENDING"]
}
}
impl AsRef<str> for TransitGatewayRegistrationState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TransitGatewayConnectPeerAssociation {
pub transit_gateway_connect_peer_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
pub link_id: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::TransitGatewayConnectPeerAssociationState>,
}
impl std::fmt::Debug for TransitGatewayConnectPeerAssociation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TransitGatewayConnectPeerAssociation");
formatter.field(
"transit_gateway_connect_peer_arn",
&self.transit_gateway_connect_peer_arn,
);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("device_id", &self.device_id);
formatter.field("link_id", &self.link_id);
formatter.field("state", &self.state);
formatter.finish()
}
}
pub mod transit_gateway_connect_peer_association {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) transit_gateway_connect_peer_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) link_id: std::option::Option<std::string::String>,
pub(crate) state:
std::option::Option<crate::model::TransitGatewayConnectPeerAssociationState>,
}
impl Builder {
pub fn transit_gateway_connect_peer_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.transit_gateway_connect_peer_arn = Some(input.into());
self
}
pub fn set_transit_gateway_connect_peer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transit_gateway_connect_peer_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.link_id = Some(input.into());
self
}
pub fn set_link_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_id = input;
self
}
pub fn state(
mut self,
input: crate::model::TransitGatewayConnectPeerAssociationState,
) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::TransitGatewayConnectPeerAssociationState>,
) -> Self {
self.state = input;
self
}
pub fn build(self) -> crate::model::TransitGatewayConnectPeerAssociation {
crate::model::TransitGatewayConnectPeerAssociation {
transit_gateway_connect_peer_arn: self.transit_gateway_connect_peer_arn,
global_network_id: self.global_network_id,
device_id: self.device_id,
link_id: self.link_id,
state: self.state,
}
}
}
}
impl TransitGatewayConnectPeerAssociation {
pub fn builder() -> crate::model::transit_gateway_connect_peer_association::Builder {
crate::model::transit_gateway_connect_peer_association::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 TransitGatewayConnectPeerAssociationState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for TransitGatewayConnectPeerAssociationState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => TransitGatewayConnectPeerAssociationState::Available,
"DELETED" => TransitGatewayConnectPeerAssociationState::Deleted,
"DELETING" => TransitGatewayConnectPeerAssociationState::Deleting,
"PENDING" => TransitGatewayConnectPeerAssociationState::Pending,
other => TransitGatewayConnectPeerAssociationState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TransitGatewayConnectPeerAssociationState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TransitGatewayConnectPeerAssociationState::from(s))
}
}
impl TransitGatewayConnectPeerAssociationState {
pub fn as_str(&self) -> &str {
match self {
TransitGatewayConnectPeerAssociationState::Available => "AVAILABLE",
TransitGatewayConnectPeerAssociationState::Deleted => "DELETED",
TransitGatewayConnectPeerAssociationState::Deleting => "DELETING",
TransitGatewayConnectPeerAssociationState::Pending => "PENDING",
TransitGatewayConnectPeerAssociationState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETED", "DELETING", "PENDING"]
}
}
impl AsRef<str> for TransitGatewayConnectPeerAssociationState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LinkAssociation {
pub global_network_id: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
pub link_id: std::option::Option<std::string::String>,
pub link_association_state: std::option::Option<crate::model::LinkAssociationState>,
}
impl std::fmt::Debug for LinkAssociation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LinkAssociation");
formatter.field("global_network_id", &self.global_network_id);
formatter.field("device_id", &self.device_id);
formatter.field("link_id", &self.link_id);
formatter.field("link_association_state", &self.link_association_state);
formatter.finish()
}
}
pub mod link_association {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) link_id: std::option::Option<std::string::String>,
pub(crate) link_association_state: std::option::Option<crate::model::LinkAssociationState>,
}
impl Builder {
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.link_id = Some(input.into());
self
}
pub fn set_link_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_id = input;
self
}
pub fn link_association_state(mut self, input: crate::model::LinkAssociationState) -> Self {
self.link_association_state = Some(input);
self
}
pub fn set_link_association_state(
mut self,
input: std::option::Option<crate::model::LinkAssociationState>,
) -> Self {
self.link_association_state = input;
self
}
pub fn build(self) -> crate::model::LinkAssociation {
crate::model::LinkAssociation {
global_network_id: self.global_network_id,
device_id: self.device_id,
link_id: self.link_id,
link_association_state: self.link_association_state,
}
}
}
}
impl LinkAssociation {
pub fn builder() -> crate::model::link_association::Builder {
crate::model::link_association::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 LinkAssociationState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for LinkAssociationState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => LinkAssociationState::Available,
"DELETED" => LinkAssociationState::Deleted,
"DELETING" => LinkAssociationState::Deleting,
"PENDING" => LinkAssociationState::Pending,
other => LinkAssociationState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for LinkAssociationState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LinkAssociationState::from(s))
}
}
impl LinkAssociationState {
pub fn as_str(&self) -> &str {
match self {
LinkAssociationState::Available => "AVAILABLE",
LinkAssociationState::Deleted => "DELETED",
LinkAssociationState::Deleting => "DELETING",
LinkAssociationState::Pending => "PENDING",
LinkAssociationState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETED", "DELETING", "PENDING"]
}
}
impl AsRef<str> for LinkAssociationState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomerGatewayAssociation {
pub customer_gateway_arn: std::option::Option<std::string::String>,
pub global_network_id: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
pub link_id: std::option::Option<std::string::String>,
pub state: std::option::Option<crate::model::CustomerGatewayAssociationState>,
}
impl std::fmt::Debug for CustomerGatewayAssociation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomerGatewayAssociation");
formatter.field("customer_gateway_arn", &self.customer_gateway_arn);
formatter.field("global_network_id", &self.global_network_id);
formatter.field("device_id", &self.device_id);
formatter.field("link_id", &self.link_id);
formatter.field("state", &self.state);
formatter.finish()
}
}
pub mod customer_gateway_association {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) customer_gateway_arn: std::option::Option<std::string::String>,
pub(crate) global_network_id: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) link_id: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::CustomerGatewayAssociationState>,
}
impl Builder {
pub fn customer_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.customer_gateway_arn = Some(input.into());
self
}
pub fn set_customer_gateway_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.customer_gateway_arn = input;
self
}
pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
self.global_network_id = Some(input.into());
self
}
pub fn set_global_network_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.global_network_id = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn link_id(mut self, input: impl Into<std::string::String>) -> Self {
self.link_id = Some(input.into());
self
}
pub fn set_link_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.link_id = input;
self
}
pub fn state(mut self, input: crate::model::CustomerGatewayAssociationState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::CustomerGatewayAssociationState>,
) -> Self {
self.state = input;
self
}
pub fn build(self) -> crate::model::CustomerGatewayAssociation {
crate::model::CustomerGatewayAssociation {
customer_gateway_arn: self.customer_gateway_arn,
global_network_id: self.global_network_id,
device_id: self.device_id,
link_id: self.link_id,
state: self.state,
}
}
}
}
impl CustomerGatewayAssociation {
pub fn builder() -> crate::model::customer_gateway_association::Builder {
crate::model::customer_gateway_association::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 CustomerGatewayAssociationState {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for CustomerGatewayAssociationState {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => CustomerGatewayAssociationState::Available,
"DELETED" => CustomerGatewayAssociationState::Deleted,
"DELETING" => CustomerGatewayAssociationState::Deleting,
"PENDING" => CustomerGatewayAssociationState::Pending,
other => CustomerGatewayAssociationState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CustomerGatewayAssociationState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CustomerGatewayAssociationState::from(s))
}
}
impl CustomerGatewayAssociationState {
pub fn as_str(&self) -> &str {
match self {
CustomerGatewayAssociationState::Available => "AVAILABLE",
CustomerGatewayAssociationState::Deleted => "DELETED",
CustomerGatewayAssociationState::Deleting => "DELETING",
CustomerGatewayAssociationState::Pending => "PENDING",
CustomerGatewayAssociationState::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["AVAILABLE", "DELETED", "DELETING", "PENDING"]
}
}
impl AsRef<str> for CustomerGatewayAssociationState {
fn as_ref(&self) -> &str {
self.as_str()
}
}